Train Deep learning model

388
1
11-24-2022 05:52 AM
MatějPROCHÁZKA
New Contributor

Hi , i need help with my problem. Thanks .

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 308, in execute
    data_bunch = prepare_data(in_folders, working_dir=out_folder, **prepare_data_kwargs)
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\_data.py", line 2240, in prepare_data
    ObjectDetectionItemList.from_folder(path / "images")
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\fastai\data_block.py", line 479, 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 303, 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 303, 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 325, in _get_bbox_lbls
    return _get_bbox_classes(
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\_data.py", line 269, in _get_bbox_classes
    float(bnd_box.find("xmin").text),
ValueError: could not convert string to float: '139,05'

During handling of the above exception, another exception occurred:

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 390, in <module>
    execute()
  File "c:\program files\arcgis\pro\Resources\ArcToolbox\toolboxes\Image Analyst Tools.tbx\TrainDeepLearningModel.tool\tool.script.execute.py", line 384, in execute
    del data_bunch
UnboundLocalError: local variable 'data_bunch' referenced before assignment
Failed script (null)...
Failed to execute (TrainDeepLearningModel).

 

0 Kudos
1 Reply
PavanYadav
Esri Contributor

Hello @MatějPROCHÁZKA 

I see

ValueError: could not convert string to float: '139,05'

Please correct me if I am wrong but I am guessing you used the Export Training Data tool when your Windows regional format was set to a Language that uses comma for decimal separator. This becomes a problem in the Training Deep Learning Models tool because this tool is expecting dots (periods) for commas.

It was a known problem in the Export Training Data tool because other Deep Learning tools don't support non-English languages yet. We have fixed this problem in the Export Training Data tool in v3.1. The tool will use dots for decimals.

For now to workaround this problem, you can either try replacing the commas with dots in the xml file or exporting out data with English regional settings. 

0 Kudos