-
Notifications
You must be signed in to change notification settings - Fork 34
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
Multi class settings #5
Comments
@davyneven I'm reproducing your multi class results recently, but the current results are not good. I think there may be something different between my implementation and yours. May I ask these several questions:
|
Hi,
|
@davyneven Thank you so much for your quick reply!! My seed map is also 8 channels, and I also used an extra for loop over the 8 classes, but I use the same foreground weight, this may be a problem. Also, I have a question about clustering:
|
The foreground weights are very import to reach good results, so you should definitely see some improvements. The order of clustering the seed maps of the different classes doesn't matter. I cluster each seed map separately, and save each clustered object. So indeed, this way you can have a same object detected in two seed maps, eg a bicycle can be detected as a bicycle and also as a motorcycle. |
@davyneven Thanks for your reply! I use your clustering method and the performance imporved! However, I double-checked the ERFNet paper and found nothing about class weights, their code is also not available now. Can you share me your code or paste part of them on this issue?:) Thanks! |
Hi, I have a question about the for loop over seed map in calculating the seed loss. Since an instance can only belong to a single class, so why do we need this for loop? In my implementation, I simply do it this way: |
I would like to do some research about instance segmentation based on your work, so I'm reproducing your multi class results, and I just can not reach the same performance as yours, my configuration:
Training:
My questions:
Your reply will be very important and helpful for me. Thanks a lot. |
Hi, can you share your code? @GitHberChen |
Sorry, I can not, maybe later. |
How is your performance in the first training stage? |
about 21 AP on val, what about yours? |
11:( There must be something wrong with my code. Can you tell me how you calculate the seed loss? I think I may have problem here. And by the way, do you test on 2048*1024? |
yes, of course |
Can you show me your seed loss?Your 26 AP is very close to the 27.6 claimed in paper and I think your implementation is right. |
@GitHberChen Hi, the author said the foreground weight should be set as ERFNet paper said.. But the paper doesn't explain how they calculate the weight, I think their ERFNet code do but the code is now invisible... If you know how to calculate the weight, please contact me, thanks! :) |
The foreground weight is really important, and can impact the result significantly, but I can not get what author said, ERFNet paper does not mention it at all. Can you explain how to calculate or set up the foreground weight for each class? I think class like train, truck should set much higher weight than car @davyneven |
There are actually 2 versions of the ERFNet paper, the weight calculation is mentioned in this one: http://www.robesafe.uah.es/personal/eduardo.romera/pdfs/Romera17iv.pdf (similar to the ENet weight calculation, but with a different factor in the log) Aside from the different foreground weights, another important issue is the data balancing during training. Especially when training on the crop variant, the rare classes will be drastically outnumbered. Therefore my strategy is to first construct 8 datasets, all with size set to 3000/8 (In the dataloader class, samples are sampled randomly so you can mimic a larger/smaller dataset). Next, concat them together (there is a method for this in torchvision) and use this combined, and now also balanced, dataset to construct the dataloader iterator. This should increase the results on the rare classes. After training this way (for me, 200 epochs were also sufficient, but you can train for a longer amount) you still have to finetune on the train set, again with the weights following ERFNet but this time you should not balance anymore, just use the standard train set. This will make sure there are fewer false positives on the rare classes (which is also a delicate balance and often results in low performance). Hope this will lead to better results :) |
Thanks you so much! Your advices enlighten me a lot, thanks again! |
http://www.robesafe.uah.es/personal/eduardo.romera/pdfs/Romera17iv.pdf weight_C = 1/log(1.1+p_C) , p_C = the prob of class_C |
@davyneven Hi, I think Q&A is very inefficient, could you please release the multi-class code? Thank you so much! :) |
I cannot understand the meaning of I apologize for my poor English. |
hey @GitHberChen, Is it possible for you to share your code for multiclass, it would be a great help. |
Hi, neven. Could you update this repo to multi class settings as decribed in your paper? I'm trying to reproduce the results on Cityscapes. Thanks.
The text was updated successfully, but these errors were encountered: