feipanir / IntraDA

Unsupervised Intra-domain Adaptation for Semantic Segmentation through Self-Supervision (CVPR 2020 Oral)
https://arxiv.org/pdf/2004.07703.pdf
MIT License
271 stars 35 forks source link

how to train model on custom dataset #10

Closed lucafei closed 3 years ago

lucafei commented 3 years ago

hi, this is good work, and i want to ask, how to train the model on own custom dataset not using official dataset like cityscape, gta5? thank you in advance

feipanir commented 3 years ago

Hey there are a few things I can conceive to help you. 1) the class space should be taken into consideration. Using the common 19 classes (shown in the paper) would be much easy. But to include new classes, you should modify the backbone network. 2) The custom dataset contains unlabeled images that might in similar resolutions with the source images. Good luck!

Regards,

Fei

lucafei commented 3 years ago

thank you for your answer. and i noted also that the ADVENT is written base on cuda 9.0 and pytorch 0.4.1. For me i use environment base on cuda 10.2 and pytorch 1.7. Do you think if it is possible to run the codes on this enviroment?

feipanir commented 3 years ago

Yes I think it would be no serious issues.

lucafei commented 3 years ago

hi, i have a question for training process. can the training be executed iteratively like 1. python advent ->2. evaluate best model on target domain ->3.train intrada ->1 using pretrained model from last step 3 to train advent again, to get better result ? And also i noted this is like semi-supervised methode, because we need some ground truth of target domain to evaluate best advent model. Is it possible to select a model randomly instead of skipping step 2? Thank you in advance.

feipanir commented 3 years ago

Yes technically there is no problem for doing that.

lucafei commented 3 years ago

hi, i wrote a script to predict segmentation image with given image, but the output size is not same with input image. how does it happen? my output size always is 161x91. do you have any idea for that? thank you in advance

feipanir commented 3 years ago

Maybe you should try to use upsampling layer which will increase the output features into the desired size. Note that you want to interpolate output, I guess the mode should be mode='bilinear'.