Select to view content in your preferred language

ERROR WHEN TRAINING DEEP MODEL

2336
17
09-21-2022 06:04 PM
Labels (1)
AthuleSali
New Contributor II

Hello everyone...

I'm new in arcgis pro and am trying to create a deep learning model so now im stuck in training the model and im getting this error:

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-clone-Athu_DL\Lib\site-packages\arcgis\learn\_data.py", line 1440, in prepare_data
raise Exception(
Exception: Could not infer dataset type. Please specify a supported dataset type or ensure that the path contains valid esri files

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
17 Replies
DanPatterson
MVP Esteemed Contributor

Which of the required inputs are you using?

Train Deep Learning Model (Image Analyst)—ArcGIS Pro | Documentation


... sort of retired...
0 Kudos
AthuleSali
New Contributor II

I used the results folder that I got from exported training data for deep learning.

PavanYadav
Esri Contributor

hi @AthuleSali 

This error indicates the issue is with the input data: Exception: Could not infer dataset type. Please specify a supported dataset type or ensure that the path contains valid esri files

Can you please share screen captures the following?
1. input folder contents

2. stats.txt

3. The Train Deep Learning Tool with parameters filled (or, even better if you can share the command. You can copy the python command from the history)?

Thanks

Pavan

 

Pavan Yadav
Product Engineer at Esri
AI for Imagery
Connect with me on LinkedIn!
Contact Esri Support Services
AthuleSali
New Contributor II

Hellow @PavanYadav 

Thanks for trying to assist, my mistake was really on the input data but I fixed it thank you so much.

AlexaVerónicaGarcíaBarrantes
New Contributor II

Hello AthuleSali

Im having the same issue, what did you do to fix it?

0 Kudos
FirdevsGuzel
New Contributor

I'm getting the same error as you right now. Could you please explain how you fixed it?

0 Kudos
GBacon
by
Occasional Contributor

@FirdevsGuzel  I fixed the error by selecting the higher level folder "EvergreenTrain" that contained both the \images and \labels subfolders in my post below. I was incorrectly trying to add the subfolders rather than their parent folder.

FirdevsGuzel
New Contributor

Thank you for your quick reply. I get the same life when I select the main folder. Do you have any suggestions on what I can do?

0 Kudos
GBacon
by
Occasional Contributor

All I can think of if you haven't done it already, is to start a new Pro project and try again. I got stuck with these errors until I started over.

0 Kudos