Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

ValueError: No proposal boxes available for one of the images during training #492

Closed
botcs opened this issue Feb 26, 2019 · 15 comments
Closed

Comments

@botcs
Copy link
Contributor

botcs commented Feb 26, 2019

❓ Questions and Help

In #169 the case is discussed where no annotations are available.
During training on small objects it is quite frequent that the RPN does not generate any proposal, what can I do now?

Reducing NMS_THRESH and FG_IOU_THRESHOLD does not seem to help.

@fmassa
Copy link
Contributor

fmassa commented Feb 26, 2019

Hi,

I think this error should only happen if there are no boxes output by the RPN, and not that the boxes do not overlap, which is very weird.

Did you change anything else in the codebase?

@botcs
Copy link
Contributor Author

botcs commented Feb 26, 2019

No, the coco-training is running perfectly, it is rather the database.

@fmassa
Copy link
Contributor

fmassa commented Feb 26, 2019

Oh, I see, this error is not happening when matching the instances for the RPN, but when preparing the instances for the heads.
This is weird, because we normally append the ground-truth box together with the proposals during training, so this shouldn't be happening.

@botcs
Copy link
Contributor Author

botcs commented Feb 26, 2019

The thing is that it runs for a while with an average number of proposals of 25 (not showing any kind of decrease) and suddenly when 0 proposals are made, then crash occurs, and I am not so sure at which point should I catch this error. Could you give some hints?

@fmassa
Copy link
Contributor

fmassa commented Feb 26, 2019

are you sure that all the images have valid annotations? This sounds like there is an image that has problematic annotations

@botcs
Copy link
Contributor Author

botcs commented Feb 26, 2019

I have printed all the instance labels for every image loaded, and no, every empty entries are removed from the dataset

@fmassa
Copy link
Contributor

fmassa commented Feb 26, 2019

Same thing for boxes which have less than 1 size?

@botcs
Copy link
Contributor Author

botcs commented Feb 26, 2019

printed the boxes' size as well, I remove any instance that is less than 100 pixels in area (sum reduced binary masks) not a single problem like this

@fmassa
Copy link
Contributor

fmassa commented Feb 26, 2019

One thing I don't understand: you mentioned that there are 25 proposals on average: this seems very low to me, the default parameters should make something like 512. Why is that the case?

@botcs
Copy link
Contributor Author

botcs commented Feb 26, 2019

try out printing proposals on the COCO dataset as well. It is higher than 25 but definitely not close to 512

@fmassa
Copy link
Contributor

fmassa commented Feb 26, 2019

So, I think there is a confusion between proposals and ground-truth boxes.

The proposals are the ones returned by the RPN, and are in the order of 1000s. We select a subset of them to feed to the heads.
Then there are the GT boxes, which are in much smaller number, in average 20 or so per image.

The error you are mentioning says that there are no proposals: this is very weird and should not happen in general.

@botcs
Copy link
Contributor Author

botcs commented Feb 27, 2019

If you'd like, I can get the number of proposals during a regular COCO training as well and report it here.

Indeed, the error is quite odd, any tips on workaround?
How this case should be handled?

@fmassa
Copy link
Contributor

fmassa commented Feb 28, 2019

I'd first try to understand if your RPN is outputting the right things. It should output around 2000 proposals (that's the value we specify in the config). If that's lower than that then there is a problem there already

@botcs
Copy link
Contributor Author

botcs commented Mar 2, 2019

I have found the source of this problem.
The proposals were cut away by keep_only_positive_boxes since my contiguous_id started from 0 instead of 1, while 0 should be kept for background.

@botcs botcs closed this as completed Mar 2, 2019
@hm1119
Copy link

hm1119 commented Nov 2, 2021

I have found the source of this problem. The proposals were cut away by keep_only_positive_boxes since my contiguous_id started from 0 instead of 1, while 0 should be kept for background.

hello I also have this issue; and how do you solved it. thanks!

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

No branches or pull requests

3 participants