--- # --------------------------------------------------------------------------- # Hugging Face model card metadata. # Fields marked TODO must be filled in before publishing. # To reuse this card for another model from the paper, change only the # fields marked [MODEL-SPECIFIC] here and in the "Model details" table below. # --------------------------------------------------------------------------- license: mit language: - pt - en library_name: segmentation-models-pytorch pipeline_tag: image-segmentation datasets: - laicsiifes/IntegraCAR-LULC-500 tags: - remote-sensing - earth-observation - semantic-segmentation - land-use - land-cover - lulc - satellite-imagery - car - brazil - espirito-santo - deeplabv3 - resnet50 metrics: - mean_iou # model-index lets the Hub show the results widget. Uncomment and fill in # with the numbers reported in the paper (values must be numeric). # model-index: # - name: deeplabv3-resnet50-64-integracar-lulc-500 # results: # - task: # type: image-segmentation # name: Semantic Segmentation # dataset: # type: laicsiifes/IntegraCAR-LULC-500 # name: IntegraCAR-LULC-500 # split: test # metrics: # - type: mean_iou # name: mIoU # value: 0.7641 --- # DeepLabV3 (512 × 512 patches, step 64) for LULC Segmentation on IntegraCAR-LULC-500 This model is a **DeepLabV3** with a **ResNet-50** encoder 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 **512 × 512 pixel patches** extracted with a step of 64 pixels from the [IntegraCAR-LULC-500](https://huggingface.co/datasets/laicsiifes/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](https://github.com/integraCAR/IntegraCAR-LULC-10K-code). ## Model details | Field | Value | | --- | --- | | Architecture | DeepLabV3 ([segmentation-models-pytorch](https://github.com/qubvel-org/segmentation_models.pytorch), `smp.DeepLabV3`) | | Encoder | `resnet50`, ImageNet-pretrained | | Input | RGB patches, **512 × 512** 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 | 64 px | | Inference stride | 64 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`](https://github.com/integraCAR/IntegraCAR-LULC-10K-code/commit/17746ea5e6029063a5a6ab54d8829e73fe091df9)| ## 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](https://huggingface.co/datasets/laicsiifes/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: ```bash pip install segmentation-models-pytorch torch torchvision pillow numpy ``` ```python import numpy as np import torch import segmentation_models_pytorch as smp from PIL import Image from torchvision import transforms REPO_ID = "laicsiifes/IntegraCAR-DeepLabV3-resnet50-64" PATCH = 512 STRIDE = 64 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`](https://github.com/integraCAR/IntegraCAR-LULC-10K-code/blob/main/src/inference.py) (`PatchifyInference`), which averages logits over overlapping windows before the `argmax`. ## Training data [IntegraCAR-LULC-500](https://huggingface.co/datasets/laicsiifes/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/`](https://github.com/integraCAR/IntegraCAR-LULC-10K-code/tree/main/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 | 512 × 512 | | Patch step | 64 | | Epochs | 100 | | Batch size | 200 | | Optimizer | SGD, momentum 0.9 | | Learning rate | 0.01 | | 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: ```bibtex @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} } ```