Unit 5 / 11

Remote Sensing and Satellite Image Classification

Gains:

  • Ability to explain how multispectral satellite data, band combinations and spectral indices (NDVI etc.) are used with AI
  • Ability to configure supervised/unsupervised classification and land cover mapping workflow with AI support
  • Ability to test classification output with ground truth and error matrix/accuracy criteria

Remote sensing is the science of measuring the earth's surface without physical contact, with sensors on satellites or aerial platforms. A satellite image is not actually a photograph, but a collection of layers of measurements recorded at multiple wavelengths, and by intelligently combining these layers, land cover (forest, water, agriculture, construction) can be mapped. In this unit, we cover how artificial intelligence accelerates this workflow, from multispectral data to land cover classification, and where expert judgment is indispensable. Principle: AI generates or codes the classification; The accuracy of the map is measured in the engineer by independent ground truth and error matrix.

Basic terms. A multispectral image is one recorded in several wavelength bands (blue, green, red, near infrared, etc.); each band is a layer. Hyperspectral is much richer but difficult to process data, containing tens to hundreds of narrow bands. Spectral index is the number that highlights a phenomenon through the mathematical combination of bands; the most well-known, NDVI (Normalized Difference Vegetation Index), measures green vegetation vigor using the difference between the near infrared and the red band. Supervised classification involves training the model with pre-labeled sample areas and classifying the entire image. Unsupervised classification is clustering data based on similarity without labels and interpreting it later.

The Role of AI in Remote Sensing

Artificial intelligence contributes in this field at three levels:

  1. Workflow and method selection. "Which bands, which index, which classifier are suitable for this question?" guides you in your decision; produces the code skeleton.
  2. The classification itself. Modern deep learning models sort millions of pixels into land cover classes; This is the medium-high contribution area where AI does the real work.
  3. Result interpretation and reporting. It transcribes class statistics, change analysis and accuracy report into readable text.

Blind spot: the model is dependent on the data it is trained on and the examples you provide. Cloud shadow and water, bare soil and post-harvest field, shallow water and wet ground mix easily. So a classification map is not true just because it looks nice; accuracy must be measured.

Tip: Clarify your question before you start classifying. "Classify land cover" is vague; "Map the loss of agricultural land in favor of construction between 2020-2025" determines both the class set and the verification criterion.

Step by Step: A Land Cover Classification

  1. Prepare data and tapes. Confirm the image's cloud cover, shooting date, resolution (pixel size), and band order. Different date/season changes classes.
  2. Define the class set. How many classes, which ones (water, forest, agriculture, construction, bare ground)? Fewer and more distinguishable classes are more reliable.
  3. Calculate the indices. Indices such as NDVI (plant), NDWI (water) distinguish the classes; becomes input to the classifier.
  4. Collect training samples (for supervised). Sample polygons confirmed by terrain verification for each class. Sample quality determines accuracy.
  5. Classify and verify. Train the model, then build an error matrix with independent (untrained) samples and calculate overall accuracy and Kappa.

Ground Truth and Error Matrix

The accuracy of a classification is not measured by eye judgement. Ground truth is independent samples of known true class in the field or in a reliable high-resolution source. With these examples, a confusion matrix is ​​established: it is counted how many times each class is correct and how many times it is confused with which class. From this, overall accuracy (the proportion correctly classified) and Kappa (a measure of agreement that corrects for the effect of chance) are calculated. In addition, producer accuracy (how much was caught in that class) and user accuracy (how reliable is that class) are reported on a class basis.

Caution: Do not measure accuracy with the examples you use for training. If the same examples train and test, accuracy becomes artificially high; This is an illusion. Validation samples must be independent.

Three Mini Cases: By the Numbers

Case 1 — Cloud shadow was mistaken for water. In one classification, when the model labeled cloud shadows as "water," the lake area grew where it actually wasn't; user accuracy of the water class dropped to 70%. When the NDWI index and cloud mask were added, shadow/water interference decreased and water accuracy increased to over 90%.

Case 2 — Report recovered by ground truth. An agricultural inventory study reported 82% overall accuracy of initial classification, but this was measured with training samples. When remeasured with 120 independent ground truth points, the actual overall accuracy was 71%; Agriculture and bare ground were seriously interfering. With additional training examples, classification was improved and accuracy increased to 84%. Lesson: accuracy is measured by independent sample.

Case 3 — Seasonal trap. When images taken on two different dates (spring and late summer) were mixed together, the harvested fields shifted to the "bare ground" class and the agricultural area appeared to be 15% missing. The results improved when images were selected from the same season and phenological consistency was achieved.

Weak Prompt / Strong Prompt

Weak prompt:

Classify this satellite image.

Powerful prompt:

Task: build a land cover classification workflow (including Python/rasterio + scikit-learn code skeleton).Context:- Sensor: 4 bands (blue, green, red, NIR), 10 m resolution- Classes: water, forest, agriculture, construction, bare_ground- Purpose: current land cover map + accuracy reportRequests:1) Which spectral indices (NDVI, NDWI) to add and why write.2) List the supervised classification steps; Emphasize that training and VALIDATION samples should be SEPARATE.3) Put the error matrix + overall accuracy + Kappa calculation in the code skeleton.4) Note the risks of cloud/shadow and season confusion.

The strong prompt specifies the class set, resolution, index rationale, and validation distinction; the output becomes measurable.

Four Copiable Templates

1) Method/index selection:

What spectral index and classification method would you recommend for the objective [target] and sensor [bands/resolution]? For each choice, write the rationale and potential risk of confusion (which classes are similar to each other).

2) Classification code skeleton:

Write a supervised classification framework with Rasterio + scikit-learn: tape reading, index calculation, SEPARATION of training/validation samples, classification, error matrix and accuracy output. Maintain CRS; explain.

3) Accuracy evaluation setup:

Write a plan to evaluate classification accuracy: independent groundtruth sample design, error matrix, overall accuracy, Kappa, producer/user accuracy by class. Explain what each metric says.

4) Interference diagnosis:

Interpret the error matrix below: which classes are interfering with each other, what is the possible spectral/seasonal reason, what additional data (index, mask, date) would reduce confusion? Matrix: [error matrix]

Comparison of Classification Concepts

concept

Meaning

when

supervised

Training with labeled example

Classes are predetermined

Unsupervised

Label-free clustering

Discovery, no examples

NDVI

plant vitality index

Plant/bare/water separation

NDWI

water index

water body separation

Error matrix

True/false count

accuracy measurement

kappa

Chance-corrected fit

Standard accuracy report

Common mistakes

  • Measuring accuracy with training examples. Non-independent testing gives artificially high accuracy.
  • Handing over the map without ever measuring accuracy. "Looks nice" is not proof of accuracy.
  • Skipping the cloud/shadow mask. Shadow mixes with water, cloud mixes with snow/structure.
  • Mixing different season/date images. Phenological differences shift classes.
  • Defining too many and similar classes. Indistinguishable classes reduce accuracy.
  • Ignoring resolution. Small objects cannot be classified if they are smaller than a single pixel.

In summary

In remote sensing, AI speeds up the workflow from multispectral data to land cover mapping and can take over much of the classification. But a classification map is only useful if its accuracy is measured: it is standard to construct an error matrix with independent ground truth samples and calculate overall accuracy and Kappa. Cloud/shadow, seasonal variation, and similar classes are typical sources of interference; Manage them with index, mask and date consistency. Never mix training and validation samples.

Application task

Select a land cover question (e.g. "urban green space map"). Write down the class set, the bands and indices you will use (at least NDVI). Have AI produce a supervised classification workflow; make sure that the training and validation samples are separate and the error matrix + Kappa calculation is included in the output. Then make a "risk of confusion" list: which two classes are similar and how you tell them apart.

checklist

  • [ ] I kept the class set small and distinguishable.
  • [ ] I added spectral indices (NDVI/NDWI) suitable for the purpose.
  • [ ] I separated training and validation examples.
  • [ ] I checked cloud/shadow mask and season consistency.
  • [ ] I measured accuracy with independent ground truth.
  • [ ] I reported the error matrix, overall accuracy, and Kappa.
  • [ ] I diagnosed and cured class mix-ups.
  • [ ] I have subjected it to engineer approval that the map is accurate for its intended use.