uitrbn / CST_DA_detection

MIT License
22 stars 4 forks source link

missing ground truth for foggycityscapes dataset #3

Open abucka opened 2 years ago

abucka commented 2 years ago

Hello,

in order to run the cityscapes_to_foggycityscapes_da.py, it is necessary to have the ground truth for foggycityscapes dataset. Unfortunately it is not available on the cityscapes website, I also contacted them but I didnot get any reply. Can you please guide me where I can find the ground truth for this dataset? Thank you!

uitrbn commented 2 years ago

Hi, as far as I remember, the foggycityscapes dataset generates fog using the image from cityscapes. Therefore, the ground truth of foggycityscapes is the same to cityscapes.

abucka commented 1 year ago

@uitrbn , thank you for your reply. Could you please also explain me why do we need the annotation for the target dataset? Based on the paper, I understood that we're using unlabeled data in target domain at training.

AutoFine commented 1 year ago

Hello,

Thanks for sharing code for this excellent paper. I'm trying this model for my own user case. Based on my understanding of your paper and concept of domain adaptation, the ground truth of FoggyCityscapes shouldn't be used for training, while using Cityscapes as the source domain and FoggyCityscapes as target domain. However in the script (cityscapes_to_foggycityscapes_da.py), the target domain dataset (dataset_cityscape_pl) seems to use its ground truth. I traced back to two scripts(combined_roidb and factory.py) to find out that no information is provided for foggycityscapes_train in the factory.py. And, this foggycityscapes_train is used for the domain adaptation, while adaptating Cityscapes to FoggyCityscapes. Can you please provide some hints here? Many thanks in advance.

Best regards

uitrbn commented 1 year ago

@AutoFine Hi, the ground truth of foggycityscapes is read during the training, but it does not violate the rule of domain adaptation, because the variable that contains the information of ground truth, i.e., gt_boxes is not used during the forward procedure of target images. Our code reads the ground truth for the code consistency between the source and target domains. Also for convenience. Please see the forward function of fasterRCNN carefully as it is a little tricky. In the case of target image forward, i.e., domain_label == 0, we used different functions to source images to avoid the utilization of gt_boxes, and we regenerate the gt_boxes for target image self-training in faster_rcnn.py Line 180 using the prediction of fasterRCNN itself, i.e., rois, cls_prob.

AutoFine commented 1 year ago

@AutoFine Hi, the ground truth of foggycityscapes is read during the training, but it does not violate the rule of domain adaptation, because the variable that contains the information of ground truth, i.e., gt_boxes is not used during the forward procedure of target images. Our code reads the ground truth for the code consistency between the source and target domains. Also for convenience. Please see the forward function of fasterRCNN carefully as it is a little tricky. In the case of target image forward, i.e., domain_label == 0, we used different functions to source images to avoid the utilization of gt_boxes, and we regenerate the gt_boxes for target image self-training in faster_rcnn.py Line 180 using the prediction of fasterRCNN itself, i.e., rois, cls_prob.

Hi, happy new year. Thanks for the explanation. As you said, the labels in the target domain are set to zero.