News
- 2025-9-23: Our paper (Rethinking Evaluation of Infrared Small Target Detection) accepted by NeurIPS 2025 (D&B) has been released on the arXiv (2509.16888).
Introduction
A simple and efficient implementation for the IRSTD performance analysis.
- Based on
numpy、scikit-imageandscipy. - Verification based on https://github.com/XinyiYing/BasicIRSTD
- The code structure is simple and easy to extend
- The code is lightweight and fast
Your improvements and suggestions are welcome.
Supported Metrics
| Metric | Sample-based | Whole-based | Related Class | Level |
|---|---|---|---|---|
| IoU | max,avg,adp,bin (nIoU) | bin (IoU) | CMMetrics+IOUHandler |
pixel |
| F1 | max,avg,adp,bin | bin | CMMetrics+FmeasureHandler |
pixel |
| Precision | max,avg,adp,bin | bin | CMMetrics+PrecisionHandler |
pixel |
| Recall | max,avg,adp,bin | bin | CMMetrics+RecallHandler |
pixel |
| TPR | max,avg,adp,bin | bin | CMMetrics+TPRHandler |
pixel |
| FPR | max,avg,adp,bin | bin | CMMetrics+FPRHandler |
pixel |
| Pd/Fa | ✔ | ProbabilityDetectionAndFalseAlarmRate (like MatchingBasedMetrics+DistanceOnlyMatching) |
target | |
| Pd/Fa | ✔ | ShootingRuleBasedProbabilityDetectionAndFalseAlarmRate |
target | |
| Pd/Fa | ✔ | MatchingBasedMetrics+DistanceOnlyMatching/OPDCMatching |
target | |
| hIoU | ✔ | MatchingBasedMetrics+OPDCMatching |
hybrid | |
| hIoU-based loc error analysis | ✔ | HierarchicalIoUBasedErrorAnalysis |
||
| hIoU-based seg error analysis | ✔ | HierarchicalIoUBasedErrorAnalysis |
NOTE:
- If you want to align the original implementation, use
DistanceOnlyMatching/ProbabilityDetectionAndFalseAlarmRate. - If you want a more reasonable matching effect, use
OPDCMatchingwe designed. - hIoU is a new metric that balances both pixel-level and target-level performance analysis and we provide a detailed error analysis tool based on it.
As shown in plot_average_metrics of examples/metric_recorder.py:
- precision and recall sequences can be used to plot the PR curve.
- TPR and FPR sequences can be used to plot the ROC curve.
Usage
The core files are in the folder py_irstd_metrics.
- [Latest, but may be unstable] Install from the source code:
pip install git+https://github.com/lartpang/PyIRSTDMetrics.git - [More stable] Install from PyPI:
pip install pyirstdmetrics
Examples
Performance Improvements
- In v1.0.2, we significantly optimized the OPDC matching computation (
OPDCMatching).
To reproduce the benchmark, see examples/benchmark_metrics.py.
Thanks
- BasicIRSTD is a PyTorch-based open-source and easy-to-use toolbox for infrared small target detction (IRSTD).
Citation
@misc{HierarchicalIoUBasedAnalysis,
title = {Rethinking Evaluation of Infrared Small Target Detection},
author = {Youwei Pang and Xiaoqi Zhao and Lihe Zhang and Huchuan Lu and Georges El Fakhri and Xiaofeng Liu and Shijian Lu},
year = {2025},
eprint = {2509.16888},
archiveprefix = {arXiv},
primaryclass = {cs.CV},
}
@inproceedings{IRSTD-ACM-nIoU,
title = {Asymmetric Contextual Modulation for Infrared Small Target Detection},
booktitle = WACV,
author = {Dai, Yimian and Wu, Yiquan and Zhou, Fei and Barnard, Kobus},
year = {2021},
volume = {},
number = {},
pages = {949-958},
doi = {10.1109/WACV48630.2021.00099},
issn = {2642-9381},
month = {Jan},
}
@article{IRSTD-DNANet-PdFa,
title = {Dense Nested Attention Network for Infrared Small Target Detection},
author = {Li, Boyang and Xiao, Chao and Wang, Longguang and Wang, Yingqian and Lin, Zaiping and Li, Miao and An, Wei and Guo, Yulan},
journal = IEEE_J_IP,
year = {2023},
volume = {32},
number = {},
pages = {1745-1758},
doi = {10.1109/TIP.2022.3199107},
issn = {1941-0042},
month = {},
}
@article{MIRSTD-ShootingRules-DTUM,
title = {Direction-Coded Temporal U-Shape Module for Multiframe Infrared Small Target Detection},
author = {Ruojing Li and Wei An and Chao Xiao and Boyang Li and Yingqian Wang and Miao Li and Yulan Guo},
journal = {IEEE Transactions on Neural Networks and Learning Systems},
year = {2023},
volume = {36},
pages = {555-568},
}
Metadata
Release files for pyirstdmetrics 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyirstdmetrics-1.0.2.tar.gz | 16.1 kB | With provenance | Details for pyirstdmetrics-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyirstdmetrics-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for pyirstdmetrics-1.0.2-py3-none-any.whl |
Total release size: 30.1 kB
Release files / pyirstdmetrics-1.0.2.tar.gz
| Download URL | pyirstdmetrics-1.0.2.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee608f526d673d1e3a58a219114a71c8ac2c5fdd3c9d44d6f392d2577ceb7ecb
|
|
BLAKE2b-256 checksum How to use checksums |
abf96a52d22aad66ab48f2b49dc2f0447183bbc611cfbd1754363f96b5114ffe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 23, 2026.
Transparency logRelease files / pyirstdmetrics-1.0.2-py3-none-any.whl
| Download URL | pyirstdmetrics-1.0.2-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3268eb40a0f8b119e8848a0a630451dab7442a034f82c65aa997852bb6f116e1
|
|
BLAKE2b-256 checksum How to use checksums |
f102d538f022f74c45423f233825fbff83fbfe93c6ee4257ebdbdbf0822fb6a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 23, 2026.
Transparency logSecurity for pyirstdmetrics 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pyirstdmetrics-1.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.