-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
all-zero gt_boxes are loaded and cause runtime error #330
Comments
I reviewed the code and found that the problem is from As there computes the IoUs of sampled boxes in So when I choose only one class for training, such as
When it runs to the following code in line 132 (dataset.py),
So I changed the code in line 127 (dataset.py) from
to
It seems that it works. |
@gardenbaby , thank you for the information and I will check that. |
if you choose only one class for training (Cyclist), then len(data_dict['gt_boxes']) == 0 means no gt_boxes for Cyclist. |
Still get the runtime error with the following changement:
|
@gardenbaby |
I've checked
Simply comment the last 3 lines may not help, since it's for recursively loading another frame if no I replaced
by the following 2 lines.
Please note that I added a new |
@MartinHahner |
Thanks for your detailed reply. I have reviewed the code, and found the codes in database_sampler.py (line 196):
If the valid_mask (line 188) is empty, then the 'self.add_sampled_boxes_to_scene' will not be called, and the 'gt_boxes_mask' will not be used to update gt_boxes (line 120). Thus the returned 'data_dict' in dataset.py (line 121) still keep gt_boxes for other categories. Still, some of the bin files in gt_database folder is empty, which means the corresponding gtbox contains no valid points, and it can be filtered in the generating process. |
@xjjs |
With the code changement, fewer runtime error for "assert gt_classes.max() <= self.mean_size.shape[0]" happened. But I got one today, I think the problem may lie in the empty bins in gt_database folder, which contain no points but still can be sampled. |
Hi all, This bug has been fixed in #340. Actually I moved the empty check to the end of the The error in Note that both of these two errors don't affect the performance. Thank you all for the bug information. |
Hi, team,
I noticed that in
dataset.py
the following code was added for preventing loading a new frame withoutgt_boxes
.But it still happens that sometimes the
gt_boxes
inbatch_dict
for certain frames are all zeros before being processed by the model. Some of the operations (such astorch.max()
) cannot be accomplished with the situation above.Here I added the following code in
point_rcnn.py
at the beginning offorword()
,Everytime it stopped here, I printed
batch_dict['gt_boxes']
and would find one of the frames withgt_boxes
all zeros as the following.As
PointRCNN
usePointResidualCoder
, ifgt_boxes
is all-zero, no foregroundgt_boxes
will be selected and the input ofPointResidualCoder
will be empty. Then the followingassert
inencode_torch()
will raiseRuntimeError
as follows.Here I trained the model with
CLASS_NAMES: ['Cyclist']
.Is it normal and what could be the possible reason behind?
The text was updated successfully, but these errors were encountered: