머신러닝 (ML)은 지구 관측 데이터를 분석하는 강력한 기술입니다. Earth Engine에는 사용자가 사용하기 쉬운 API로 일반적인 시나리오에서 ML 모델을 빌드하고 사용할 수 있게 해주는 기본 제공 기능이 있습니다.
일반적인 ML 태스크는 위성 이미지의 픽셀을 두 개 이상의 카테고리로 분류하는 것입니다. 이 접근 방식은 토지 이용 및 토지 피복 매핑 및 기타 인기 있는 애플리케이션에 유용합니다.
지도 분류: 토지를 분류하는 한 가지 ML 기법은 실제 예시를 사용하여 모델에 클래스를 구분하는 방법을 가르치는 것입니다. Earth Engine의 기본 제공 지도 분류는 이 프로세스를 지원합니다.
비지도 분류: 비지도 분류에서는 학습 알고리즘에 정답 예시가 제공되지 않습니다. 대신 알고리즘은 고유한 차이를 기반으로 사용 가능한 데이터를 클러스터로 분할합니다. Earth Engine의 비지도 분류기는 지상 진실 데이터가 없거나 최종 클래스 수를 알 수 없거나 빠르게 실험하려는 경우에 특히 유용합니다.
회귀: 분류 모델은 각 입력을 개별 클래스로 분류하려고 시도하는 반면, 회귀 모델은 각 입력에 대해 연속 변수를 예측하려고 시도합니다. 예를 들어 회귀 모델은 수질, 숲 면적 비율, 구름 면적 비율 또는 작물 수확량을 예측할 수 있습니다. 자세한 내용은 ee.Reducers의 선형 회귀 섹션을 참고하세요.
Earth Engine 외부에서 학습 및 예측
딥 러닝과 신경망은 위성 이미지와 같은 복잡한 데이터에 효과적으로 작동하는 머신러닝 기술입니다. Earth Engine의 머신러닝 API에서는 딥 러닝이나 신경망이 지원되지 않습니다.
대신 이러한 기능을 활용하려면 TensorFlow 또는 PyTorch와 같은 프레임워크를 사용하고 Earth Engine 외부에서 모델을 학습시켜야 합니다.
기존 머신러닝을 위한 scikit-learn 또는 그래디언트 부스티드 결정 트리를 위한 XGBoost와 같은 프레임워크에 이미 익숙한 경우 Earth Engine 외부에서 학습하는 것이 좋습니다.
마지막으로 데이터 세트가 매우 커서 아래에 설명된 한도를 초과하는 경우 Earth Engine 외부에서 모델을 학습하는 것이 좋습니다.
또는 Google Cloud Dataflow에 호스팅된 Apache Beam을 사용하여 데이터를 다운로드한 후 TensorFlow를 사용하여 Vertex AI에서 학습시키는 방법의 예를 보려면 지형지물 분류 튜토리얼을 방문하여 Colab 노트북을 따라 진행하세요.
Earth Engine 외부의 모델에서 예측 가져오기
Earth Engine 외부에서 모델을 학습하는 경우 해당 모델에서 예측을 가져오는 몇 가지 옵션이 있습니다.
Earth Engine의 ee.Model 패키지를 사용하면 Earth Engine의 데이터와 Google의 Vertex AI에 호스팅된 학습된 모델을 사용하여 예측할 수 있습니다.
Vertex AI에서 커스텀 학습 모델을 호스팅하고 ee.Model.fromVertexAi를 사용하여 Earth Engine에서 직접 추론을 실행할 수 있습니다.
자세한 내용은 Vertex AI에 호스팅된 모델에 연결하기를 참고하세요.
또는 지형지물 분류 튜토리얼에서 Cloud Functions와 같은 클라우드 서비스를 사용하여 예측하는 방법을 확인할 수 있습니다.
Earth Engine 외부에서 모델을 학습해야 하는 다른 이유
익숙함과 선호도 외에도 Earth Engine의 머신러닝 API에서 지원되지 않는 모델 아키텍처 (예: 컨볼루션 신경망)를 사용하려는 경우, Vertex AI의 더 많은 기능을 사용하려는 경우 또는 Earth Engine의 머신러닝 API에서 확장 제한이 발생하는 경우 Earth Engine 외부에서 모델을 학습하는 것이 좋습니다.
학습 세트 한도
ee.Classifier 또는 ee.Clusterer를 사용한 학습은 일반적으로 최대 100MB의 데이터 세트에서 효과적입니다. 매우 대략적인 가이드라인으로, 32비트 (즉, 부동 소수점 수) 정밀도를 가정하면 다음을 충족하는 학습 데이터 세트를 수용할 수 있습니다 (여기서 n은 예시 수이고 b는 밴드 수임).
nb ≤ (100 * 2 20) / 4
예를 들어 100개 밴드를 사용하여 학습하는 경우 학습에 사용되는 예시 수는 200,000개 미만이어야 합니다.
추론 한도
Earth Engine은 256x256 이미지 타일을 처리하므로 이미지에 대한 추론 요청은 400개 미만의 밴드를 보유해야 합니다 (다시 말해 이미지의 정밀도가 32비트라고 가정).
분류기를 두 번 이상 재학습하여 각 학습 실행의 데이터 세트를 한도 내로 유지할 수 있습니다.
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\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```"]]