Closed daddydrac closed 4 years ago
Math formula that will correct output goes in “darkchocolate” key in JSON, on line 18 in dark_chocolate.py file:
x_center, y_center = ( left + bbox_width / 2, top + bbox_height / 2) # darknet expects relative values wrt image width & height x_rel, y_rel = (x_center / width, y_center / height) w_rel, h_rel = (bbox_width / width, bbox_height / height) Output: (cat_id, x_rel, y_rel, w_rel, h_rel)
Math formula that will correct output goes in “darkchocolate” key in JSON, on line 18 in dark_chocolate.py file: