A collection of scripts for converting the SimForest dataset to YOLO format, training YOLO detection and segmentation models, and performing depth-filtered validation.
- Convert COCO annotations to YOLO detect and segment formats
- Split dataset into train/val with configurable ratios
- Filter by category IDs, minimum diameter, and minimum height
- Merge multiple categories into a single class
- Flexible file linking (symlinks or copies)
- Train YOLOv11 models at 4K resolution (3840x2160)
- Support for both detection and segmentation tasks
- Resume training from checkpoints
- Configurable hyperparameters and training settings
- Validate YOLO models with depth-based filtering
- Analyze performance at different distance ranges
- Generate filtered validation metrics
# Clone the repository
git clone https://github.com/RISE-Dependable-Transport-Systems/simforest-yolo-toolkit.git
cd simforest-yolo-toolkit
# Install dependencies
pip install -r requirements.txtpython src/simforest_to_yolo.py \
--dataset /path/to/simforest \
--output ./data/simforest_yolo \
--split 0.8 \
--seed 42Advanced options:
# Filter by categories and merge into single class
python src/simforest_to_yolo.py \
--dataset /path/to/simforest \
--output ./data/simforest_yolo \
--categories 9 10 11 \
--merge-categories "Tree_Trunk" \
--min-diameter 0.1 \
--min-height 2.0 \
--with-depth
# Use file copying instead of symlinks
python src/simforest_to_yolo.py \
--dataset /path/to/simforest \
--output ./data/simforest_yolo \
--copypython src/yolo11_4k_trainer.py \
--data ./data/simforest_yolo/detect/data.yaml \
--model x \
--epochs 300 \
--batch-size 2 \
--img-size 2560 \
--task detectpython src/depth_filtered_yolov11_validation.py \
--model ./runs/detect/yolov11x_4k_detect/weights/best.pt \
--data ./data/simforest_yolo/detect/data.yaml \
--img-dir ./data/simforest_yolo/detect/images/val \
--label-dir ./data/simforest_yolo/detect/labels/val \
--depth-dir ./data/simforest_yolo/depth/val \
--val-dir ./runs/detect/yolov11x_4k_detect/val \
--use-depth-filter \
--img-size 2560 \
--results-file ./results/detect/yolov11x_4k_detect/val.json \
--max-distance 15.0 \
--num-workers 16After conversion, the simforest_yolo dataset will have the following structure:
data/simforest_yolo/
├── detect/
│ ├── images/
│ │ ├── train/
│ │ └── val/
│ ├── labels/
│ │ ├── train/
│ │ └── val/
│ └── data.yaml
├── segment/
│ ├── images/
│ │ ├── train/
│ │ └── val/
│ ├── labels/
│ │ ├── train/
│ │ └── val/
│ └── data.yaml
├── depth/ (optional)
│ ├── train/
│ └── val/
└── annotations/
├── train.json
└── val.json
If you use this toolkit in your research, please cite:
@INPROCEEDINGS{avula_simforest_2025,
author={Avula, Ramana Reddy and Narkilahti, Aleksi and Wołk, Krzysztof},
booktitle={2025 IEEE International Conference on Visual Communications and Image Processing (VCIP)},
title={SimForest: RGBD Instance Segmentation Dataset},
year={2025}}