hizhangp / yolo_tensorflow

Tensorflow implementation of YOLO, including training and test phase.
MIT License
799 stars 442 forks source link

A question about test.py #81

Open Polaris-SDU opened 6 years ago

Polaris-SDU commented 6 years ago

Hello, I have benefited greatly from this open source project. Thank you for this elegant code.

(1 ) I found that the following code (in yolo_tensorflow/test.py) may be not rigorous.

2018-10-30 11-21-04 The upper code is used to obtain the index of class (which has the highest class probability) for each predicted bounding box that class-specific confidence score >= 0.2

(2) During detection, I print(np.transpose(filter_mat_boxes)) 2018-10-30 15-12-29 (3) Then i print (probs_filtered) 2018-10-30 15-15-19 (4) Finally i print (classes_num_filtered), but i found the result is 2018-10-30 15-17-42 For the bounding box (4, 3, 0) and (4, 3, 1), the class index apparently should be 14 based on probs_filtered

In a word, i think the "classes_num_filtered" should be modified to: 2018-10-30 15-37-44 After modification, I print (classes_num_filtered), the result is: 2018-10-30 15-41-17

For example, we want to detect the following picture by YOLO 1

If we detect the picture without modification, the result is: 2

But if we detect the same picture with modification, the result is: 1

Maybe my comprehension is wrong. Could you give me a reasonable interpretation. Thank you in advance~ @hizhangp