arcgis-python-api
arcgis-python-api copied to clipboard
Exception: Enter only compatible datasets from Labeled_Tiles, MultiLabeled_Tiles
Describe the bug
Getting the error Exception: Enter only compatible datasets from Labeled_Tiles, MultiLabeled_Tiles while trying to run a FeatureClassifier
model on the NWPU-RESISC45 data.
To Reproduce Steps to reproduce the behavior:
import os, json
from arcgis.learn import prepare_data, FeatureClassifier
data_path = os.path.join(os.getcwd(), "NWPU-RESISC45")
data = prepare_data(
path=data_path, dataset_type="Imagenet", batch_size=32, val_split_pct=0.2
)
model = FeatureClassifier(data, oversample=True)
error:
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_21316\2252118473.py in <module>
----> 1 model = FeatureClassifier(data, oversample=True)
D:\Python Projects\Honda-Invoice\app\lib\site-packages\arcgis\learn\models\_classifier.py in __init__(self, data, backbone, pretrained_path, mixup, oversample, backend, *args, **kwargs)
136 raise Exception (f"Enter only compatible backbones from {', '.join(self.supported_backbones)}")
137
--> 138 self._check_dataset_support(self._data)
139
140 self._code = feature_classifier_prf
D:\Python Projects\Honda-Invoice\app\lib\site-packages\arcgis\learn\models\_arcgis_model.py in _check_dataset_support(self, data)
468 if hasattr(data, 'dataset_type'):
469 if getattr(data, 'dataset_type') not in self.supported_datasets:
--> 470 raise Exception(f"Enter only compatible datasets from {', '.join(self.supported_datasets)}")
471
472 def _arcgis_init_callback(self):
Exception: Enter only compatible datasets from Labeled_Tiles, MultiLabeled_Tiles
Screenshots
Expected behavior The model should have started training. I followed the steps exactly outlined in this notebook: https://github.com/Esri/arcgis-python-api/blob/master/samples/04_gis_analysts_data_scientists/image_scene_classification_using_feature_classifier.ipynb
Platform (please complete the following information):
- OS: [e.g. iOS] Windows
- Browser [e.g. chrome, safari] chrome
- Python API Version [e.g.
1.6.2
] 1.8.4
Additional context The data is RESISC45 Dataset outlined in the notebook.
Kindly help.