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

Raise error if no GT or proposals available during training #37

Merged
merged 1 commit into from
Dec 4, 2018

Conversation

fmassa
Copy link
Contributor

@fmassa fmassa commented Oct 26, 2018

This should help catch problems similar to the one in #31

# 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 "
Copy link
Member

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

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @soumith

Copy link
Contributor Author

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

@fmassa
Copy link
Contributor Author

fmassa commented Dec 4, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants