YOLOv3_TensorFlow icon indicating copy to clipboard operation
YOLOv3_TensorFlow copied to clipboard

train error

Open TristramAr opened this issue 6 years ago • 12 comments

when i use this project train my data ,i get an error as show below image my train.txt like this image

TristramAr avatar Jul 04 '19 12:07 TristramAr

your data is not "clean". perhaps some boxes are out of the image? Many people met this problem before, please take a search

wizyoung avatar Jul 04 '19 12:07 wizyoung

@wizyoung Thank you for your reply, I will check it out.

TristramAr avatar Jul 04 '19 12:07 TristramAr

I think your txt file is problematic. After the path to your image the next bit should be the label index. In your case that is 227. You are probably not training 227 classes, are you?

Checkout the info wizyoung provided:

"Generate train.txt/val.txt/test.txt files under ./data/my_data/ directory. One line for one image, in the format like image_index image_absolute_path img_width img_height box_1 box_2 ... box_n. Box_x format: label_index x_min y_min x_max y_max. (The origin of coordinates is at the left top corner, left top => (xmin, ymin), right bottom => (xmax, ymax).) image_index is the line index which starts from zero. label_index is in range [0, class_num - 1]."

JonasHendl avatar Jul 11 '19 12:07 JonasHendl

That's because your line lacks items or has to many. What is the 227 227 in your txt file? If they are not the label_index, i.e. the class, then delete them.

JonasHendl avatar Jul 11 '19 13:07 JonasHendl

That's because your line lacks items or has to many. What is the 227 227 in your txt file? If they are not the label_index, i.e. the class, then delete them.

227 227 is img_width img_height

TristramAr avatar Jul 11 '19 13:07 TristramAr

Skimmed over your post, although I only understand the text in English. The tensorflow implementation by wizyoung does not handle your format, does it?

I am not sure what you exactly trying to say, maybe I am misunderstanding you: "227 means the width and the height of single image, perhaps u made a mistake on the statement of author"

JonasHendl avatar Jul 11 '19 13:07 JonasHendl

Well, I am sorry. I was wrong.

JonasHendl avatar Jul 11 '19 15:07 JonasHendl

I have the same problem, did you find a solution? That's my train.txt file image I check the x_min y_min x_max y_max coordinates and they are right. Any idea?

jpff96 avatar Oct 10 '19 14:10 jpff96

You can try to check if the location tag is outside the image range when performing data enhancements.

jpff96 [email protected] 于2019年10月10日周四 下午10:09写道:

I have the same problem, did you find a solution? That's my train.txt file [image: image] https://user-images.githubusercontent.com/21125425/66576526-42ab2680-eb4e-11e9-901f-d7b2f0e17eb1.png I check the x_min y_min x_max y_max coordinates and they are right. Any idea?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wizyoung/YOLOv3_TensorFlow/issues/109?email_source=notifications&email_token=AKASFS6GXLKV73W7BKTKH3LQN4ZQBA5CNFSM4H5ZFVB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA4PSVQ#issuecomment-540604758, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKASFSZAH7T7F54D5Y4UHKTQN4ZQBANCNFSM4H5ZFVBQ .

TristramAr avatar Oct 11 '19 02:10 TristramAr

That's the issue! Thanks for the answer!

jpff96 avatar Oct 11 '19 15:10 jpff96

So how did you rectify it? @jpff96 I have the exact same error as you.

UsernameIsName-bot avatar Dec 21 '19 07:12 UsernameIsName-bot

I want to use yolov3 to predict the number of real-time person from the rtsp stream with suited interval,anyone has the right python file?

bujianyiwang avatar Jan 16 '20 06:01 bujianyiwang