Failed to execute "Train Deep Learning Model"

1070
5
03-12-2021 01:26 AM
Labels (3)
VitaRashchuk
New Contributor II

Errors and warnings:

Traceback (most recent call last):
File "c:\program files\arcgis\pro\Resources\ArcToolbox\toolboxes\Image Analyst Tools.tbx\TrainDeepLearningModel.tool\tool.script.execute.py", line 232, in <module>
execute()
File "c:\program files\arcgis\pro\Resources\ArcToolbox\toolboxes\Image Analyst Tools.tbx\TrainDeepLearningModel.tool\tool.script.execute.py", line 170, in execute
data_bunch = prepare_data(in_folder, **prepare_data_kwargs)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\_data.py", line 1211, in prepare_data
.label_from_func(get_y_func)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\fastai\data_block.py", line 475, in _inner
self.train = ft(*args, from_item_lists=True, **kwargs)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\fastai\data_block.py", line 299, in label_from_func
return self._label_from_list([func(o) for o in self.items], label_cls=label_cls, **kwargs)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\fastai\data_block.py", line 299, in <listcomp>
return self._label_from_list([func(o) for o in self.items], label_cls=label_cls, **kwargs)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\_data.py", line 226, in _get_bbox_lbls
return _get_bbox_classes(label_file, class_mapping, height_width, dataset_type=dataset_type)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\_data.py", line 195, in _get_bbox_classes
xmin, ymin, xmax, ymax = float(bnd_box.find('xmin').text), \
ValueError: could not convert string to float: '321,12'
Failed to execute (TrainDeepLearningModel).

Thanks for any help=)

Tags (2)
0 Kudos
5 Replies
Tim_McGinnes
Occasional Contributor III

The source of the problem is that the Export Training Data For Deep Learning tool is using your Windows regional settings when exporting the training data. If you have decimal points set as commas then the numbers will be exported as shown: 321,12.

Unfortunately the prepare_data python script is expecting decimal points as points: 321.12. Until ESRI fixes the problem you may have to change your language or decimal point setting in Windows and export the training data again.

SveinNjøsLagård
New Contributor II

Hi there!

I suffer with the same error as the author and have changed my decimals from "," to "." in windows settings, but after a new export the commas where there still.. Do you know if I'll need to start a new project?


0 Kudos
talebbenEsriPublic
New Contributor II
Hello, I have the same problem, did you find the solution?
Thanks
0 Kudos
Tim_McGinnes
Occasional Contributor III

@SveinNjøsLagård @talebbenEsriPublic 

Changing the language may not be enough - somewhere in your Windows regional settings there should be a setting for the decimal symbol - make sure it is set to the point and not the comma. You will have to export your training data again.

Tim_McGinnes_0-1645501740617.png

I would suggest a reboot after doing this, and maybe starting a new project in Pro as well.

0 Kudos
SveinNjøsLagård
New Contributor II

Tried these steps but where not enough. Chould neither change settings in ArcGIS Pro, (dont know if it's region locked due to school license?) But ended up with script that solved the issiue:

Script1.png

Nevertheless thank you for trying to help and answering!

Tags (1)
0 Kudos