TensorISTD is an open-source MATLAB toolbox designed for optimization-based Infrared Small Target Detection (ISTD) research and evaluation.
It provides a unified, streamlined evaluation pipeline covering:
- Single-frame / Multi-frame tasks
- Matrix / Tensor representations
- Mainstream evaluation metrics (SCRG, BSF, CG, and 3D-ROC series)
Objectives:
- Enable rapid prototyping and verification of optimization-based detection methods.
- Establish a standardized benchmark for fair comparison and reproducibility.
- Encourage community contributions to enrich the algorithm library.
Table of Contents
Note:
- This benchmark also includes the code of our profound and powerful baseline, STPA-FCTN, which can be found in TensorISTD/algorithms/STPA_FCTN.
- This repository will be updated regularly, so stay tuned for improvements and new features!
- If you would like to contribute, please contact us!
Matlab 2021b or higher.
π Document Structure
TensorISTD/
βββ algorithms/ # Core detection algorithms
β βββ 4D_ISTD/ # [1]
β βββ LogTFNN/ # [2]
β βββ NPSTT/ # [3]
β βββ PSTNN/ # [4]
β βββ STPA_FCTN/ # Ours
βββ all_results/ # Raw detection outputs
β βββ sequence1/ # Sample sequence
β βββ STPA_FCTN/ # Algorithm-specific results
βββ fig_results/ # Visualization outputs
β βββ sequence1/ # Sequence-specific figures
βββ mat_results/ # Performance metrics
β βββ curve_results/ # .mat documents
β βββ index_results/ # Metrics records(3D-ROC,SCR, etc.)
βββ time_results/ # Runtime logs
β βββ STPA-FCTN.txt # Time consumption record
βββ utils/ # Support utilities
β βββ analyse_pts.m # Point analysis script
β βββ curves_draw.m # Visualization generator
β βββ get_algo_result.m # Algorithm output collector
β βββ get_curves.m # Metrics calculator
β βββ measure_calculator.m # SCR/CG/BSF/BSR calculator
β βββ pt_nms.m # Non-maximum suppression
βββ 3D_Visualization
βββ LICENSE # open-source license
βββ README.md
βββ color1.mat
βββ evaluation.m
Main command
evaluation.mUse all the evaluation algorithms to get the result plots for all the evaluation datasets present in . /result in the mat file.
1. Inititalization
Select the desired algorithm name and datasetsοΌ
eval_algo_names = ...
{
'STPA_FCTN' %'TT','TR','LogTFNN','NPSTT','PSTNN','RIPT','STT'
};
eval_data_names = ...
{
'sequence1'
};Fill in the following configurationοΌ
img_types = {'*.jpg', '*.bmp', '*.png'};
algo_base_path = '.\algorithms\';
data_base_path = '.\dataset\data\';
res_base_path = '.\all_result\';
time_path = '.\time_results\';2. Choose single-frame or multi-frame algorithmοΌ
Single-frame (PSTNN, etc.)
get_algo_result(eval_algo_names, eval_data_names, ...
img_types, algo_base_path, data_base_path, res_base_path, time_path );Multi-frame (STT, NPSTT, 4-D-TT/TR, STPA-FCTN, etc.)
get_algo_result_multiframe(eval_algo_names, eval_data_names, ...
img_types, algo_base_path, data_base_path, res_base_path, time_path );π‘ Note
If the metrics are calculated directly from the existing test image, then comment out this section and go directly to Evaluation.
In this repo, we include the following metrics:
β SCRG, β CG, β BSF,
β
Diverse AUC Analysis ([6]):
1. Calculate the corresponding .mat file based on Get Results or the existing result plots with the target coordinates of the dataset and store it in the curve index folder.
get_curves(eval_algo_names, eval_data_names, thres_num, radius, res_base_path, ...
mat_base_path, txt_base_path, mask_base_path, preimg_type);This step will combine the result plots from step 1 and . GT under /dataset/ann/ to get the roc sequence results
- Related ConfigurationsοΌ
%% evaluation.m
mat_base_path = '.\mat_results\';
txt_base_path = '.\dataset\anno\';
preimg_type = '*.png';2. Calculate the Multi-perspective AUC Analysis:
curves_drawer(1, eval_algo_names, eval_data_names, figure_base_path, mat_base_path, x_axis_ratio, FPR_thres);3. Calculate the SCRG gain, CG, BSF metrics:
measure_calculator(eval_algo_names, eval_data_names, data_base_path, res_base_path, ...
mat_base_path, txt_base_path, img_types, preimg_type);4. Draw the 3D-ROC figures
- πThe evaluation result will be saved in
index_results:
βββ./mat_result/
β βββ curve_results
β β βββ sequence1_STPA-FCTN.mat
β β βββ ...
β βββ index_results
β β βββ sequence1.txt
β β βββ ...
-
The 3D-ROC image can be obtained during the execution of step 3.
- Related ConfigurationsοΌ
%% evaluation.m figure_base_path = '.\fig_results\'; x_axis_ratio = 1e-4; FPR_thres = 1;
%% utils\curves_drawer.m % Line Color color_map = [ ... % 55/255 126/255 184/255; % Blue % 77/255 175/255 74/255; % Green % 228/255 26/255 28/255; % Red % 255/255 217/255 47/255; % Yellow ]; % Line Type LineType = {':' }; %'-.'
- π The evaluation 3D-ROC result has the following structure:
βββ./fig_results/ β βββ sequence1 β β βββ SOTA_1 β β βββ SOTA_2 β β βββ SOTA_3 β β βββ SOTA_4 β βββ sequence2 β β βββ SOTA_1 β β βββ ... β βββ ...- The following figures are 3D-ROC results of STPA-FCTN in seq 1.
- Comparison of multiple algorithms.
-
This following script provides a standardized pipeline for generating publication-quality 3D visualizations from 2D images.
- Key Configuration Parameters
- Figure Window
figure('Units', 'pixels', 'Position', [100 100 703 641]);
- Axis Configuration
xticks(0:50:250); xtickformat('%d'); xlim([0 250]); xtickangle(0); ...
- View Perspective
view(-37.5,30); % Set 3D view perspective (azimuth -37.5Β°, elevation 30Β°)
- Color Configuration
The colormap is provided as color1.mat.
- 3D Visualization
| Method | Averaged Values | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SCRG | BSF | CG | Time(s) | |||||||||
| PSTNN | Inf | Inf | 1.4788 | 0.9429 | 0.7011 | 6.1038e-3 | 1.6249 | 1.2251e2 | 1.6310 | 0.9238 | 0.6950 | 0.1606 |
| LogTFNN | 4.5912 | 5.1813 | 1.0208 | 0.9756 | 0.5694 | 6.5000e-2 | 1.5385 | 0.9629e2 | 1.5450 | 0.9629 | 0.5629 | 1.3208 |
| NPSTT | Inf | Inf | 1.8846 | 0.9699 | 0.7824 | 5.1423e-3 | 1.7517 | 1.5926e2 | 1.7523 | 0.9649 | 0.7818 | 5.1299 |
| 4-D TT | 89.171 | 41.837 | 2.3124 | 0.9921 | 0.9277 | 5.1489e-3 | 1.9147 | 1.8021e2 | 1.9199 | 0.9869 | 0.9226 | 0.8694 |
| 4-D TR | 100.62 | 49.084 | 2.2463 | 0.9976 | 0.9374 | 5.0947e-3 | 1.9300 | 1.8409e2 | 1.9351 | 0.9926 | 0.9324 | 2.0373 |
| STPA-FCTN | 149.26 | 68.905 | 2.3292 | 0.9996 | 0.9581 | 5.0778e-3 | 1.9527 | 1.8893e2 | 1.9579 | 0.9945 | 0.9530 | 0.9926 |
π‘ Note
-
In multi-frame evaluation, an "Inf" value does not necessarily indicate that all frames produced infinite results. This can occur if even a single frame yields an "Inf" value. Therefore, for multi-frame scenarios, we recommend using CG or 3-D ROC metrics for more robust and reliable assessment.
-
We adopted sequences from [1], and we also provide our data collection [2].
If you find the code useful, please consider citing our paper using the following BibTeX entry.
@ARTICLE{11333368,
author={Wu, Fengyi and Chen, Siyu and Liu, Simin and Tao, Bingjie and Luo, Junhai and Peng, Zhenming},
journal={IEEE Transactions on Geoscience and Remote Sensing},
title={A Comprehensive Benchmark for Spatiotemporal Tensor-Based Infrared Small Target Detection},
year={2026},
volume={64},
number={},
pages={1-20},
keywords={Tensors;Benchmark testing;Three-dimensional displays;Correlation;Object detection;Transformers;Computational modeling;Accuracy;Systematics;Clutter;Benchmark;fully connected tensor network completion;infrared small target detection (ISTD)},
doi={10.1109/TGRS.2026.3651631}}
[1] F. Wu, H. Yu, A. Liu, J. Luo, and Z. Peng, βInfrared small target detection using spatiotemporal 4-d tensor train and ring unfolding,β IEEE Trans. Geosci. Remote Sens., vol. 61, pp. 1β22, 2023.
[2] X. Kong, C. Yang, S. Cao, C. Li and Z. Peng, "Infrared Small Target Detection via Nonconvex Tensor Fibered Rank Approximation," in IEEE Transactions on Geoscience and Remote Sensing, vol. 60, pp. 1-21, 2022.
[3] G. Wang, B. Tao, X. Kong, and Z. Peng, βInfrared small target detection using nonoverlapping patch spatialβtemporal tensor factorization with capped nuclear norm regularization,β IEEE Trans. Geosci. Remote Sens., vol. 60,pp. 1β17, 2021.
[4] L. Zhang and Z. Peng, βInfrared small target detection based on partial sum of the tensor nuclear norm,β Remote Sens., vol. 11, no. 4, p. 382, 2019.
[5] C. -I. Chang, "An Effective Evaluation Tool for Hyperspectral Target Detection: 3D Receiver Operating Characteristic Curve Analysis," in IEEE Transactions on Geoscience and Remote Sensing, vol. 59, no. 6, pp. 5131-5153, June 2021,
Note: If you used the above codes, please cite the relevant paper.
Despite the organizers of this repo, we would like to thank the former contributors--Tianfang Zhang, Jian Li, Yuelu Wei, Guanghui Wang, Xuan Kong, Haiyang Yi, Ruochen Qie, Hang Yu, Anran Liu, Simin Liu, and Zhenming Peng--for this Toolbox.











