Export training data for deep learning

3600
14
11-05-2019 03:00 AM
MattiasTivlin
New Contributor III

Hi all!

I'm trying to learn about python and deep learning. I have tried to follow the sample notebooks and watch the training courses but now i'm stucked.

I have done some training samples in Arcgis Pro with the training samples manager and saved it as a shapefile.

Then i export the samples with GP-tool "Export Training Data For Deep Learning" with KITTI Labels as Meta Data Format.

In jupyter notebook i write this to load the samples

from arcgis.learn import prepare_data
data = prepare_data('Path to my samples')
data.show_batch

The error i get

~\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone4\lib\site-packages\arcgis\learn\_data.py in prepare_data(path, class_mapping, chip_size, val_split_pct, batch_size, transforms, collate_fn, seed, dataset_type, resize_to, **kwargs)

572 return ner_prepare_data(dataset_type=dataset_type, path=path, class_mapping=class_mapping, val_split_pct=val_split_pct)

573 else:

--> 574 raise NotImplementedError('Unknown dataset_type="{}".'.format(dataset_type))

575

576 if dataset_type == 'RCNN_Masks':

NotImplementedError: Unknown dataset_type="KITTI_rectangles".

What am i doing wrong?

Regards Mattias

0 Kudos
14 Replies
DanPatterson_Retired
MVP Emeritus

The error suggests that the details are to the path name you used.  If it was a shapefile did you add the *.shp file extension?  In any event more information on the file type and path name are needed

0 Kudos
MattiasTivlin
New Contributor III

Here's the export tool and to the right is the folders with images that was created. 

data = prepare_data('Output Folder/chips') so how should prepare_data look like?

0 Kudos
MattiasTivlin
New Contributor III
0 Kudos
DanPatterson_Retired
MVP Emeritus

you might want to try it through the python interface.  The warning beside the output folder name suggests something is amiss

Export Training Data For Deep Learning—Help | ArcGIS Desktop 

0 Kudos
MattiasTivlin
New Contributor III

I exported the training data via python interface but i got the same error when preparing data

0 Kudos
by Anonymous User
Not applicable

Mattias Tivlin‌ what kind of deep learning task do you want to do ? If it is an object detection task, you can try exporting data in the format 'pascal voc objects'.

0 Kudos
Javier_AntonioEscudero
Esri Contributor

Hi Mattias

  • Try to use metadata mode PASCAL VOC rectangles instead of KITTY rectangles.
  • Use PNG Format.
  • Replace all commas to points for each file in labels folder.

That worked for me.

Javier Escudero

MattiasTivlin
New Contributor III

Great! I will try that

0 Kudos
MattiasTivlin
New Contributor III

Its working now

Changed the comma to Points. Thank you so much for the help

0 Kudos