WeakTr icon indicating copy to clipboard operation
WeakTr copied to clipboard

Train on custom dataset

Open HamidrezaZarrabi opened this issue 2 years ago • 1 comments

Thank you so much for your great work! I am so honered to use your method for my custom dataset. My dataset has only one class and then I should train it. I have followed the instructions as you mentioned in the repo, but I deal with some problems in step prepare dataset and I got confused. For example, there are different text files for IDs of train. Why? Please let me know, how should I make the dataset and its gTruth and text files. Thank you for taking the time to help me. I hope to hear from you.

HamidrezaZarrabi avatar Dec 03 '23 00:12 HamidrezaZarrabi

Thank you so much for your great work! I am so honered to use your method for my custom dataset. My dataset has only one class and then I should train it. I have followed the instructions as you mentioned in the repo, but I deal with some problems in step prepare dataset and I got confused. For example, there are different text files for IDs of train. Why? Please let me know, how should I make the dataset and its gTruth and text files. Thank you for taking the time to help me. I hope to hear from you.

In Phase 2, when I run the command

cd OnlineRetraining
bash segm/dist_train.sh 1 \
--log-dir start1.2_patch120_seg_deit_small_patch16_224_voc_weaktr \
--dataset pascal_voc --backbone deit_small_patch16_224 --decoder mask_transformer \
--ann-dir SegmentationClassAug \
--start-value 1.2 --patch-size 120 \

configure of the model and size of the dataset is printed.

Screenshot from 2023-12-03 23-54-16

But after that, the following error occurs:

Screenshot from 2023-12-03 23-55-55 Screenshot from 2023-12-03 23-57-57 Screenshot from 2023-12-04 00-33-53

I think there is a problem in file train_id.txt. There are some *.txt files (for example inside directory WeakTr/voc12/train_aug_id.txt and WeakTr/voc12/ VOCdevkit/VOC2012/ImageSets/Segmentation/trainaug.txt) that specify IDs of images. I don't know, what images should include in these files? Also what relation there is between directories WeakTr/voc12/*.txt and WeakTr/voc12/ VOCdevkit/VOC2012/ImageSets/Segmentation/*.txt? Thank you for taking the time to help me. I hope to hear from you.

HamidrezaZarrabi avatar Dec 03 '23 21:12 HamidrezaZarrabi