Open YZAlex opened 5 years ago
You need to make a python script to convert image path and label from xml to yolo-keras format.
I added one script to do this. here
python convert_voc_annotation.py -t .\data\Annotations -i .\data\JPEGImages
give it folder path to xml files and images.
it outputs train.txt which contains the required annotations.
if you are not using voc dataset, you need to change those class names in the code. e.g. "aeroplane", "bicycle" etc...
I added one script to do this. here
python convert_voc_annotation.py -t .\data\Annotations -i .\data\JPEGImages
give it folder path to xml files and images. it outputs train.txt which contains the required annotations.if you are not using voc dataset, you need to change those class names in the code. e.g. "aeroplane", "bicycle" etc...
Thank you for sharing your script, it's helpful @bluesy7585
You need to make a python script to convert image path and label from xml to yolo-keras format.
Thanks a lot @yuki4ghub15
I added one script to do this. here
python convert_voc_annotation.py -t .\data\Annotations -i .\data\JPEGImages
give it folder path to xml files and images. it outputs train.txt which contains the required annotations.if you are not using voc dataset, you need to change those class names in the code. e.g. "aeroplane", "bicycle" etc...
Nice. Could you please tell me how much the line number of trian_annotation.txt?
I have made a text file for the anchor boxes which looks like this: C:\path\00000002.jpg 0.33999999999999997,0.6900000000000001,0.7225,0.26,1 0.7775,0.40249999999999997,0.91,0.265,1 0.68,0.97,0.84,0.8025,1 .. (path x1,y1,x2,y2,class) I have made it by myself with converting the form from txt file which was like this: (class x y width height) *Used a different annotator
Now when I try to run the train.py and put the path to my txt file for my anchors, classes,the path to my foldaer with the photos and the output folder its gives me ERROR :
Using TensorFlow backend.
2019-11-13 08:17:06.054804: I C:\tf_jenkins\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
.................................
Traceback (most recent call last):
File "train.py", line 190, in
What should I do ?
Just replace train.txt
with the path to the annotation file...
we can use labelImg tool to generate xml annotation files, but how to get the annotation file mentioned in the README.md : path/to/img1.jpg 150,200,130,250,0 110,250,165,145,1
can anybody teach me the method , thanks a lot......