question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Train deep learning model _ xml or text declaration not at start of entity: line 1, column 1

See original GitHub issue

First, 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 : image

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:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
hallafaridcommented, Jul 11, 2020

could you help me to find a solution for this errors , please???

1reaction
priyankatutejacommented, Jun 12, 2020

image

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

XML Parsing Error: XML or text declaration not at start of entity
is show between the left side of the page and the ?xml line. In my rss.php I have <?php header("Content-type: text/ ...
Read more >
Sitemap error: XML or text declaration not at start of entity - Yoast
This issue typically happens when a plugin or theme function incorrectly adds empty whitespace at the beginning of the sitemap.
Read more >
XML or text declaration not at start of entity - 2 spaces included ...
XML is including 2 spaces at the start of the file Example URL : http://sample.local/api/rest/car/cars The XML output is including 2 spaces ...
Read more >
XML Parsing Error: XML or text declaration not at start ... - MSDN
Hello, I have error "XML Parsing Error: XML or text declaration not at start of entity. Line Number 8, Column 1:" and checking...
Read more >
Train Deep Learning Model (Image Analyst)—ArcGIS Pro
Class values for input training data must start at 1. This model type can only be trained using a CUDA-enabled GPU. YOLOv3 (Object...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found