SegFormer-B4 โ Offroad Semantic Segmentation
Fine-tuned SegFormer-B4 for semantic segmentation of offroad desert scenes, trained on synthetic data from Duality AI's Falcon simulation platform.
Model Details
- Architecture: SegFormer-B4 (MiT-B4 backbone)
- Parameters: 64M
- Pretrained on: ADE20K (150 classes)
- Fine-tuned on: Duality AI Falcon synthetic desert images
- Input size: 512ร512
- Classes: 10
Performance
| Metric | Score |
|---|---|
| Val mIoU | 0.5935 |
| Baseline mIoU | 0.2478 |
| Improvement | +0.3457 |
| Val Pixel Accuracy | 86.17% |
Classes
| ID | Class | Color |
|---|---|---|
| 0 | Background | Black |
| 1 | Trees | Dark Green |
| 2 | Lush Bushes | Bright Green |
| 3 | Dry Grass | Tan |
| 4 | Dry Bushes | Brown |
| 5 | Ground Clutter | Olive |
| 6 | Logs | Dark Brown |
| 7 | Rocks | Gray |
| 8 | Landscape | Sandy Brown |
| 9 | Sky | Light Blue |
Training Details
- Loss: Combined Dice + Focal Loss
- Optimizer: AdamW (lr=3e-5, wd=0.01)
- Scheduler: CosineAnnealingLR
- Augmentation: HorizontalFlip, ColorJitter, CLAHE, HueSaturationValue, RandomFog
- Epochs: 10 (Phase 1) + 10 (Phase 2)
- Hardware: NVIDIA RTX 4050 6GB
Usage
from transformers import SegformerForSemanticSegmentation, SegformerImageProcessor
from PIL import Image
import torch
processor = SegformerImageProcessor.from_pretrained("rohan9977/segformer-b4-offroad-segmentation")
model = SegformerForSemanticSegmentation.from_pretrained("rohan9977/segformer-b4-offroad-segmentation")
image = Image.open("your_image.jpg")
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
predicted_mask = outputs.logits.argmax(dim=1)
- Downloads last month
- 34
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support