-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Raise error if no GT or proposals available during training #37
Conversation
# empty targets or proposals not supported during training | ||
if match_quality_matrix.shape[0] == 0: | ||
raise ValueError( | ||
"No ground-truth boxes available for one of the images " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it tell the user which image / filename if possible. otherwise it becomes a bit of a nightmare to track back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @soumith
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree as well, but for the image names to be displayed in the error message means that the assert would need to be applied in the user code as well, when they create a new Dataset class
Propagating which image yielded the empty target can be a bit tricky as there might have been random crops etc. Maybe I'll add another assert like this in the Dataset itself, but in the meantime I'll be merging this as is. |
This should help catch problems similar to the one in #31