U-Net (256 × 256 patches, step 128) for LULC Segmentation on IntegraCAR-LULC-500

This model is a U-Net trained for land use and land cover (LULC) semantic segmentation of high-resolution optical satellite imagery from the state of Espírito Santo, Brazil. It was trained on 256 × 256 pixel patches extracted with a step of 128 pixels from the IntegraCAR-LULC-500 dataset, the public 500-tile benchmark subset of IntegraCAR-LULC-10K, and is one of the baselines reported in the paper "IntegraCAR-LULC-10K: A High-Resolution Optical Satellite Dataset for LULC Segmentation in the Brazilian Rural Environmental Registry" (SIBGRAPI 2026).

The model was built with the official training code: integraCAR/IntegraCAR-LULC-10K-code.

Model details

Field Value
Architecture U-Net (segmentation-models-pytorch)
Encoder efficientnet-b5, ImageNet-pretrained
Input RGB patches, 256 × 256 pixels, 3 channels
Output Raw logits, 5 classes (activation=None)
Training tiles 2048 × 2048 px, 0.5 m/pixel (KOMPSAT-3/3A orthomosaic, 2019–2020)
Patch extraction step 128 px
Inference stride 128 px (sliding window with logit averaging)
Normalization ImageNet mean [0.485, 0.456, 0.406], std [0.229, 0.224, 0.225]
Code commit 17746ea

Classes

The model predicts the five aggregated classes used in the paper. Class IDs follow the order produced by convert_mask.py --classes 5 in the training repository:

ID Class Description
0 Infrastructure Buildings, paved roads, dirt roads, sidewalks, mining/extraction, and other human-built surfaces.
1 Vegetation Areas Native forests, restinga, mangroves, marshes/swamps, and altitude grasslands.
2 Agropastoral Areas Pastures, cultivated crops, silviculture, exposed soil, and initial regeneration areas aimed at productive use.
3 Macega Macega (kept as an independent class).
4 Water Bodies Rivers, lakes, reservoirs, canals, and other visible water surfaces.

Note: the indexed masks published in IntegraCAR-LULC-500 use a different ID order (0 Vegetation Areas, 1 Agropastoral Areas, 2 Infrastructure, 3 Water Bodies, 4 Macega). Remap the IDs before comparing this model's predictions with those masks.

How to use

The weights are stored in the segmentation-models-pytorch Hub format (config.json + model.safetensors), so they can be loaded directly:

pip install segmentation-models-pytorch torch torchvision pillow numpy
import numpy as np
import torch
import segmentation_models_pytorch as smp
from PIL import Image
from torchvision import transforms

REPO_ID = "laicsiifes/IntegraCAR-U-Net-efficientnetb5-128"
PATCH = 256
STRIDE = 128

device = "cuda" if torch.cuda.is_available() else "cpu"
model = smp.from_pretrained(REPO_ID).to(device).eval()

transform = transforms.Compose([
    transforms.ToTensor(),
    transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
])

image = np.array(Image.open("tile.tif").convert("RGB"))  # 2048 x 2048 tile
h, w = image.shape[:2]

def starts(length):
    pos = list(range(0, length - PATCH + 1, STRIDE))
    if pos[-1] != length - PATCH:
        pos.append(length - PATCH)
    return pos

logits = np.zeros((5, h, w), dtype=np.float32)
counts = np.zeros((h, w), dtype=np.float32)

with torch.no_grad():
    for y in starts(h):
        for x in starts(w):
            patch = transform(Image.fromarray(image[y:y + PATCH, x:x + PATCH]))
            out = model(patch.unsqueeze(0).to(device)).squeeze(0).float().cpu().numpy()
            logits[:, y:y + PATCH, x:x + PATCH] += out
            counts[y:y + PATCH, x:x + PATCH] += 1

prediction = np.argmax(logits / counts[None], axis=0).astype(np.uint8)  # class IDs 0..4

This reproduces the sliding-window inference in src/inference.py (PatchifyInference), which averages logits over overlapping windows before the argmax.

Training data

IntegraCAR-LULC-500 is a 500-tile benchmark subset of IntegraCAR-LULC-10K. Tiles are 2048 × 2048 pixels at 0.5 m/pixel, sampled from rural properties in the Brazilian Rural Environmental Registry (CAR) in Espírito Santo. Images come from the KOMPSAT-3/3A orthomosaic (2019–2020) and labels from the IJSN 2019 LULC map, both published by GeoBases. The subset has 50 image-mask pairs per microregion.

Split Tiles
Train 300
Validation 100
Test 100

The split lists are train_sample.txt, validation_sample.txt and test_sample.txt in data-segments/ of the training repository.

Training procedure

Training was run with train_code.py from the training repository. Patches are extracted from each tile on a regular grid, and the model is trained on patches only.

Hyperparameter Value
Patch size 256 × 256
Patch step 128
Epochs 100
Batch size 200
Optimizer SGD, momentum 0.9
Learning rate 0.5
Weight decay 5e-4
LR scheduler MultiStepLR, milestones [25, 35, 45], gamma 0.1
Loss Cross-entropy with class weights computed from training-set pixel frequencies
Ignore index 5
Model selection Checkpoint with the best validation mIoU (best_model.pth)
Seed 42

Limitations

  • The model was trained only on imagery from Espírito Santo (2019–2020) at 0.5 m/pixel; performance on other regions, sensors, dates, or resolutions has not been evaluated.
  • Labels are derived from the official IJSN 2019 LULC map, not from manual annotation of each tile. See the dataset card for annotation limitations.
  • Classes are imbalanced: Agropastoral Areas and Vegetation Areas cover most pixels, while Water Bodies are rare, which affects per-class IoU.
  • The model is a research baseline and should not be used as the only source for legal or administrative decisions within the CAR.

License

The model weights and the training code are released under the MIT License.

Citation

If you use this model, please cite the paper:

@inproceedings{integracar_lulc_2026,
  title     = {IntegraCAR-LULC-10K: A High-Resolution Optical Satellite Dataset for LULC Segmentation in the Brazilian Rural Environmental Registry},
  author    = {Albertino, Calebe and Lima, Gabriel M. B. and Oliveira, Vin{\'{i}}cius R. and Ribeiro, Arthur R. V. and Oliveira, Eliza K. S. and Souza, Eduardo H. P. and Dalvi, Otavio G. and Komati, Karin S. and Andrade, Jefferson O. and Boldt, Francisco A. and Paix{\~{a}}o, Thiago M.},
  booktitle = {Proceedings of the 39th SIBGRAPI Conference on Graphics, Patterns and Images (SIBGRAPI)},
  year      = {2026}
}
Downloads last month
23
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train laicsiifes/IntegraCAR-U-Net-efficientnetb5-128