Skip to content
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

Question about RCF-ResNet #89

Open
trungpv88 opened this issue Jul 3, 2019 · 8 comments
Open

Question about RCF-ResNet #89

trungpv88 opened this issue Jul 3, 2019 · 8 comments

Comments

@trungpv88
Copy link

trungpv88 commented Jul 3, 2019

Hello,

I have a question about RCF-ResNet. As you said in a post: " For ResNet, we use all the 3x3 conv layers, excluding the 1x1 conv layers. We also change the stride of "conv1" layer from 2 to 1". I try to do that with ResNet50 and ResNet101, but it does not work (the final result is always 0.5). It seems that the weights from 3x3 conv layers are almost zero. I think when I load the pretrained model of ResNet, the residual mappings are already optimized to zero. That's why the weights cannot be changed. I also try to use the last layers (1x1 conv) from each stage in ResNet. It works but the contour quality is not good as RCF-VGG16.

Can you share me how to implement RCF with ResNet (structures, hyperparameters ...) , please?

Thank you very much.

@yun-liu
Copy link
Owner

yun-liu commented Jul 6, 2019

Thank you for your question! I have not met your problem, but I have pretrained the backbone on the ImageNet to further improve the results. Since I think people will not be interested in RCF-ResNet that is slower than RCF-VGG, I did not release it. I will release the code tomorrow.

@trungpv88
Copy link
Author

OK. Thank you very much. I think I have a problem with some hyperparameters (ex, lr_mult).

@yun-liu
Copy link
Owner

yun-liu commented Jul 9, 2019

I have uploaded the RCF-ResNet code into the folder of examples/rcf/. The pretrained ImageNet and BSDS500 models are available here. I didn't test the code thoroughly. I add two 3x3 conv layers after each conv layer of ResNet, but I'm not sure if it will help or only help for low layers (e.g., conv1). I will do this evaluation as soon as possible.

@trungpv88
Copy link
Author

trungpv88 commented Jul 12, 2019

Thank you so much. I tested your model and it gives much better results that I trained. I will try modify the structure to see how the 3x3 conv layers help improve the contour quality; because when I extract directly the features from the 1x1 conv layers or 3x3 conv layers in residual blocks, it seems that the contours are more blurries.

@yun-liu
Copy link
Owner

yun-liu commented Jul 13, 2019

I will appreciate it if you could share the evaluation results about the function of the additional 3x3 conv layers in the future : ) I'll test it, too.

@yun-liu
Copy link
Owner

yun-liu commented Jul 14, 2019

I have tested the ResNet101 version of RCF. The RCF without 3x3 conv layers achieves only 0.1%-0.2% lower ODS F-measure than RCF with 3x3 conv layers. I'll release the new models.

@trungpv88
Copy link
Author

Thanks for this information. I guess the reason why I got the more blurry contours is the training dataset. In fact, I used the SBD dataset (less accurate than BSDS500 and used for semantic boundaries) to train RCF-VGG16 and RCF-ResNet101 (with your prototxt files). When comparing the results, I find that RCF-VGG16 gives the better contours than RCF-ResNet101 (which gives more blurry contour) and the quality of contours obtained by my trained model RCF-VGG16 is as good as your trained models (RCF-VGG16 and RCF-ResNet101).

@yun-liu
Copy link
Owner

yun-liu commented Jul 16, 2019

Yeah, it sounds reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants