Closed KaushikNathMIT closed 6 years ago
The error appears because the height (h) and width (w) variables of the bounding box are infinitesimally small. This applies to the yolo_net_out_to_car_boxes function in the utils.py file. The code below clears up the error, because (a*b)^x = a^x + b^x, and the nan will be replaced by 0.
if np.isnan(cords[grid, b, 2] ** sqrt):
bx.w = np.exp(cords[grid, b, 2] + sqrt)
else:
bx.w = cords[grid, b, 2] ** sqrt
if np.isnan(cords[grid, b, 3] ** sqrt):
bx.h = np.exp(cords[grid, b, 3] + sqrt)
else:
bx.h = cords[grid, b, 3] ** sqrt
Can I ask a funny question? where shoula i insert these codes??I have try many times,but could not walk
In draw box function in utils.py, error starting from line 105. "Can't convert float nan to integer "