This repository was archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
WorkAround for ValueError: No ground-truth boxes available for one of the images during training
#836
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Following discussion [here](facebookresearch#167), this seemed the best solution
modified: setup.py
update to latest version
update to latest and small fix to empty targets
fmassa
approved these changes
May 29, 2019
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.
Thanks!
@@ -55,6 +55,10 @@ def do_train( | |||
start_training_time = time.time() | |||
end = time.time() | |||
for iteration, (images, targets, _) in enumerate(data_loader, start_iter): | |||
|
|||
if any(len(target) < 1 for target in targets): | |||
logger.error(f"Iteration={iteration + 1} || Image Ids used for training {_} || targets Length={[len(target) for target in targets]}" ) |
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.
This is python-3 only.
But well, I suppose that with APEX we now have a hard-dependency on Python3 anyway
Lyears
pushed a commit
to Lyears/maskrcnn-benchmark
that referenced
this pull request
Jun 28, 2020
…f the images during training` (facebookresearch#836) * Update setup.py * add a FORCE_CUDA flag Following discussion [here](facebookresearch#167), this seemed the best solution * Update Dockerfile * Update setup.py * add FORCE_CUDA as an ARG * modified: docker/Dockerfile modified: setup.py * small fix to readme of demo * remove test print * keep ARG_CUDA * remove env value and use the one from ARG * keep same formatting as source * change proposed by @miguelvr * Update INSTALL.md * Update trainer.py * Update trainer.py * Update trainer.py * Update trainer.py * Update trainer.py * Update setup.py
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
as seen in #805 and #724
In some cases, the dataset is not complete or there are some errors in one of its elements, and it's a shame to just throw an error and stop the training for just one buggy element in a dataset.
this change is to log information about the error (to be able to check the dataset for the buggy element) and then continue the training