yassouali / CCT

:page_facing_up: Semi-Supervised Semantic Segmentation with Cross-Consistency Training (CVPR 2020).
https://yassouali.github.io/cct_page/
MIT License
395 stars 58 forks source link

Labels for unsupervised #52

Closed watermellon2018 closed 2 years ago

watermellon2018 commented 2 years ago

I want to use custom dataset. But on VOC dataset i see that in file 1464_train_unsupervised write path to image and path to label. I dont understand. Unsupervised approch assumes that we have not labels. Help undersund this moment, please

yassouali commented 2 years ago

Hi @watermellon2018 Thank you for your interest.

In a practical case, yes you are right, the unsupervised branch only takes the images without any labels. In our case, given that we only simulate the semi-supervised case by ignoring the labels of already labeled images, we do however load the labels, but they are only used to compute the acc and miou during for printing reasons only, they are not used in training.

In your case, you can create two datasets, one with labels for the supervised branch and any without any for the unsupervised branch. You'll also need to comment out the parts in trainer.py that use the labels of the unsupervised dataset (called target_ul) to compute the mIoU.

Hope I answered your question.