Hi there,
I am using ArcGIS Pro 2.9 and have installed the deep learning framework.
I extracted frames from a multiplexed video and labelled objects using the Deep Learning Wizard. I exported the training data as TIFFs using RCNN masks.
When trying to train the deep learning model using the siam mask model, I get the following 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 296, 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 2280, in prepare_data
data = prepare_pro_data(path, batch_size, val_split_pct)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\_utils\object_tracking_data.py", line 1371, in prepare_pro_data
check_pro_data_sanity(path)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\_utils\object_tracking_data.py", line 1365, in check_pro_data_sanity
f"Please input at least two sequences in the {path.name}"
Exception: Please input at least two sequences in the Training_samples directory namely 'labels'.
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 378, in <module>
execute()
File "c:\program files\arcgis\pro\Resources\ArcToolbox\toolboxes\Image Analyst Tools.tbx\TrainDeepLearningModel.tool\tool.script.execute.py", line 372, in execute
del data_bunch
UnboundLocalError: local variable 'data_bunch' referenced before assignment
Failed script (null)...
Failed to execute (TrainDeepLearningModel).
I am able to train a MaskRCNN model with the same training samples though. Anyone finding the same issues?
cheers,
Javier
Solved! Go to Solution.
Hi Xabierr -
Siam mask is not really an object detector model but a tracker model. …. So Siam mask is not really a class but a sequence . We need a sequence of images (path of the trail) … so a way to do this is create at least 2 classes (sequence 1 and sequence 2 ) where each sequence is a no. of continuous polygons that are from 1 frame after the other . The model trains from the sequence not just from the object(car).
Basically Siam mask needs at least 2 classes so the error will go away if you create a second class.
Moved to Imagery and Remote Sensing Questions
Also, did you see/follow this
Track objects using SiamMask | ArcGIS Developer
Hi Xabierr -
Siam mask is not really an object detector model but a tracker model. …. So Siam mask is not really a class but a sequence . We need a sequence of images (path of the trail) … so a way to do this is create at least 2 classes (sequence 1 and sequence 2 ) where each sequence is a no. of continuous polygons that are from 1 frame after the other . The model trains from the sequence not just from the object(car).
Basically Siam mask needs at least 2 classes so the error will go away if you create a second class.