ssaru / convert2Yolo

This project purpose is convert voc annotation xml file to yolo-darknet training file format
458 stars 182 forks source link

VOC Parsing error about 'utf-8' #6

Closed raggot closed 6 years ago

raggot commented 6 years ago

I was trying to run your example.py, and gave all relevant arguments to it. This is what I get as an error:

VOC Parsing Result : False, msg : ERROR : 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte, moreInfo : <class 'UnicodeDecodeError'> Format.py 232

Do you have any idea why this could be? Thanks.

ssaru commented 6 years ago

would you give some your sample to me? like label, image and your command line i will try check it

thanks!

raggot commented 6 years ago

This is the code I ran. I actually won't pursue this issue with more info because I ended up making my own script using darknet's script and already solved the problem.

python3 example.py --datasets VOC --img_path /folder --label /folder --convert_output_path /folder --img_type ".jpg" --cls_list_file /folder/classes.names

ssaru commented 6 years ago

it's nice! :+1:

this problem look like file read issue so if you give some label sample for me i can improve my code thanks!

raggot commented 6 years ago

My label was a 1 liner only. I was training with a single class, let's call it person for what it matters. Perhaps your 'search' assumed there were multiple lines? Another possible thing (I can't check because I'm on another PC at the moment) is that the .names file contained a '-' character. Something like my-classes.names.

Hope these help. Thanks for sharing your code.

lionverve2015 commented 5 years ago

@raggot How did you fix this problem: python3 example.py --datasets KITTI --img_path /KITTI/images_new --label /KITTI/labels --convert_output_path ~/kitti --img_type ".jpg" --cls_list_file KITTI/my-classes.names KITTI Parsing Result : False, msg : ERROR : , moreInfo : <class 'StopIteration'> Format.py 484

Please share. Thank You

raggot commented 5 years ago

Hey sorry but it was too long ago. Good luck.

7thstorm commented 5 years ago

So, I'm a bit confused, I'm still getting this error: VOC Parsing Result : False, msg : ERROR : 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte, moreInfo : <class 'UnicodeDecodeError'> Format.py 234

I have 4 classes in my voc.names file

I'm using: python3 example.py --datasets VOC --img_path /home/rc/test_convert/ --label /home/rc/test_convert/ --convert_output_path /home/rc/yolo/converted/ --img_type ".jpg" --manipast_path /home/rc/test_convert/ --cls_list_file /home/rc/test_convert/voc.names