chenxinpeng / SSD_scene_text_detection

Detect text in natural images with SSD, Single Shot Detection
225 stars 103 forks source link

Unable to read existing xml files (create_annoset.py), Why?!! #7

Open MyVanitar opened 7 years ago

MyVanitar commented 7 years ago

When I run the create_lmdbdata.sh, I get two errors related to the .xml files in train and test folders.

it says:

annotation file: /home/hesam/Desktop/img/val/annot/0269.xml does not exist
annotation file: /home/hesam/Desktop/img/train/annot/0156.xml does not exist

These paths are exist in first lines of trainval.txtandtest.txt. it means the program stuck in the first line.

The error comes from the create_annoset.py file and it seems it does not recognize .xml files.

It seems it does not have any problem with .jpgfiles.

But both paths are correct and files are exist there. Why I get this error?! very strange :-(

HongyiDuanmu26 commented 6 years ago

Did you solve it? I got the same problem with you.

MyVanitar commented 6 years ago

if the path are correct (make sure), then the problem is that the xmls are generated in the Windows and windows uses different mechanism for txt files. you can convert all to the Linux format but now I can not remember its command but you can find in the search easily

HongyiDuanmu26 commented 6 years ago

Thank you so much for your reply! Yes that’s the reason and I solved it. I generated the txt in windows and they have different mechanisms for \r or \n. In windows and Linux. Thank you again!

MyVanitar commented 6 years ago

Bingo :-) You're welcome