Commit a7fc8527 authored by Garry Lam's avatar Garry Lam Committed by darrenl
Browse files

fix issue #267 (YOLO output becomes all zero)

parent 9fd505c1
......@@ -33,11 +33,11 @@ class YOLOWriter:
ymin = box['ymin']
ymax = box['ymax']
xcen = (xmin + xmax) / 2 / self.imgSize[1]
ycen = (ymin + ymax) / 2 / self.imgSize[0]
xcen = float((xmin + xmax)) / 2 / self.imgSize[1]
ycen = float((ymin + ymax)) / 2 / self.imgSize[0]
w = (xmax - xmin) / self.imgSize[1]
h = (ymax - ymin) / self.imgSize[0]
w = float((xmax - xmin)) / self.imgSize[1]
h = float((ymax - ymin)) / self.imgSize[0]
classIndex = classList.index(box['name'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment