Borda / keras-yolo3

A Keras implementation of YOLOv3 (Tensorflow backend) a successor of qqwweee/keras-yolo3
MIT License
31 stars 10 forks source link

random box in uilts.py? #12

Closed zhoujinhai closed 5 years ago

zhoujinhai commented 5 years ago

I am troubled, the box_data becomes 0 after random preprocessing for real-time data augmentation. Will this affect the training? the later are the output in function get_random_data() in uilts.py.

box:  [[344 424  71 210   1]
 [209 335  25 124   0]] len box:  2
not random box_data:  [[173. 330.  20. 155.   0.]
 [286. 404.  59. 226.   1.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]
 [  0.   0.   0.   0.   0.]] len box:  20
random box_data:  [[0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0.]] len box:  20
Borda commented 5 years ago

I would say if there is no desired object in the training image then it return this empty case... I guess that this should not affect the training process unless majority of your training images are empty

Borda commented 5 years ago

@zhoujinhai could you provide sample code to replicate your case? thx

zhoujinhai commented 5 years ago

Thanks, I have solved it, It my data problem.