Open ZhouJiaHuan opened 6 years ago
cool
Thanks a lot! I think the code ymin = 0 if (xcenter - w/2.0 < 0) else (xcenter - w/2.0) should be ymin = 0 if (ycenter - h/2.0 < 0) else (ycenter - h/2.0) and plot_result(src_img, predicts_dict) should be plot_result(resized_img, predicts_dict)
@nonstopparty yes, you are right, It is my mistake and i have modified it. But for the plot_result(src_img, predicts_dict), I thought it is ok. This function is used for plotting the bounding boxes on source image. And the code below (in function plot_result()) has transformed the coordinate.
xmin, ymin, xmax, ymax, score = box
src_xmin = xmin * width_ratio
src_ymin = ymin * height_ratio
src_xmax = xmax * width_ratio
src_ymax = ymax * height_ratio
Thanks.
@ZhouJiaHuan Yes,src_img is ok, I didn't notice that the function plot_result has already transformed the coordinate.
I am not sure if there is any problems in this code, At least it runs successfully in my pc. I hope this could help anyone who needs it. And I will be appreciate it if anyone could give some advice.