HYUNJS/SGT

ZeroDivisionError: division by zero

tzj66 opened this issue · 3 comments

tzj66 commented

When I run train_net.py, this problem happened.
This problem occurs when the dataloader is being built.
In builtin.py, when computing the ratio_bbox_below_vis_per_seq, there are many zeros in the denominator.

ratio_bbox_below_vis_per_seq = {
k: 100 * num_bbox_below_vis_per_seq[k] / (num_bbox_below_vis_per_seq[k] + sum_bbox_per_seq[k]) for k in
num_bbox_below_vis_per_seq.keys()}

I don't know what this variable means, or why this problem arises.

This measures the ratio of objects whose visibility is very low. I don't think (num_bbox_below_vis_per_seq[k] + sum_bbox_per_seq[k]) could be zero since they are the number of objects in the video (=sequence). If your input video does not have any object, the problem would be occured. Please let me know if you have further questions.

tzj66 commented

This measures the ratio of objects whose visibility is very low. I don't think (num_bbox_below_vis_per_seq[k] + sum_bbox_per_seq[k]) could be zero since they are the number of objects in the video (=sequence). If your input video does not have any object, the problem would be occured. Please let me know if you have further questions.

Thanks for your reply. I have solved this problem, and it was caused by my dataset MOT17. There are many other detector versions in the folder. When I downloaded the dataset from your link, the problem was solved, and I knew the reason.

Good to hear that you solved the problem. Please let me know if you have other questions.