Skip to content
Snippets Groups Projects
Unverified Commit ca7b3bf1 authored by marload's avatar marload Committed by GitHub
Browse files

Modify the code casting digit string as int to convert to float and t… (#2364)

* Modify the code casting digit string as int to convert to float and then to int

* Add Comment: Coordinates may be float type

* Fix: Indentation Error
parent 1d877f83
No related branches found
No related tags found
No related merge requests found
......@@ -47,11 +47,12 @@ class XMLDataset(CustomDataset):
label = self.cat2label[name]
difficult = int(obj.find('difficult').text)
bnd_box = obj.find('bndbox')
# Coordinates may be float type
bbox = [
int(bnd_box.find('xmin').text),
int(bnd_box.find('ymin').text),
int(bnd_box.find('xmax').text),
int(bnd_box.find('ymax').text)
int(float(bnd_box.find('xmin').text)),
int(float(bnd_box.find('ymin').text)),
int(float(bnd_box.find('xmax').text)),
int(float(bnd_box.find('ymax').text))
]
ignore = False
if self.min_size:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment