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

nans during RPN training #200

Open
sbordt opened this issue Apr 10, 2018 · 4 comments
Open

nans during RPN training #200

sbordt opened this issue Apr 10, 2018 · 4 comments

Comments

@sbordt
Copy link

sbordt commented Apr 10, 2018

Hi guys,

I tried to train a RPN using this great package but failed due to inf/nan loss, and now suspect there might be an issue with the Anchor. As far as I can tell, it does not generate enough positive examples during training, where every Anchor that has a IoU with a ground-truth bounding box of over 0.7 should be labelled as a positive example (as far as I understand Faster R-CNN).

I am not experienced with debugging keras, so I can't look into it right now, but I think it should be related to what's happend during _label at the Anchor.

Cheers,

Sebastian

@0x00b1
Copy link
Contributor

0x00b1 commented Apr 10, 2018

Hi, @sbordt! Thanks for the report. Are you running from source?

@0x00b1
Copy link
Contributor

0x00b1 commented Apr 10, 2018

As far as I can tell, it does not generate enough positive examples during training, where every Anchor that has a IoU with a ground-truth bounding box of over 0.7 should be labelled as a positive example (as far as I understand Faster R-CNN).

You can find the code here:

https://github.com/broadinstitute/keras-rcnn/blob/master/keras_rcnn/layers/object_detection/_anchor.py#L191-L197

@0x00b1 0x00b1 changed the title Anchor / RPN nans during RPN training Apr 10, 2018
@sbordt
Copy link
Author

sbordt commented Apr 11, 2018

Thanks for the quick reply!

I understand that it happens somewhere within these lines, but I must admit that I don't fully understand the code.

However I have created a small example that should work with the current master to illustrate the issue

https://gist.github.com/sbordt/58cc34c29fce54ffb8f114f605ea9f37

Shouldn't there be more positive examples (in blue) versus ground-truth bounding boxes (in red)?

@Ostnie
Copy link

Ostnie commented May 17, 2018

@sbordt Hi,I'm very sorry to bother you, but I really can't see how this library is used. I've been learning RCNN recently and hope to learn from a source code, but I can't see the structure of the library at all, even the questions you ask is strange for me. For example, where is the content of the RPN your are training ? I didn't find it in the repository.

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

3 participants