model: pretrained backbone, number of classes, ignore index.
wandb: project and entity names for Weights & Biases tracking.
Adjust these settings to match your dataset and compute environment.
Example config.yaml:
yaml
1data:2root_dir:"/path/to/GridNet-HD"# Root folder containing t1z4, t2z5, etc.3split_file:"/path/to/GridNet-HD/split.json"# JSON split file listing train/val/test folders4resize_size:[1760,1318]# resize image and mask, PIL style (width, height)5crop_size:[512,512]# random-crop (train) or sliding-window (val/test) to this size6# Image normalization7mean:[0.5,0.5,0.5]8std:[0.5,0.5,0.5]9class_map:10-keys:[0,1,2,3,4]# original values11value:0# new value (remap value)12-keys:[5]13value:114-keys:[6,7]15value:216-keys:[8,9,10,11]17value:318-keys:[14]19value:420-keys:[15]21value:522-keys:[16]23value:624-keys:[17,18]25value:726-keys:[19]27value:828-keys:[20]29value:930-keys:[21]31value:1032-keys:[12,13,255]33value:2553435model:36pretrained_model:"openmmlab/upernet-swin-tiny"# small and base version are possible (HuggingFace)37num_classes:11# target classes38ignore_index:255# 'ignore' in loss & metrics3940training:41output_dir:"./outputs/run"# Where to save checkpoints & logs42seed:4243batch_size:3244num_workers:8# parallel workers for DataLoader45lr:0.0001# Initial learning rate46sched_step:10# Scheduler: step every N epochs47sched_gamma:0.5# multiply LR by this gamma48epochs:6049eval_every:5# eval every n epochs5051val:52batch_size:8# number of images per batch during validation and test53num_workers:8# parallel workers for DataLoader54batch_size_proj:5000000# number of points per batch to project on images5556wandb:57project:"GridNet-HD-ImageOnly"# only used for training and validation58entity:"your-team"
Environment
The following environment was used to train and evaluate the baseline model:
Component
Details
GPU
NVIDIA A40 (48 GB VRAM)
CUDA Version
12.x
OS
Ubuntu 22.04 LTS
Python Version
3.12
PyTorch Version
2.7+cu126
Transformers
🤗 Transformers 4.51
JAX
jax==0.6.0
laspy
>= 2.0
RAM
256 GB (≥ 64 GB recommended)
⚠️ For operations involving batch sliding-window inference and 3D projection with JAX on large scenes, high VRAM is recommended, otherwise if CUDA OOM error, decrease:
val
batch_size
batch_size_proj
Dataset Structure
The input data is structured by geographic zone, with RGB images, semantic masks, LiDAR scans, and camera pose files.
The structure of the GridNet-HD dataset remains the same (see GridNet-HD dataset for more information)
Each mode is selected via the --mode argument in main.py.
Mode
Description
train
Train the image segmentation model
val
Evaluate the model on validation set (2D) and return metrics at image level
test
Run inference on test set (saves predicted masks)
test3d
Run inference + reproject predictions to LiDAR (3D) saved in classif field in las file
val3d
Evaluate predictions projected onto LiDAR (3D) and return metrics at 3D level
export_probs
Export softmax logits for each input image
project_probs_3d
Export softmax logits for each input image onto each LiDAR point cloud to train the 3rd baseline
Results
The following table summarizes the per-class Intersection over Union (IoU) scores on the test set at 3D level. The model was trained using the configuration specified in config.yaml.
Class
IoU (Test set) (%)
Pylon
85.09
Conductor cable
64.82
Structural cable
45.06
Insulator
71.07
High vegetation
83.86
Low vegetation
63.43
Herbaceous vegetation
84.45
Rock, gravel, soil
38.62
Impervious soil (Road)
80.69
Water
74.87
Building
68.09
Mean IoU (mIoU)
69.10
Pretrained Weights
🔗 Pretrained weights for the best performing model are available for download directly in this repo.
This checkpoint corresponds to the model trained using the configuration in config.yaml, achieving a mean IoU of 69.10% on test set.
Usage Examples
Training
python main.py --mode train --config config.yaml
2D Validation
python main.py --mode val --weights_path best_model.pth
2D Inference
python main.py --mode test --weights_path best_model.pth
To log training and evaluation to Weights & Biases:
wandb login
Set the project and entity fields in your config.yaml file.
License
This project is open-sourced under the MIT License.
Contact
For questions, issues, or contributions, please open an issue on the repository.
Citation
If you use this repo in research, please cite:
@misc{gridnet-hd-dataset,
title={GridNet-HD: A High-Resolution Multi-Modal Dataset for LiDAR-Image Fusion on Power Line Infrastructure},
author={Antoine Carreaud and Shanci Li and Malo De Lacour and Digre Frinde and Jan Skaloud and Adrien Gressin},
year={2026},
eprint={2601.13052},
url={https://arxiv.org/abs/2601.13052},
}