autogluon / autogluon/autogluon

ObjectDetector.Dataset.from_voc ZeroDivisionError: float division by zero

Open
#1,240 4 comments 0 reactions 1 assignee Claimed by @zhreshold View on GitHub
bug: unconfirmed question
Dominant language
Python
Stars
10.7k
Forks
1.2k
Avg merge
21h 29m
Merged PRs (30d)
57

Description

Hi,

I try to set up an object detector training with
dataset_train = ObjectDetector.Dataset.from_voc(data_root, splits='trainval')
with data_root structure like this :

Annotations
ImageSets
Main
test.txt
trainval.txt
JPEGImages
classes.txt
And I got the error :
File "Training_v2.py", line 12, in
dataset_train = ObjectDetector.Dataset.from_voc(data_root, splits='trainval')
File "/home/penta/.local/lib/python3.8/site-packages/gluoncv/auto/data/dataset.py", line 486, in from_voc
xmin = max(0, float(xml_box.find('xmin').text) - 1) / width
ZeroDivisionError: float division by zero

My Dataset worked fine with previous version 0.1 of autogluon when I was using
dataset_train = ObjectDetector.Dataset(data_root, classes=('sacs','pots','meubles','cartons','matelas','palette','caddy','bidon','chaise','electromenager',))

I haven't found the detail of the ObjectDetector.Dataset.from_voc function in the documentation so I can't check if this is the correct arguments to give to the function.

Regards.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.