facebookresearch / maskrcnn-benchmark

Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch.
MIT License
9.31k stars 2.49k forks source link

ZeroDivisionError: float division by zero Error During Training #751

Open MrDemeanor opened 5 years ago

MrDemeanor commented 5 years ago

❓ Questions and Help

I have several 11,000 x 11,000 images that contain many COCO styled annotations; in some cases there are upwards of 5000 annotations per image.

Using the default _trainnet.py, I can load my images and annotations and start the training process, but encounter a ZeroDivisonError. I have heard that Detectron Benchmark resizes images to 1024 x 1024. If this is true, my speculation is that because we are going from such a large image to such a relatively small image, and because there are so many annotations (of which are small as well), the annotations are practically being resized to zero, or very close to zero which is causing the training sequence to fail.

Can anyone verify that Detectron Benchmark resizes images to 1024 x 1024? Upon first glance, is my assumption/speculation plausible? If so, then perhaps a contextual resizing layer, or completely bypassing the resizing operation, would come in handy.

JunnnnChen commented 4 years ago

I met the same issue. Did you solve it?