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

WorkAround for ValueError: No ground-truth boxes available for one of the images during training #836

Merged
merged 22 commits into from
May 29, 2019

Conversation

obendidi
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label May 29, 2019
Copy link
Contributor

@fmassa fmassa left a 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]}" )
Copy link
Contributor

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

@fmassa fmassa merged commit d269847 into facebookresearch:master May 29, 2019
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.
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.

3 participants