Failure when trying train deep learning model

316
1
06-07-2023 06:49 AM
DimasPratamaPutra
New Contributor

I failed to execute train deep learning model and this is the error message. Please help me

Train Deep Learning Model
=====================
Parameters

Input Training Data 'C:\Dimas\11. Astra Agro Lestari\Probation\Palm_Tree_Detection\Kolovai\imagechips'
Output Model C:\Dimas\11. Astra Agro Lestari\Probation\Palm_Tree_Detection\Kolovai\classifypalm
Max Epochs 50
Model Type SSD
Batch Size 64
Model Arguments grids #;zooms 1.0;ratios '[1.0, 1.0]';chip_size 224;resize_to #;monitor valid_loss
Learning Rate
Backbone Model RESNET34
Pre-trained Model
Validation % 10
Stop when model stops improving CONTINUE_TRAINING
Output Model
Freeze Model FREEZE_MODEL
=====================
Environments

Processor Type GPU
=====================
Messages

Start Time: Wednesday, 07 June 2023 20:28:05
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: '335,91'

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).
Failed at Wednesday, 07 June 2023 20:28:05 (Elapsed Time: 0,45 seconds)

Tags (2)
0 Kudos
1 Reply
PavanYadav
Esri Contributor

Hi @DimasPratamaPutra 

Notice, "ValueError: could not convert string to float: '335,91'" in the above error. 

Looks like when the training data was created your OS or ArcGIS Pro language was set to a language that uses command for decimal. 

The Train Deep Learning tool currently only support 'period' for decimal. In the older releases of ArcGIS Pro, the Export Training Data tool used to use language setting for numbers. In newer release, the tool  use dot for decimal. Hope this helps.

A side note: We have an ArcGIS Image Analyst dedicated community and here you might get response sooner on your imagery related questions.

Cheers!

Pavan Yadav | Product Engineer - Imagery and AI
Esri | 380 New York | Redlands, 92373 | USA

https://www.linkedin.com/in/pavan-yadav-1846606/ 

 

0 Kudos