ঘোষণা :
15 এপ্রিল, 2025 এর আগে আর্থ ইঞ্জিন ব্যবহার করার জন্য নিবন্ধিত সমস্ত অবাণিজ্যিক প্রকল্পগুলিকে অ্যাক্সেস বজায় রাখার জন্য
অবাণিজ্যিক যোগ্যতা যাচাই করতে হবে। আপনি যদি 26 সেপ্টেম্বর, 2025 এর মধ্যে যাচাই না করে থাকেন তবে আপনার অ্যাক্সেস হোল্ডে রাখা হতে পারে।
মতামত জানান
Export.classifier.toAsset
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
আর্থ ইঞ্জিন সম্পদ হিসাবে একটি ee.Classifier রপ্তানি করার জন্য একটি ব্যাচ টাস্ক তৈরি করে৷
শুধুমাত্র ee.Classifier.smileRandomForest, ee.Classifier.smileCart, ee.Classifier.DecisionTree এবং ee.Classifier.DecisionTreeEnsemble-এর জন্য সমর্থিত৷
ব্যবহার রিটার্নস Export.classifier.toAsset(classifier, description , assetId , priority )
যুক্তি টাইপ বিস্তারিত classifier
কম্পিউটেড অবজেক্ট রপ্তানি করার জন্য শ্রেণীবদ্ধকারী। description
স্ট্রিং, ঐচ্ছিক টাস্কের একটি মানব-পাঠযোগ্য নাম। "myExportClassifierTask" এ ডিফল্ট। assetId
স্ট্রিং, ঐচ্ছিক গন্তব্য সম্পদ আইডি। priority
নম্বর, ঐচ্ছিক প্রকল্পের মধ্যে কাজের অগ্রাধিকার. উচ্চ অগ্রাধিকারের কাজগুলি শীঘ্রই নির্ধারিত হয়। 0 এবং 9999 এর মধ্যে একটি পূর্ণসংখ্যা হতে হবে। ডিফল্ট 100।
উদাহরণ কোড এডিটর (জাভাস্ক্রিপ্ট)
// First gather the training data for a random forest classifier.
// Let's use MCD12Q1 yearly landcover for the labels.
var landcover = ee . ImageCollection ( 'MODIS/061/MCD12Q1' )
. filterDate ( '2022-01-01' , '2022-12-31' )
. first ()
. select ( 'LC_Type1' );
// A region of interest for training our classifier.
var region = ee . Geometry . BBox ( 17.33 , 36.07 , 26.13 , 43.28 );
// Training features will be based on a Landsat 8 composite.
var l8 = ee . ImageCollection ( 'LANDSAT/LC08/C02/T1' )
. filterBounds ( region )
. filterDate ( '2022-01-01' , '2023-01-01' );
// Draw the Landsat composite, visualizing true color bands.
var landsatComposite = ee . Algorithms . Landsat . simpleComposite ({
collection : l8 ,
asFloat : true
});
Map . addLayer ( landsatComposite , {
min : 0 ,
max : 0.3 ,
bands : [ 'B3' , 'B2' , 'B1' ]
}, 'Landsat composite' );
// Make a training dataset by sampling the stacked images.
var training = landcover . addBands ( landsatComposite ). sample ({
region : region ,
scale : 30 ,
// With export to Classifier we can bump this higher to say 10,000.
numPixels : 1000
});
var classifier = ee . Classifier . smileRandomForest ({
// We can also increase the number of trees higher to ~100 if needed.
numberOfTrees : 3
}). train ({ features : training , classProperty : 'LC_Type1' });
// Create an export classifier task to run.
var assetId = 'projects/<project-name>/assets/<asset-name>' ; // <> modify these
Export . classifier . toAsset ({
classifier : classifier ,
description : 'classifier_export' ,
assetId : assetId
});
// Load the classifier after the export finishes and visualize.
var savedClassifier = ee . Classifier . load ( assetId )
var landcoverPalette = '05450a,086a10,54a708,78d203,009900,c6b044,dcd159,' +
'dade48,fbff13,b6ff05,27ff87,c24f44,a5a5a5,ff6d4c,69fff8,f9ffa4,1c0dff' ;
var landcoverVisualization = {
palette : landcoverPalette ,
min : 0 ,
max : 16 ,
format : 'png'
};
Map . addLayer (
landsatComposite . classify ( savedClassifier ),
landcoverVisualization ,
'Upsampled landcover, saved' ); পাইথন সেটআপ
পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap
ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।
import ee
import geemap.core as geemap Colab (পাইথন)
# First gather the training data for a random forest classifier.
# Let's use MCD12Q1 yearly landcover for the labels.
landcover = ( ee . ImageCollection ( 'MODIS/061/MCD12Q1' )
. filterDate ( '2022-01-01' , '2022-12-31' )
. first ()
. select ( 'LC_Type1' ))
# A region of interest for training our classifier.
region = ee . Geometry . BBox ( 17.33 , 36.07 , 26.13 , 43.28 )
# Training features will be based on a Landsat 8 composite.
l8 = ( ee . ImageCollection ( 'LANDSAT/LC08/C02/T1' )
. filterBounds ( region )
. filterDate ( '2022-01-01' , '2023-01-01' ))
# Draw the Landsat composite, visualizing true color bands.
landsatComposite = ee . Algorithms . Landsat . simpleComposite (
collection = l8 , asFloat = True )
Map = geemap . Map ()
Map # Render the map in the notebook.
Map . addLayer ( landsatComposite , {
'min' : 0 ,
'max' : 0.3 ,
'bands' : [ 'B3' , 'B2' , 'B1' ]
}, 'Landsat composite' )
# Make a training dataset by sampling the stacked images.
training = landcover . addBands ( landsatComposite ) . sample (
region = region ,
scale = 30 ,
# With export to Classifier we can bump this higher to say 10,000.
numPixels = 1000
)
# We can also increase the number of trees higher to ~100 if needed.
classifier = ee . Classifier . smileRandomForest (
numberOfTrees = 3 ) . train ( features = training , classProperty = 'LC_Type1' )
# Create an export classifier task to run.
asset_id = 'projects/<project-name>/assets/<asset-name>' # <> modify these
ee . batch . Export . classifier . toAsset (
classifier = classifier ,
description = 'classifier_export' ,
assetId = asset_id
)
# Load the classifier after the export finishes and visualize.
savedClassifier = ee . Classifier . load ( asset_id )
landcover_palette = [
'05450a' , '086a10' , '54a708' , '78d203' , '009900' ,
'c6b044' , 'dcd159' , 'dade48' , 'fbff13' , 'b6ff05' ,
'27ff87' , 'c24f44' , 'a5a5a5' , 'ff6d4c' , '69fff8' ,
'f9ffa4' , '1c0dff' ]
landcoverVisualization = {
'palette' : landcover_palette ,
'min' : 0 ,
'max' : 16 ,
'format' : 'png'
}
Map . addLayer (
landsatComposite . classify ( savedClassifier ),
landcoverVisualization ,
'Upsampled landcover, saved' )
মতামত জানান
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License -এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License -এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
আমাদের আরও কিছু জানাতে চান?
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],["This content details exporting an `ee.Classifier` as an Earth Engine asset using `Export.classifier.toAsset`. Key actions include: creating a classifier, defining a training dataset using landcover data and Landsat composites, sampling training data, and then training the classifier. The export process involves specifying the `classifier`, `description`, `assetId`, and `priority`. After export, the saved classifier can be loaded and used for classification, then visualized.\n"]]