thtrieu / darkflow

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices
GNU General Public License v3.0
6.13k stars 2.08k forks source link

Unable to train tiny-yolo using dakflow with google colabaratory #912

Open balajimasilamai opened 6 years ago

balajimasilamai commented 6 years ago

I am trying to train the tiny-yolo for the custom data set but it gives the below error. kindly help me on this issue

Errror: cfg/tiny-yolo-voc-1c.cfg parsing new_model_data/annotations Parsing for ['NFPA'] [> ]1% pos92.xmlTraceback (most recent call last): File "./flow", line 6, in cliHandler(sys.argv) File "/content/drive/My Drive/darkflow/darkflow/cli.py", line 33, in cliHandler print('Enter training ...'); tfnet.train() File "/content/drive/My Drive/darkflow/darkflow/net/flow.py", line 39, in train for i, (x_batch, datum) in enumerate(batches): File "/content/drive/My Drive/darkflow/darkflow/net/yolo/data.py", line 97, in shuffle data = self.parse() File "/content/drive/My Drive/darkflow/darkflow/net/yolo/data.py", line 18, in parse dumps = pascal_voc_clean_xml(ann, meta['labels'], exclusive) File "/content/drive/My Drive/darkflow/darkflow/utils/pascal_voc_clean_xml.py", line 37, in pascal_voc_clean_xml tree=ET.parse(in_file) File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 1196, in parse tree.parse(source, parser) File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 597, in parse self._root = parser._parse_whole(source) xml.etree.ElementTree.ParseError: no element found: line 1, column 0

mpky commented 5 years ago

File I/O with Colab is pretty brutal. Are you mounting your drive folder?

1nfinityLoop commented 4 years ago

i had the same problem and Upon further inspection of the program, it appears that the file that was causing to fail was an empty file