-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault #6
Comments
TensorFlow sometimes provides wrong error messages... |
@Yuliang-Zou Yeah looks like that was the problem. Changed it to |
Yes. I think you can mainly follow the data generation of `pascal_voc_seg'. It should be straightforward to adapt to your use case. |
@Yuliang-Zou I trained the model on Pascal VOC and have a few issues with it. The loss and accuracy don't almost change through training. I have attached a screenshot here. The acc_seg is never above 0.05! I was wondering if you could help me understand what I am doing wrong. I ran the code without any changes as follows:
When the training is done it prints:
And when I run eval.py using the following command:
I get:
Thank you so much for your time and help! |
Hmmm, interesting. |
@Yuliang-Zou Thank you so much for your quick response. I tried 30k the result was better but not as expected. It only got to ~30% acc as shown in the plot.
got more reasonable accuracy (~64%):
The fact that the acc starts from zero, tells me that the model isn't reading the weight from the ImageNet CKPs properly. I also get a lot of warning with this message Also, I have another question about the tfrecords for unlabeled images (no annotation and no image-level labels). How do you generate tfrecords for these images? Are images used for train_aug-00000-of-00010.tfrecord, for example, have image-level labels? If not, how do you generate the tfrecords for them? I really appreciate your help! |
Can you provide more information about the missing variable? Although I guess the missing variables are actually the decoder part (not trained on ImageNet). Another thing, the reference performance is achieved by 8 x 2-GPU internal machines. Since you are using a different configuration, you might not be able to get the same numbers. |
Yeah, sure. I have attached a file that has the warning messages. And I think you are right about the variables being from the decoder part (at least most of them are). Yeah, I understand that. I am only using 4 V100 GPUs. But based on your paper, in addition to the pixel-level labeled images, you are also using images with no labels ("We propose a simple one-stage framework to improve semantic segmentation by using a limited amount of pixel-labeled data and sufficient unlabeled data or image-level labeled data"). Looking at your code, these are the relevant parameters to be set when using the unlabeled images . I am assuming in your case unlabeled/image-level labeled images are in train_aug-0000* and are given to the program by setting 'train_split_cls'?!
Sorry if I am asking too many questions :) |
We assume that we have limited pixel-level labeled data and a lot of unlabeled or image-level labeled data. It is easy to understand the unlabeled part. For the image-level labels, since VOC itself does not provide this label, we convert some pixel-level labeled data to image-level labeled data (and assume we don't have pixel-level labels for these data). You can take a look at here, which is the data loading code to handle this. Pseudo label is another concept. We first use Grad-CAM to generate a coarse-grained segmentation and then refine it with self-attention. We then combine the predictions from both decoder and self-attention Grad-CAM to construct our pseudo label. These pseudo labels are soft (not one-hot) and they are generating on-the-fly, as training proceeds their quality becomes better. |
That makes sense and I understood that you used the pixel-level labels to get image-level labels. What I am not sure about is the following?
Thanks again for your time! |
|
That makes sense. I'll give it a try see how it goes. Thank you so much for your help! |
@Yuliang-Zou Thank you so much for your help! I followed your guidance and it worked. I have one more question though! Is there an easy way to get pixel accuracy, in addition to IoU, from eval.py? |
I think you can use |
That is for classification, right? Should I not use something similar to this for pixel accuracy? |
Ah you are right. The one I referred to is for the overall accuracy. You should use the one you are referring to for per-class accuracy. |
BTW, I added
after this line and it seems to be working. Not sure if it actually gives me the overall pixel accuracy or not. |
Hi,
Thank you so much for your work! I'd like to try it on a different dataset and I was wondering if you could guide me through the most important things that I have to prepare to be able to run your code?
I started with the most basic thing. I created a
dataset
directory and downloaded the pre-created tfrecords for voc12 put them indataset
.I wanted to try the training on one GPU, so I ran
python3 train_sup.py --num_clones 1 --train_logdir logs/ --dataset_dir dataset/
but I am gettingsegmentation fault
error. What do you think I am doing wrong?Thank you so much in advance!
The text was updated successfully, but these errors were encountered: