I'm new to Google Earth Engine and Google AI Platform. A model was previously trained and published to AI platform and be imported to Earth Engine for image classification. The trained model successfully classified landcover in the specified area into 5 classes, however, I faced some problems when I was trying to export the classified images to my Google Drive.
Below is the script I have so far. An error message of 'Cannot export array bands' jumped out when I tried to export the result.
How can I export the labeled image and the probability maps?
var model_1985 = ee.Model.fromAiPlatformPredictor({
projectId : 'most-308413',
modelName : 'Mostcnn_1985',
version : 'v0',
inputTileSize : [100, 100],
proj : ee.Projection('EPSG:4326').atScale(30),
fixInputProj : true,
outputBands : {'landclass': {
'type': ee.PixelType.float(),
'dimensions': 1}
}
});
var predictions_1985 = model_1985.predictImage(array_image_1985);
var label_1985 = predictions_1985.arrayArgmax().arrayGet([0]).rename('label');
var probabilities_1985 = predictions_1985.arrayFlatten([["builtup","barren","cultivated","water","vegetation"]]);
Export.image.toDrive({
image: predictions_1985,
description: 'dl_classified_1985',
folder: 'GEE',
region: Clip_Extent,
scale:20,
crs: 'EPSG:4326',
})