Raykoooo / IAST

IAST: Instance Adaptive Self-training for Unsupervised Domain Adaptation (ECCV 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

training on novel dataset

PolarBean opened this issue · comments

Hey, great paper! any advice on how to train IAST on a new dataset?

Sorry for the late reply, thank you for your attention to our paper.

For training IAST on a new dataset, please follow the following steps:

  1. Generate a JSON file where each item should contain image_name and mask_name, which indicate the relative path of image and label. For more details, please see the JSON files in IAST/data.
  2. Implement a dataset class that inherits the BaseDataset, just like the MsCityscapesDataset, and overwrite the transform_mask(self, label) for specific label transformation and aug(self, image, label) for the augmentation. Last but not least, please register your dataset with a customized name by using @DATASET.register("your_dataset_name").
    @DATASET.register("MsCityscapesDataset")
    class MsCityscapesDataset(BaseDataset):
    # overwrite
    def transform_mask(self, label):
    return label
    # overwrite
    def aug(self, image, label):
    return crop_aug(image, label, 512, 1024, min_max_height=(341, 1000), w2h_ratio=2)

I hope this can help you, I close this issue, if you have any other questions, please comment and I will reopen it.