Skip to main content

A simple and efficient implementation for the IRSTD performance analysis.

Project description

Logo

PyIRSTDMetrics: A simple and efficient implementation for the IRSTD performance analysis

arXiv

[!important]

Our exploration in this field continues with PyIRSTDMetrics, a project born from the same core motivation as our previous project PySODMetrics. ​​Think of them as twin initiatives: PySODMetrics maps the landscape of current evaluation, while its sibling (PyIRSTDMetrics) takes the next step to expand upon and rethink it. We'd love your star! 🌟

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.

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 OPDCMatching we 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

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},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyirstdmetrics-1.0.1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyirstdmetrics-1.0.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file pyirstdmetrics-1.0.1.tar.gz.

File metadata

  • Download URL: pyirstdmetrics-1.0.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyirstdmetrics-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e0d828c450c5a3529cde68a1481ff5dd80f56725952b597cc2461c4d8ec70c01
MD5 7ffeba96d55d62ed7115614ffcdee52c
BLAKE2b-256 5e3833ada37cbc0e340fb531b06766dd6297cb5da4e7dea1e10ef19b98cc0c36

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyirstdmetrics-1.0.1.tar.gz:

Publisher: python-publish.yml on lartpang/PyIRSTDMetrics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyirstdmetrics-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyirstdmetrics-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyirstdmetrics-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c858e441d5904d20af3c783cb65cc9daeadb600d4efd4e5d8a21d8120eb09fb
MD5 1ecdfe99e01075b542cf6fb52e9d4fd0
BLAKE2b-256 8aa7b33d1d34637aaab8544050b1072222a26e2a154a7bf26892f115e4d04070

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyirstdmetrics-1.0.1-py3-none-any.whl:

Publisher: python-publish.yml on lartpang/PyIRSTDMetrics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page