refactor
This commit is contained in:
1 parent
5727fb5cb2
commit
204a04a85f
1 file changed
+4
-4
@@ -150,10 +150,10 @@ def load_pascal_voc_annotations(
|
||||
|
||||
# Correction functions for VOC XML format as bounding boxes in VOC XML start at (1,1) not (0,0). Refer:
|
||||
# https://github.com/roboflow/supervision/issues/144
|
||||
x1 = int(bbox.find("xmin").text) - 1
|
||||
y1 = int(bbox.find("ymin").text) - 1
|
||||
x2 = int(bbox.find("xmax").text) - 1
|
||||
y2 = int(bbox.find("ymax").text) - 1
|
||||
x1 = int(bbox.find("xmin").text)
|
||||
y1 = int(bbox.find("ymin").text)
|
||||
x2 = int(bbox.find("xmax").text)
|
||||
y2 = int(bbox.find("ymax").text)
|
||||
|
||||
xyxy.append([x1, y1, x2, y2])
|
||||
|
||||
|
||||
Reference in new issue
Block a user