با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
APIهای یادگیری ماشین
یادگیری ماشین (ML) یک تکنیک قدرتمند برای تجزیه و تحلیل داده های رصد زمین است. Earth Engine دارای قابلیتهای داخلی است که به کاربران اجازه میدهد مدلهای ML را برای سناریوهای رایج با استفاده از APIهای آسان بسازند و استفاده کنند.
یک کار رایج ML طبقه بندی پیکسل ها در تصاویر ماهواره ای به دو یا چند دسته است. این رویکرد برای نقشه برداری پوشش زمین کاربری زمین و سایر برنامه های کاربردی محبوب مفید است.
طبقهبندی نظارت شده: یکی از تکنیکهای ML برای طبقهبندی زمین، استفاده از نمونههای حقیقت زمینی برای آموزش مدلی برای تمایز بین طبقات است. طبقهبندیکنندههای داخلی موتور زمین از این فرآیند پشتیبانی میکنند.
طبقه بندی بدون نظارت: در طبقه بندی بدون نظارت، هیچ مثالی از صدق زمینی به الگوریتم آموزشی ارائه نمی شود. در عوض، الگوریتم داده های موجود را بر اساس تفاوت های ذاتی به خوشه ها تقسیم می کند. طبقهبندیکنندههای بدون نظارت Earth Engine بهویژه زمانی مفید هستند که دادههای درستی زمینی وجود نداشته باشد، زمانی که تعداد نهایی کلاسها را نمیدانید یا زمانی که میخواهید آزمایش سریع انجام دهید.
رگرسیون: در حالی که یک مدل طبقهبندی سعی میکند هر ورودی را در یک کلاس گسسته قرار دهد، یک مدل رگرسیون تلاش میکند یک متغیر پیوسته را برای هر ورودی پیشبینی کند. به عنوان مثال، یک مدل رگرسیون می تواند کیفیت آب، درصد پوشش جنگلی، درصد پوشش ابر یا عملکرد محصول را پیش بینی کند. برای اطلاعات بیشتر، لطفاً به بخش رگرسیون خطی ee.Reducers مراجعه کنید.
آموزش و پیش بینی خارج از موتور زمین
یادگیری عمیق و شبکه های عصبی تکنیک های یادگیری ماشینی هستند که می توانند برای داده های پیچیده مانند تصاویر ماهواره ای به خوبی کار کنند. نه یادگیری عمیق و نه شبکههای عصبی در APIهای یادگیری ماشین Earth Engine پشتیبانی نمیشوند. در عوض، برای استفاده از آنها، باید از چارچوبی مانند TensorFlow یا PyTorch استفاده کنید و مدل خود را خارج از Earth Engine آموزش دهید.
اگر قبلاً با چارچوبی مانند scikit-learn برای یادگیری ماشین کلاسیک یا XGBoost برای درختان تصمیم تقویت شده گرادیان آشنا هستید، ممکن است بخواهید خارج از Earth Engine نیز آموزش دهید.
در نهایت، اگر مجموعه دادههای شما بسیار زیاد است و از محدودیتهای مستند شده در زیر فراتر میرود، ممکن است بخواهید مدلی را خارج از Earth Engine آموزش دهید.
از طرف دیگر، برای مثالی از نحوه بارگیری داده ها با استفاده از پرتو Apache، میزبانی شده در Google Cloud Dataflow، سپس آموزش در Vertex AI با استفاده از TensorFlow، لطفاً از آموزش طبقه بندی پوشش زمین دیدن کنید و همراه با دفترچه یادداشت colab همراه باشید.
دریافت پیش بینی از یک مدل خارج از موتور زمین
اگر مدلی را خارج از Earth Engine آموزش دهید، چند گزینه برای پیشبینی از آن مدل دارید.
بسته ee.Model از Earth Engine امکان پیشبینی با استفاده از دادهها در Earth Engine و یک مدل آموزشدیده شده بر روی Vertex AI Google را میدهد. می توانید مدل آموزش دیده سفارشی خود را در Vertex AI میزبانی کنید و استنتاج را مستقیماً در Earth Engine با استفاده از ee.Model.fromVertexAi انجام دهید. برای اطلاعات بیشتر به اتصال به مدل های میزبانی شده در Vertex AI مراجعه کنید.
روش دیگر، آموزش طبقهبندی پوشش زمین نشان میدهد که چگونه میتوانید با استفاده از یک سرویس ابری مانند توابع ابری پیشبینی کنید.
دلایل دیگر برای آموزش مدل های خارج از Earth Engine
علاوه بر آشنایی و اولویت، اگر میخواهید از معماریهای مدل (مثلاً شبکههای عصبی کانولوشن) استفاده کنید که توسط APIهای یادگیری ماشین Earth Engine پشتیبانی نمیشوند، اگر میخواهید از ویژگیهای Vertex AI بیشتری استفاده کنید یا اگر با محدودیتهای مقیاسبندی با APIهای یادگیری ماشین Earth Engine مواجه هستید، ممکن است بخواهید مدلی را خارج از Earth Engine آموزش دهید.
محدودیت های مجموعه آموزشی
آموزش با استفاده از ee.Classifier یا ee.Clusterer عموماً با مجموعه داده تا 100 مگابایت مؤثر است. به عنوان یک دستورالعمل بسیار تقریبی، با فرض دقت 32 بیتی (یعنی شناور)، این میتواند مجموعه دادههای آموزشی را برآورده کند (که در آن n تعداد نمونهها و b تعداد باندها است):
nb ≤ (100 * 2 20 ) / 4
به عنوان یک مثال، اگر با استفاده از 100 باند تمرین می کنید، تعداد نمونه های استفاده شده برای تمرین باید کمتر از 200000 باشد.
محدودیت های استنتاج
از آنجایی که Earth Engine کاشیهای تصویر 256x256 را پردازش میکند، درخواستهای استنتاج در تصاویر باید کمتر از 400 باند داشته باشند (باز هم با فرض دقت 32 بیتی تصاویر).
شما می توانید یک طبقه بندی کننده را بیش از یک بار مجدداً آموزش دهید تا مجموعه داده برای هر دوره آموزشی را در محدوده نگه دارید.
علاوه بر این، خود مدل باید کمتر از 100 مگابایت باشد. بسیاری از طبقه بندی کننده های ما را می توان به گونه ای پیکربندی کرد که پیچیدگی و در نتیجه اندازه آنها را محدود کند. به عنوان مثال:
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eEarth Engine provides built-in supervised and unsupervised machine learning APIs for tasks like land cover classification using satellite imagery.\u003c/p\u003e\n"],["\u003cp\u003eFor deep learning, neural networks, or large datasets, training models outside of Earth Engine with frameworks like TensorFlow or PyTorch is recommended.\u003c/p\u003e\n"],["\u003cp\u003eEarth Engine's \u003ccode\u003eee.Model\u003c/code\u003e package enables predictions within Earth Engine using models hosted on Google's Vertex AI.\u003c/p\u003e\n"],["\u003cp\u003eTraining datasets for Earth Engine's built-in classifiers are generally limited to 100 MB, and inference requests are limited to fewer than 400 bands.\u003c/p\u003e\n"],["\u003cp\u003eModel size is limited to 100 MB, but many classifiers offer configuration options to manage complexity and size.\u003c/p\u003e\n"]]],["Earth Engine's Machine Learning (ML) APIs support supervised and unsupervised classification, and regression. For complex tasks like deep learning, train models outside of Earth Engine using frameworks like TensorFlow, exporting data via TFRecord or Apache Beam. For prediction, use `ee.Model` with models hosted on Vertex AI, or external cloud services. Training datasets are generally limited to 100MB (e.g. \u003c200,000 examples with 100 bands) and models to 100MB. Earth Engine processes in 256x256 image tiles, limiting inference requests to fewer than 400 bands.\n"],null,["# Machine Learning in Earth Engine\n\n**Note:** This overview assumes familiarity with basic Machine Learning (ML) concepts like training, prediction and models. The introduction to Machine Learning video on this page provides an introduction to these concepts. Alternatively, please take a look at Google's [Machine Learning Crash Course](https://developers.google.com/machine-learning/crash-course). \n\nMachine Learning APIs\n---------------------\n\n\nMachine Learning (ML) is a powerful technique for analyzing Earth\nObservation data. Earth Engine has built-in capabilities to allow users to\nbuild and use ML models for common scenarios with easy-to-use APIs.\n\n\nA common ML task is to classify the pixels in satellite imagery into two\nor more categories. The approach is useful for Land Use Land Cover mapping\nand other popular applications.\n\n- **Supervised Classification:** One ML technique for classifying land is to use ground truth examples to teach a model to differentiate between classes. Earth Engine's built-in [supervised classifiers](/earth-engine/guides/classification) support this process.\n- **Unsupervised Classification:** In unsupervised classification, no ground truth examples are provided to the training algorithm. Instead, the algorithm divides the available data into clusters based on inherent differences. Earth Engine's [unsupervised classifiers](/earth-engine/guides/clustering) are particularly useful when no ground truth data exists, when you do not know the final number of classes or when you want to do quick experimentation.\n- **Regression:** Whereas a classification model attempts to bucket each input into a discrete class, a regression model attempts to predict a continuous variable for each input. For example, a regression model could predict water quality, percent forest cover, percent cloud cover or crop yield. For more information, please refer to the [Linear Regression section of ee.Reducers](/earth-engine/guides/reducers_regression).\n\nTraining and Prediction outside Earth Engine\n--------------------------------------------\n\n\nDeep learning and neural networks are machine-learning techniques that can\nwork well for complex data like satellite imagery. Neither deep learning\nnor neural networks are supported in Earth Engine's Machine Learning APIs.\nInstead, to take advantage of them, you will need to use a framework like\nTensorFlow or PyTorch and train your model outside of Earth Engine.\n\n\nYou may also want to train outside of Earth Engine if you are already\nfamiliar with a framework like scikit-learn for classical machine learning\nor XGBoost for gradient boosted decision trees.\n\n\nFinally, you may want to train a model outside Earth Engine if your data\nset is very large and exceeds the limits documented below.\n| **Note:** Training and prediction outside of Earth Engine require working with products that may require payment for both commercial and non-commercial use. Additionally, they require knowledge of Google Cloud Platform.\n\n### Exporting Data from Earth Engine for Training\n\n- The [TFRecord data format](/earth-engine/guides/tfrecord) is optimized for training in TensorFlow. The [machine learning examples page includes several TensorFlow workflows](/earth-engine/guides/ml_examples) that demonstrate how to train a model using TFRecords.\n- Alternatively, for an example of how to download data using Apache Beam, hosted in Google Cloud Dataflow, then train in Vertex AI using TensorFlow, please visit the [Land Cover Classification tutorial](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/people-and-planet-ai/land-cover-classification) and follow along with a [colab notebook.](https://colab.research.google.com/github/GoogleCloudPlatform/python-docs-samples/blob/main/people-and-planet-ai/land-cover-classification/README.ipynb)\n\n### Getting Predictions from a Model outside Earth Engine\n\n\nIf you train a model outside Earth Engine, you have a few options for\ngetting predictions from that model.\n\n- Earth Engine's `ee.Model` package allows for predictions using data in Earth Engine and a trained model hosted on Google's Vertex AI. You can host your custom trained model in Vertex AI and perform inference directly in Earth Engine using [`ee.Model.fromVertexAi`](/earth-engine/apidocs/ee-model-fromvertexai). See [Connecting to models hosted on Vertex AI](/earth-engine/guides/ee-vertex#connecting-to-models-hosted-on-vertex-ai) for more information.\n- Alternatively, the [Land Cover Classification tutorial](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/people-and-planet-ai/land-cover-classification) demonstrates how you can do predictions using a cloud service like Cloud Functions.\n\n### Other Reasons to train models outside Earth Engine\n\n\nIn addition to familiarity and preference, you may want to train a model\noutside Earth Engine if you want to use model architectures (e.g.\nconvolutional neural networks) that are not supported by Earth Engine's\nMachine Learning APIs, if you want to use more features of Vertex AI or if\nyou encounter scaling limits with Earth Engine's Machine Learning APIs.\n\n#### Training Set Limits\n\n\nTraining using `ee.Classifier` or `ee.Clusterer` is\ngenerally effective with datasets up to 100 MB. As a very rough\nguideline, assuming 32-bit (i.e. float) precision, this can accommodate\ntraining datasets that satisfy (where *n* is the number of examples and\n*b* is the number of bands):\n\n\n*nb ≤ (100 \\* 2 ^20^) / 4*\n\n\nAs one example, if you train using 100 bands, the number of examples used\nfor training should be less than 200,000.\n\n#### Inference Limits\n\n\nSince Earth Engine processes 256x256 image tiles, inference requests on\nimagery must have fewer than 400 bands (again, assuming 32-bit precision of\nthe imagery).\n\n\nYou can retrain a classifier more than once to keep the dataset for each\ntraining run within limits. \n\n```javascript\n var trainings = ee.List.sequence(0, 3).map(function(cover) {\n return image.addBands(landcover.eq(cover).stratifiedSample(...)\n })\n\n var classifier = ee.Classifier.smileCart()\n .train(trainings.get(0), \"cover\")\n .train(trainings.get(1), \"cover\")\n .train(trainings.get(2), \"cover\")\n .train(trainings.get(3), \"cover\")\n \n```\n\n#### Limits on Model Size\n\n\nAdditionally, the model itself must be less than 100 MB. Many of our\nclassifiers can be configured to limit their complexity and hence, size.\nFor example: \n\n```javascript\n var classifier = ee.Classifier.smileRandomForest({\n numberOfTrees: 10,\n minLeafPopulation: 10,\n maxNodes: 10000\n })\n \n```"]]