Skip to content

Commit 2e07865

Browse files
committed
initial commit
1 parent d3be381 commit 2e07865

89 files changed

Lines changed: 78120 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Environments
7+
.env
8+
.venv
9+
.idea
10+
env/
11+
venv/
12+
ENV/
13+
env.bak/
14+
venv.bak/
15+
16+
# VS Code
17+
.vscode
18+
!.vscode/settings.json
19+
!.vscode/tasks.json
20+
!.vscode/launch.json
21+
!.vscode/extensions.json
22+
*.code-workspace
23+
24+
# Ruff
25+
.ruff_cache/
26+
27+
# Mac OS-specific storage files
28+
.DS_Store
29+
**/.DS_Store
30+
31+
# Google Drive specific files
32+
.tmp.driveupload
33+
.tmp.drivedownload

CITATION.cff

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
cff-version: 1.2.0
2+
title: "Stabilo Optimize: A Framework for Comprehensive Evaluation and Analysis for the Stabilo Library"
3+
message: "If you use this software, please cite the software and the paper."
4+
type: software
5+
authors:
6+
- given-names: Robert
7+
family-names: Fonod
8+
email: robert.fonod@ieee.org
9+
affiliation: EPFL
10+
orcid: 'https://orcid.org/0000-0002-9434-3156'
11+
identifiers:
12+
- type: doi
13+
value: 10.5281/zenodo.13828430
14+
description: Zenodo archive
15+
repository-code: 'https://github.com/rfonod/stabilo-optimize'
16+
url: 'https://github.com/rfonod/stabilo-optimize'
17+
license: MIT
18+
version: 1.0.0
19+
date-released: '2025-03-17'
20+
preferred-citation:
21+
type: article
22+
authors:
23+
- family-names: "Fonod"
24+
given-names: "Robert"
25+
- family-names: "Cho"
26+
given-names: "Haechan"
27+
- family-names: "Yeo"
28+
given-names: "Hwasoo"
29+
- family-names: "Geroliminis"
30+
given-names: "Nikolas"
31+
title: "Advanced computer vision for extracting georeferenced vehicle trajectories from drone imagery"
32+
year: 2025
33+
month: 3
34+
journal: "arXiv"
35+
doi: "10.48550/arXiv.2411.02136"
36+
url: "https://arxiv.org/abs/2411.02136"
37+
publisher:
38+
name: "arXiv"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Robert Fonod
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 122 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,123 @@
11
# Stabilo Optimize
2-
Coming soon.
2+
3+
[![GitHub Release](https://img.shields.io/github/v/release/rfonod/stabilo-optimize?include_prereleases)](https://github.com/rfonod/stabilo-optimize/releases) [![License](https://img.shields.io/github/license/rfonod/stabilo-optimize)](https://github.com/rfonod/stabilo-optimize/blob/main/LICENSE) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13828430.svg)](https://doi.org/10.5281/zenodo.13828430) [![arXiv](https://img.shields.io/badge/arXiv-2411.02136-b31b1b.svg?style=flat)](https://arxiv.org/abs/2411.02136) [![Development Status](https://img.shields.io/badge/development-active-brightgreen)](https://github.com/rfonod/stabilo-optimize)
4+
5+
**Stabilo-Optimize** is a Python benchmarking tool designed specifically to evaluate and tune methods and hyperparameters of the [stabilo](https://github.com/rfonod/stabilo) 🚀 library for video and track stabilization tasks. It systematically generates performance evaluations through random perturbations, eliminating the need for ground-truth homographies. This tool significantly simplifies the optimization of stabilization techniques, making it ideal for high-precision tasks in fields such as urban monitoring, traffic analysis, and drone imagery processing.
6+
7+
![Benchmark Campaign Illustration](assets/benchmark_visualization.gif?raw=True)
8+
9+
## Key Features
10+
11+
- **Ground Truth-Free Benchmarking**: Randomly generates photometric and homographic perturbations (brightness variations, Gaussian blur, saturation adjustments, fog effects, rotations, translations, scales, and perspective shifts).
12+
- **Hierarchical Benchmarking Strategy**: Encourages users to systematically vary hyperparameters hierarchically for efficient parameter optimization.
13+
- **Flexible JSON Configuration**: Customize extensive parameter settings using nested dictionaries (see [comprehensive_benchmark.json](experiments/sample_experiment/comprehensive_benchmark.json) or [simple_benchmark.json](experiments/sample_experiment/simple_benchmark.json) for examples).
14+
- **Result Visualization**: Generates comprehensive performance plots and benchmarking process visualizations.
15+
16+
![Benchmarking Process Diagram](assets/registration_campaign.png)
17+
18+
## Installation
19+
20+
1. **Create and activate a Python virtual environment** (Python >= 3.9), e.g., using [Miniconda3](https://docs.anaconda.com/free/miniconda/):
21+
```bash
22+
conda create -n stabilo-optimize python=3.9 -y
23+
conda activate stabilo-optimize
24+
```
25+
26+
2. **Clone or fork the repository**:
27+
```bash
28+
git clone https://github.com/rfonod/stabilo-optimize.git
29+
cd stabilo-optimize
30+
```
31+
32+
3. **Install dependencies**:
33+
```bash
34+
pip install -r requirements.txt
35+
```
36+
37+
## Example Usage
38+
39+
A sample benchmark (`simple_benchmark.json`) with provided scenes and vehicle bounding box masks is included in the `experiments/sample_experiment` directory. To reproduce the results, run:
40+
41+
```bash
42+
python benchmark.py experiments/sample_experiment/simple_benchmark.json -sp -sv -o
43+
```
44+
45+
- `-sp`: Save performance plots.
46+
- `-sv`: Save benchmark visualization video.
47+
- `-o`: Overwrite previous results.
48+
49+
Use `python benchmark.py --help` to explore additional command-line options.
50+
51+
**Note:** This example is limited to three scenes for demonstration purposes. Users should define their own benchmarks with a more representative selection of scenes for meaningful evaluation.
52+
53+
## Custom Benchmarking
54+
55+
To set up your own benchmark, create a new experiment directory within `experiments` containing:
56+
57+
- `benchmark.json`: Configuration specifying methods/hyperparameters and number of random trials (`N`) per scene. For reliable results, set `N > 100`.
58+
- `scenes`: Directory containing input images (and optional exclusion masks in YOLO format). Ensure selected scenes adequately represent your stabilization tasks. To obtain reliable benchmarking results, include a diverse set of scenes covering different lighting conditions and camera viewpoints.
59+
60+
Example structure:
61+
62+
```
63+
experiments
64+
└─custom_experiment
65+
├─benchmark.json
66+
└─scenes
67+
├ image1.jpg
68+
├ image1.txt
69+
├ image2.jpg
70+
├ image2.txt
71+
├ ...
72+
```
73+
74+
**Note**: A comprehensive configuration file (`comprehensive_benchmark.json`) is included for illustration purposes. Due to computational costs, users should avoid directly running such an extensive parameter search. Instead, adopt a hierarchical parameter search approach by fixing some hyperparameters and varying others.
75+
76+
Refer to the [stabilo](https://github.com/rfonod/stabilo) library and the associated [manuscript](https://arxiv.org/abs/2411.02136) for detailed descriptions of available methods and hyperparameters.
77+
78+
## Benchmarking Metrics
79+
80+
Benchmarks use metrics like Homography Estimation Accuracy (HEA) and Mean Intersection over Union (MIoU). MIoU specifically evaluates the accuracy of object-level registration and requires bounding box masks for calculation. Detailed metric definitions and analysis are provided in the manuscript.
81+
82+
## Citing This Work
83+
84+
If using this tool for research or commercial applications, please cite appropriately:
85+
86+
**Preferred Citation:**
87+
88+
```bibtex
89+
@misc{fonod2025advanced,
90+
title={Advanced computer vision for extracting georeferenced vehicle trajectories from drone imagery},
91+
author={Robert Fonod and Haechan Cho and Hwasoo Yeo and Nikolas Geroliminis},
92+
year={2025},
93+
eprint={2411.02136},
94+
archivePrefix={arXiv},
95+
primaryClass={cs.CV},
96+
url={https://arxiv.org/abs/2411.02136},
97+
doi={https://doi.org/10.48550/arXiv.2411.02136}
98+
}
99+
```
100+
**Repository Citation:**
101+
102+
```bibtex
103+
@software{fonod2025stabilo-optimize,
104+
author = {Fonod, Robert},
105+
license = {MIT},
106+
month = mar,
107+
title = {Stabilo Optimize: A Framework for Comprehensive Evaluation and Analysis for the Stabilo Library},
108+
url = {https://github.com/rfonod/stabilo-optimize},
109+
doi = {10.5281/zenodo.13828430},
110+
version = {1.0.0},
111+
year = {2025}
112+
}
113+
```
114+
115+
A [CITATION.cff](CITATION.cff) file is provided for consistent referencing.
116+
117+
## Contributing
118+
119+
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open a [GitHub Issue](https://github.com/rfonod/stabilo-optimize/issues) or submit a pull request. Your contributions are greatly appreciated!
120+
121+
## License
122+
123+
This project is distributed under the MIT License. Refer to the [LICENSE](LICENSE) file for detailed terms.

assets/benchmark_visualization.gif

5.13 MB
Loading

assets/registration_campaign.png

92.2 KB
Loading

0 commit comments

Comments
 (0)