georgesung / ssd_tensorflow_traffic_sign_detection

Implementation of Single Shot MultiBox Detector in TensorFlow, to detect and classify traffic signs
MIT License
530 stars 222 forks source link

why you want to transform the coords, In prepare training samples ? #19

Open guiyang882 opened 7 years ago

guiyang882 commented 7 years ago

In your data_prepare.py file, why you want to transform the coords ?

# Calculate normalized box coordinates and update y_true_loc
abs_box_center = np.array([col + 0.5, row + 0.5])  # absolute coordinates of center of feature map cell
abs_gt_box_coords = gt_box_coords * scale  # absolute ground truth box coordinates (in feature map grid)
norm_box_coords = abs_gt_box_coords - np.concatenate((abs_box_center, abs_box_center))
y_true_loc[y_true_idx*4 : y_true_idx*4 + 4] = norm_box_coords