I have been able to train a deep learning model (Yolo v3) in ArcGIS Pro. The model seems fine, as can be seen below. It's not perfect but was trained with a small amount of data.
However, it does not seem to work for inference. I am using the "Detect objects using deep learning" tool on the same image it was trained on to test the model, and specifying the model .emd. Everything runs fine and it produces a feature layer as expected. However, I've tried different combinations of parameters and the feature layer is always empty - no object detected. Even if I do the inference on a display extent where there a lot of objects (and this is the same imagery that was used for training so I should detect something).
I am puzzled. Why doesn't my trained model detect anything?
#### copy-pasted from .emd file
{
"Framework": "arcgis.learn.models._inferencing",
"InferenceFunction": "[Functions]System\\DeepLearning\\ArcGISLearn\\ArcGISObjectDetector.py",
"ModelConfiguration": "_yolov3_inference",
"ModelType": "ObjectDetection",
"ExtractBands": [
0,
1,
2,
3
],
"ModelParameters": {
"anchors": [
[
8,
10
],
[
24,
39
],
[
73,
42
],
[
71,
118
],
[
180,
103
],
[
128,
226
],
[
276,
179
],
[
235,
303
],
[
368,
371
]
],
"n_bands": 4,
"backbone": "DarkNet53",
"backend": "pytorch"
},
"Classes": [
{
"Value": 1,
"Name": "Pine",
"Color": [
124,
120,
159
]
}
],
"ModelFormat": "NCHW",
"MinCellSize": {
"x": 0.029999999999998857,
"y": 0.03000000000000922,
"spatialReference": {
"wkt": "PROJCS[\"WGS_1984_UTM_Zone_18N\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",500000.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-75.0],PARAMETER[\"Scale_Factor\",0.9996],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0]],VERTCS[\"unknown\",VDATUM[\"unknown\"],PARAMETER[\"Vertical_Shift\",0.0],PARAMETER[\"Direction\",1.0],UNIT[\"Meter\",1.0]]"
}
},
"MaxCellSize": {
"x": 0.029999999999998857,
"y": 0.03000000000000922,
"spatialReference": {
"wkt": "PROJCS[\"WGS_1984_UTM_Zone_18N\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",500000.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-75.0],PARAMETER[\"Scale_Factor\",0.9996],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0]],VERTCS[\"unknown\",VDATUM[\"unknown\"],PARAMETER[\"Vertical_Shift\",0.0],PARAMETER[\"Direction\",1.0],UNIT[\"Meter\",1.0]]"
}
},
"SupportsVariableTileSize": false,
"ArcGISLearnVersion": "2.0.1",
"monitored_valid_loss": 153.23129272460938,
"ModelFile": "detect_pines_3cm_512.pth",
"ImageHeight": 512,
"ImageWidth": 512,
"ImageSpaceUsed": "MAP_SPACE",
"LearningRate": "slice('3.9811e-05', '3.9811e-04', None)",
"ModelName": "YOLOv3",
"backend": "pytorch",
"accuracy": {
"Pine": 0.4481547301495272
},
"resize_to": null,
"IsMultispectral": true,
"Bands": [
"",
"",
"",
""
],
"ImageryType": "MultiSpectral",
"NormalizationStats": {
"band_min_values": [
0.0,
0.0,
0.0,
0.0
],
"band_max_values": [
255.0,
255.0,
255.0,
255.0
],
"band_mean_values": [
94.2491226196289,
98.7134017944336,
65.65867614746094,
254.9991455078125
],
"band_std_values": [
36.213584899902344,
37.29859161376953,
34.38850021362305,
0.46285802125930786
],
"scaled_min_values": [
0.0,
0.0,
0.0,
0.0
],
"scaled_max_values": [
1.0,
1.0,
1.0,
1.0
],
"scaled_mean_values": [
0.3696043789386749,
0.3871113657951355,
0.2574850022792816,
0.9999966025352478
],
"scaled_std_values": [
0.1420140564441681,
0.14626897871494293,
0.13485684990882874,
0.0018151294207200408
]
},
"DoNormalize": true
}
Hi, same problem here. Did you manage to solve it?
@EtienneLaliberté @AndresMoreno Have you been able to fix this issue? If not, can you try with a small threshold e.g. 0.1 and see with this, you can get any objects detected?
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/
Same issue here. Any solution? @EtienneLaliberté @AndresMoreno