Train deep learning model _ xml or text declaration not at start of entity: line 1, column 1
See original GitHub issueFirst, I apology for any english errors, and if my issue doesn’t belong here, please fell free to give me directions on where to post it.
Describe the bug I am trying to train a deep learning model to detect cracks on concrete images. I’m using ArcGis Pro and its tools (export training data, train deep learning model, detect object using deep learning model). For a while, the training computes just fine, but i wasn’t happy with the results. I decided to try to use RetinaNet instead of SSD in the model type, and i have the follow error :
< Traceback (most recent call last):
File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\TrainDeepLearningModel.py", line 145, in <module>
execute()
File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\TrainDeepLearningModel.py", line 110, in execute
data_bunch = prepare_data(in_folder, **prepare_data_kwargs)
File "C:\Users\SIEXT5646\AppData\Local\ESRI\conda\envs\deeplearning\Lib\site-packages\arcgis\learn\_data.py", line 522, in prepare_data
.label_from_func(get_y_func)
File "C:\Users\SIEXT5646\AppData\Local\ESRI\conda\envs\deeplearning\Lib\site-packages\fastai\data_block.py", line 472, in _inner
self.train = ft(*args, from_item_lists=True, **kwargs)
File "C:\Users\SIEXT5646\AppData\Local\ESRI\conda\envs\deeplearning\Lib\site-packages\fastai\data_block.py", line 296, in label_from_func
return self._label_from_list([func(o) for o in self.items], label_cls=label_cls, **kwargs)
File "C:\Users\SIEXT5646\AppData\Local\ESRI\conda\envs\deeplearning\Lib\site-packages\fastai\data_block.py", line 296, in <listcomp>
return self._label_from_list([func(o) for o in self.items], label_cls=label_cls, **kwargs)
File "C:\Users\SIEXT5646\AppData\Local\ESRI\conda\envs\deeplearning\Lib\site-packages\arcgis\learn\_data.py", line 129, in _get_bbox_lbls
return _get_bbox_classes(xmlfile, class_mapping, not_label_count, height_width)
File "C:\Users\SIEXT5646\AppData\Local\ESRI\conda\envs\deeplearning\Lib\site-packages\arcgis\learn\_data.py", line 97, in _get_bbox_classes
tree = ET.parse(xmlfile)
File "C:\Users\SIEXT5646\AppData\Local\ESRI\conda\envs\deeplearning\Lib\xml\etree\ElementTree.py", line 1196, in parse
tree.parse(source, parser)
File "C:\Users\SIEXT5646\AppData\Local\ESRI\conda\envs\deeplearning\Lib\xml\etree\ElementTree.py", line 597, in parse
self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: XML or text declaration not at start of entity: line 1, column 1
Échec de l’exécution de (TrainDeepLearningModel).>
Here is a screenshot with the parameters used for more informations :
Also, the training data were created using the ‘export training data for deep learning’ tool, and I have already used them for training (only with SSD), so it shouldn’t be any problem with them.
Can somebody tell me what could be the problem ? Thank you
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top GitHub Comments
could you help me to find a solution for this errors , please???
Env: ArcGIS Pro 2.5 and ArcGIS version 1.8.0
I tested the same with some data exported using the export training data tool, it works fine at my end. If you can provide more details about your versions, I can look into it. One suggestion is to restart ArcGIS Pro and try running RetinaNet model training again.