This repository contains an active-learning pipeline for object detection with YOLO and MaPLe-based visual re-ranking. The current public setup is focused on DVAL experiments for two traffic-sign datasets:
GTSDBVTSDB100
DVAL is configured as a two-stage selection pipeline in this codebase:
ddusbuilds a detector-side uncertainty shortlist from unlabeled images.maplere-ranks that shortlist with crop-level MaPLe scores.
- Python 3.9+
- CUDA-capable GPU is recommended
uvpackage manager- YOLO weights such as
yolo11n.pt - Prepared dataset folders for
GTSDBand/orVTSDB100
Install dependencies:
uv syncIf your environment uses process titles, create the training environment file:
cp .env.example .env.trainingAt minimum, make sure PROCTITLE_STARTSTR is set before running experiments:
The supported config folders are intentionally limited to:
configs/
+-- gtsdb/
+-- vtsdb100/
Expected dataset YAML files:
GTSDB/data.yamlVTSDB100/data.yaml
Each dataset YAML should follow the YOLO format with train/val/test image paths and class names.
Run DVAL on VTSDB100:
uv run python scripts/run_experiment.py --config configs/vtsdb100/config_dval.yamlRun DVAL on GTSDB:
uv run python scripts/run_experiment.py --config configs/gtsdb/config_dval.yamlUseful overrides:
uv run python scripts/run_experiment.py \
--config configs/vtsdb100/config_dval.yaml \
--device 0 \
--seed 1VTSDB100:
configs/vtsdb100/config_dval.yamlconfigs/vtsdb100/config_random.yamlconfigs/vtsdb100/config_entropy.yamlconfigs/vtsdb100/config_coreset.yaml
GTSDB:
configs/gtsdb/config_dval.yamlconfigs/gtsdb/config_random.yamlconfigs/gtsdb/config_entropy.yamlconfigs/gtsdb/config_coreset.yaml
The main DVAL config uses chained strategies:
strategy: ["ddus", "maple"]
expand_ratios: [2.0]This means each round selects a DDUS shortlist of samples_per_round * 2, then MaPLe re-ranks the shortlist down to the final samples_per_round images.
Important fields:
initial_labeled_count: initial labeled training images.samples_per_round: final images selected per active-learning round.max_rounds: number of active-learning rounds.strategy_args.ddus: detector uncertainty and class/localization quality weights.strategy_args.maple: crop-level MaPLe scoring weights.maple_training: prompt-learning settings for the MaPLe checkpoint used each round.
.
+-- configs/
| +-- gtsdb/
| +-- vtsdb100/
+-- scripts/
| +-- run_experiment.py
| +-- train.py
| +-- strategy.py
| +-- setup_data.py
| +-- simulate_labeling.py
| +-- create_yolo_crops.py
| +-- train_maple_round.py
+-- src/
| +-- data/
| +-- models/
| +-- strategies/
Avoid committing generated or heavy files such as:
- datasets:
GTSDB/,VTSDB100/ - experiment outputs:
full_experiments/,runs/,wandb/ - model weights:
*.pt,*.pth - local environments:
.venv/,.env,.env.training
Keep only source code, configs, tests, and documentation in the repository.
This project is licensed under the Apache License 2.0. See LICENSE for details.