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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions maskrcnn_benchmark/engine/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

continue
data_time = time.time() - end
iteration = iteration + 1
arguments["iteration"] = iteration
Expand Down