DeepChoice
DeepChoice is a lightweight multi-view fusion framework for image-guided 3D semantic segmentation.
For each 3D point, the preprocessing pipeline gathers the visible images, computes geometric and radiometric visibility criteria, attaches per-view 2D semantic scores, and the model learns one weight per view before fusing the evidence into a final 3D prediction.
This repository contains:
- the DeepChoice training, evaluation, and inference code
- preprocessing pipelines for
GridNet-HDandCultural Heritage - two DeepChoice backbones:
DeepChoiceTransformerDeepChoiceMLP
- a 2D image baseline used to export per-image logits / softmax scores
- public config files and released checkpoints
Citation
If you use this repository, please cite:
@article{Carreaud2026DeepChoice,
title={DeepChoice: Learning View Weighting for Image-Guided 3D Semantic Segmentation},
author={Antoine Carreaud and Digre Frinde and Shanci Li and Jan Skaloud and Adrien Gressin},
year={2026},
url={https://cspaper.org/openprint/20260331.0001v1},
journal={OpenPrint:20260331.0001v1}
}
Repository Layout
.
βββ main.py
βββ configs/
βββ dataset/
βββ dataset_generation/
βββ experiments/
βββ image_baseline/
βββ model/
βββ scripts/
βββ train/
βββ utils/
βββ weights/
Main directories:
dataset_generation/: preprocessing and batch generationdataset/: PyTorch datasets for training and evaluationmodel/: DeepChoice backbonestrain/: training, testing, and inference logicimage_baseline/: 2D segmentation baseline used to export image scoresexperiments/: reusable experiment runnersscripts/: small utilities for figure generation or format conversionweights/: released checkpoints
Public Config Files
DeepChoice configs:
configs/config_deepchoice_base.yamlconfigs/config_gridnet_hd_transformer.yamlconfigs/config_gridnet_hd_mlp.yamlconfigs/config_cultural_heritage_transformer.yamlconfigs/config_cultural_heritage_mlp.yaml
Dataset generation configs:
configs/config_gridnet_hd_dataset_generation.yamlconfigs/config_cultural_heritage_dataset_generation.yaml
Released Checkpoints
DeepChoice:
weights/deepchoice/gridnet_hd_transformer_best_model.ptweights/deepchoice/gridnet_hd_mlp_best_model.ptweights/deepchoice/cultural_heritage_transformer_best_model.ptweights/deepchoice/cultural_heritage_mlp_best_model.pt
Image baseline:
weights/image_baseline/gridnet_hd_best_model.pthweights/image_baseline/cultural_heritage_best_model.pth
Main Results
The tables below summarize the main quantitative results reported in the paper.
GridNet-HD test split
| Method | mIoU (%) | Params |
|---|---|---|
| Hard vote | 66.78 | 60 M |
| Mean-probability fusion | 69.37 | 60 M |
| DeepChoice-MLP | 70.52 | 60 M + 0.09 M |
| DeepChoice-Transformer | 70.63 | 60 M + 0.02 M |
| AnyView oracle | 84.33 | - |
On the full GridNet-HD benchmark, DeepChoice-Transformer improves over hard voting by +3.85 mIoU points and over mean-probability fusion by +1.26 mIoU points.
Cultural Heritage (3_SS)
| Method | mIoU (%) | mF1 (%) |
|---|---|---|
| Hard vote | 65.66 | 73.87 |
| Mean-probability fusion | 66.73 | 74.81 |
| DeepChoice-MLP | 66.35 | 74.54 |
| DeepChoice-Transformer | 67.21 | 75.49 |
| AnyView oracle | 86.92 | 92.83 |
On Images&PointClouds Cultural Heritage, DeepChoice-Transformer improves over hard voting by +1.55 mIoU points and over mean-probability fusion by +0.48 mIoU points.
Environment
Reference environment used during development:
| Component | Version |
|---|---|
| OS | Ubuntu 24.04 |
| Python | 3.12 |
| PyTorch | 2.7 |
| CUDA | 12.x |
| JAX | 0.6 |
| laspy | 2.x |
Installation:
git clone https://huggingface.co/heig-vd-geo/DeepChoice
cd DeepChoice
conda create -n deepchoice python=3.12
conda activate deepchoice
pip install --upgrade pip
pip install -r requirements.txt
The repository includes a .gitattributes file configured for Git LFS so released .pt and .pth checkpoints can be pushed cleanly.
GridNet-HD Preprocessing
The GridNet-HD preprocessing pipeline expects, for each tile:
- a LAS point cloud
- oriented images
- camera poses and intrinsics / extrinsics
- per-image logits or softmax scores exported by the 2D baseline
Configuration:
configs/config_gridnet_hd_dataset_generation.yaml
The GridNet-HD preprocessing config expects the official split file distributed with the dataset at ./data/gridnet_hd/public/split.json.
Compute normals:
python scripts/compute_normals.py --config configs/config_gridnet_hd_dataset_generation.yaml
Generate DeepChoice batches:
python scripts/run_batch_generation.py --config configs/config_gridnet_hd_dataset_generation.yaml
For each visible (point, image) pair, the pipeline computes:
- incidence angle
- distance
- local contrast
- blur response
- signal-to-noise ratio
- saturation
Generated batches are written under:
artifacts/gridnet_hd/batches/trainartifacts/gridnet_hd/batches/valartifacts/gridnet_hd/batches/test
Each .pt batch contains:
visibility:[N, max_views, num_features]logits:[N, max_views, num_classes]mask:[N, max_views]target:[N]coords_intcoords_scalecoords_offsetcoords_tile_offset
Cultural Heritage Preprocessing
Configuration:
configs/config_cultural_heritage_dataset_generation.yaml
Compute normals:
python scripts/compute_normals_cultural_heritage.py --config configs/config_cultural_heritage_dataset_generation.yaml
Generate batches:
python scripts/run_batch_generation_cultural_heritage.py --config configs/config_cultural_heritage_dataset_generation.yaml
This setup is useful for internal experiments and custom split protocols. Exact reproduction of a paper-specific Cultural Heritage protocol may require additional split management.
DeepChoice Training
Main DeepChoice entry point:
main.py
Supported modes:
traintestinfer
Base config:
configs/config_deepchoice_base.yaml
Example single-process training:
python main.py --config configs/config_deepchoice_base.yaml --mode train
Example distributed training:
torchrun --standalone --nproc_per_node=4 main.py --config configs/config_deepchoice_base.yaml --mode train
Useful config sections:
data: batch roots and split-specific overridesdataset: selected visibility features and normalization rangesmodel: backbone choice and architecture hyperparameterstraining: optimizer, scheduler, dataloading, and DDP settingstest: evaluation and inference split settings
Important training options:
training.file_batch_sizetraining.eval_file_batch_sizetraining.train_limit_filestraining.randomize_train_limit_each_epochtraining.val_split
Evaluation
Example evaluation with baselines:
python main.py \
--config configs/config_deepchoice_base.yaml \
--mode test \
--weights_path /path/to/best_model.pt \
--split test
The test pipeline reports:
- model
mIoUandmF1 hard_votemean_prob_voteanyview
Inference and LAS Export
Standard inference:
python main.py \
--config configs/config_deepchoice_base.yaml \
--mode infer \
--weights_path /path/to/best_model.pt \
--split test \
--inference_output /path/to/output_dir
Inference with an additional comparison model:
python main.py \
--config /path/to/transformer_config.yaml \
--mode infer \
--weights_path /path/to/transformer_best_model.pt \
--comparison_config /path/to/mlp_config.yaml \
--comparison_weights_path /path/to/mlp_best_model.pt \
--comparison_field_name best_mlp \
--split test \
--inference_output /path/to/output_dir
Generated outputs:
pred_batch_*.pt- one LAS file per tile
Each LAS may contain:
classification: primary model predictionground_truthbest_transformerbest_mlpmean_prob_votehard_vote
Image Baseline
The repository also contains the 2D image segmentation baseline used to export per-image semantic scores:
image_baseline/main.py
Provided configs:
image_baseline/configs/gridnet_hd.yamlimage_baseline/configs/cultural_heritage.yaml
Train:
python image_baseline/main.py --config image_baseline/configs/gridnet_hd.yaml --mode train
Validate:
python image_baseline/main.py \
--config image_baseline/configs/gridnet_hd.yaml \
--mode val \
--weights_path /path/to/best_model.pth
Export logits / softmax scores:
python image_baseline/main.py \
--config image_baseline/configs/gridnet_hd.yaml \
--mode export_logits \
--weights_path /path/to/best_model.pth
The exported arrays are stored as .npy files following the dataset-relative image structure.
Experiment Runners
Reusable experiment runners:
experiments/run_weekend_experiments.pyexperiments/run_validation_experiments.py
Paper-related plans included in the repository:
experiments/weekend_vislogits_nobalanced_plan.yamlexperiments/weekend_vislogits_maxviews_plan.yamlexperiments/test_vislogits_best_plan.yamlexperiments/weekend_vislogits_cultural_heritage_plan.yamlexperiments/test_vislogits_cultural_heritage_best_plan.yaml
Typical launch:
python experiments/run_weekend_experiments.py \
--base-config configs/config_deepchoice_base.yaml \
--plan /path/to/weekend_plan.yaml \
--output-root /path/to/output_root \
--continue-on-error
GridNet-HD input ablation:
python experiments/run_weekend_experiments.py \
--base-config configs/config_deepchoice_base.yaml \
--plan experiments/weekend_vislogits_nobalanced_plan.yaml \
--output-root /path/to/output_root \
--continue-on-error
GridNet-HD max-views ablation:
python experiments/run_weekend_experiments.py \
--base-config configs/config_deepchoice_base.yaml \
--plan experiments/weekend_vislogits_maxviews_plan.yaml \
--output-root /path/to/output_root \
--continue-on-error
GridNet-HD final test evaluation:
python experiments/run_validation_experiments.py \
--base-config configs/config_deepchoice_base.yaml \
--plan experiments/test_vislogits_best_plan.yaml \
--output-root /path/to/output_root
Cultural Heritage experiment:
python experiments/run_weekend_experiments.py \
--base-config configs/config_deepchoice_base.yaml \
--plan experiments/weekend_vislogits_cultural_heritage_plan.yaml \
--output-root /path/to/output_root \
--continue-on-error
Cultural Heritage evaluation of the released best models:
python experiments/run_validation_experiments.py \
--base-config configs/config_deepchoice_base.yaml \
--plan experiments/test_vislogits_cultural_heritage_best_plan.yaml \
--output-root /path/to/output_root
Utility Scripts
Currently kept in scripts/:
scripts/compute_normals.pyscripts/compute_normals_cultural_heritage.pyscripts/run_batch_generation.pyscripts/run_batch_generation_cultural_heritage.pyscripts/make_visibility_paper_figure.pyscripts/convert_cultural_heritage_txt_to_las.py