zhaozhengChen / LPCAM

The official code of CVPR 2023 paper (Extracting Class Activation Maps from Non-Discriminative Features as well).
31 stars 4 forks source link

How to replace the generated pseudo masks #8

Closed lsnnic closed 5 months ago

lsnnic commented 5 months ago

Hello. Firstly, thank you for the great work. I am a new one in the deep learning domain, so the following problem may be a little easy for you. I am trying to run your code with PASCAL VOC dataset, however, in the step4, I don't know where to put the generated pseudo masks in the step3. In the VOC2012 folder, there are three possible folders, SegmentationClass, SegmentationClassAug(deeplab-pytorch added), and SegmentationObject, I need to put the generated pseudo masks in all the three folders, or just someone? Waiting for your early reply, thank you.

zhaozhengChen commented 5 months ago

Thanks for your interest in our work. You need to replace the masks in SegmentationClassAug (ground truth) with the generated pseudo masks.

lsnnic commented 5 months ago

Thank you very much for your willingness to take the time to answer this seemingly non-technical question. Can I ask you another question, the number of pseudo-mask images I generated is differentfrom that of you provided in the link[https://drive.google.com/file/d/1eDyD1b0nVI2WY4TcuN71yx8OoAOfsIlU/view?usp= share_link], which is in the step 3 with VOC2012 dataset. I generated only 1464 pseudo-mask images, but you have 10582 images, I don't know how to tweak the code to produce the same number of pseudo-masked images as you do. Looking forward to your reply, thanks again for your response! Snipaste_2024-07-02_15-10-34-1

zhaozhengChen commented 5 months ago

1464 is train set, 10582 is train_aug set. You can change the --infer_list argument to voc12/train_aug.txt. You may check the argument at this line: https://github.com/zhaozhengChen/LPCAM/blob/39cdd8d87051496c999526316dfb5b9c0bfd49ca/run_sample.py#L30

lsnnic commented 5 months ago

Thank you for your patience in responding. I read run_sample.py line by line today and have found the cause. Thanks again for your reply!