Failed to run "Train deep learning model" using dlpk

643
1
Jump to solution
01-12-2023 04:26 AM
Labels (2)
LinoyZagrizakHarpaz
New Contributor

Hey all
I'm trying to run a train to a deep learning model. I follow this blog using a different data set (palm tree DLPK). I created training data using "label object using deep learning" followed by "extract data for deep learning." I looked at the DLPK .emd file to ensure the format I equivalent, and yet when I run the "train deep learning model," and I get this messages:

Start Time: Monday, January 9, 2023 3:54:36 PM
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 328, in execute
training_model_object = training_model.from_model(pretrained_model_path, data_bunch)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\models\_faster_rcnn.py", line 692, in from_model
frcnn = cls(data, backbone, pretrained_path=str(model_file), **kwargs)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\models\_faster_rcnn.py", line 546, in __init__
self._check_dataset_support(data)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\models\_arcgis_model.py", line 620, in _check_dataset_support
raise Exception(
Exception: Enter only compatible datasets from PASCAL_VOC_rectangles, KITTI_rectangles

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 385, in execute
del training_model_object
UnboundLocalError: local variable 'training_model_object' referenced before assignment
Failed script (null)...
Failed to execute (TrainDeepLearningModel).
Failed at Monday, January 9, 2023 3:54:37 PM (Elapsed Time: 1.03 seconds)

I'm using arcgis pro 2.9 and instuld the phyton "ProDeepLearning" for 2.9 from this page.

I would appreciate your advice on the matter!

0 Kudos
1 Solution

Accepted Solutions
PavanYadav
Esri Contributor

@LinoyZagrizakHarpaz 

Model Type and Metadata Type should match.

Please see the error Exception: Enter only compatible datasets from PASCAL_VOC_rectangles, KITTI_rectangles. 

https://www.arcgis.com/home/item.html?id=916e02960d9e495baeb4d1d2ff4055d0 is a fasterrnn model. To fine tune it, your training data should be in PASCAL_VOC_rectangles or KITTI_rectangles metadata format. Hope this helps

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

Cheers!

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

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

 

View solution in original post

1 Reply
PavanYadav
Esri Contributor

@LinoyZagrizakHarpaz 

Model Type and Metadata Type should match.

Please see the error Exception: Enter only compatible datasets from PASCAL_VOC_rectangles, KITTI_rectangles. 

https://www.arcgis.com/home/item.html?id=916e02960d9e495baeb4d1d2ff4055d0 is a fasterrnn model. To fine tune it, your training data should be in PASCAL_VOC_rectangles or KITTI_rectangles metadata format. Hope this helps

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

Cheers!

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

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