当前位置:网站首页>Infrared dim small target detection: common evaluation indicators
Infrared dim small target detection: common evaluation indicators
2022-07-08 02:16:00 【Strawberry sauce toast】
This paper summarizes the algorithm evaluation indexes that often appear in the papers in the field of infrared weak and small target detection , And some evaluation indexes are used MATLAB Realization .
At present, the evaluation indicators summarized are the most common , Image detection rate 、ROC These curves are based on a large number of experiments to get data , Then draw tables or curves to objectively evaluate the algorithm .( therefore , There are good ones idea, We must do the experiment as soon as possible !)
The code of this article is all original , If there are deficiencies , Welcome to correct .
Common evaluation indicators (evaluation metrics)
One 、 Detection rate
And false alarm rate 
Detection rate And false alarm rate
The definition of is shown in the figure 1.
chart 1 Detection rate And false alarm rate
, Excerpt from [1]
About detection rate The understanding of the :
- Single frame image , I got it M Goals , Correct detection of N Goals , be
;
- In the image sequence , Multiple targets are photographed or appear many times , Suppose the goals co-exist M Time , The target is correctly detected N Time , be
.
About false alarm rate The understanding of the :
- Single frame image , If all targets are correctly detected , Then the false alarm rate is 0;
- In the image sequence , Image total N frame , The number of detected errors is F, be
.
What kind of test results can be regarded as “true detection“?
Two conditions must be met at the same time :
- The detection result overlaps with the real target in the image (have overlap pixels);
- The difference between the central pixel position of the detection result and the central pixel position of the real target does not exceed a certain range , The literature [1] The medium threshold is 4 pixels.
Two 、 Signal-to-noise ratio (Signal-to-Clutter Ratio, SCR)
2.1 SCR Definition
……………… The formula (1)
In style , Represents the average pixel value of the target ,
Respectively represent the pixel average value and pixel standard deviation of the background around the target .
chart 2 Schematic diagram of target and its neighborhood , Excerpt from [1], among d The size does not exceed 20 Pixel
2.2 MATLAB Calculation SCR
2.2.1 Draw a three-dimensional gray image of weak and small targets
When reading literature , You can often see the three-dimensional gray image of the target , The author shows the target before and after enhancement , Or three-dimensional gray images before and after background suppression to visually present the effect of its algorithm to readers .
In addition, drawing the three-dimensional gray image of the target can also intuitively feel the SCR. therefore , Let's first learn how to draw a three-dimensional gray image of the target .
Additional explanation , There are two options for drawing the three-dimensional gray image of the target :
(1) Some articles will choose to draw a three-dimensional gray-scale image of the whole image , Then use the arrow —> Mark the target “ Peak value ”;
(2) You can also choose to draw the local area of the target , Observe whether the local contrast of the target has been enhanced .
Here are two ways MATLAB Code and legend .
%% Draw a three-dimensional gray-scale image
img1 = imread('images/1.jpg');
if (size(img1,3) > 1)
img1 = rgb2gray(img1);
end
subplot(221)
imshow(img1);title(' Original picture ');
sub_img1 = img1(68:88,99:119); % Here, you need to manually select the location and size of the target area
subplot(222)
imshow(sub_img1);title(' Target local image 20*20');
subplot(223)
[y,x] = size(img1);
[X,Y] = meshgrid(1:x, 1:y);
surf(X, Y, img1);title(' Global three-dimensional gray image ');
shading interp;
subplot(224)
[sub_y, sub_x] = size(sub_img1);
[sub_X, sub_Y] = meshgrid(1:sub_x, 1:sub_y);
surf(sub_X, sub_Y, sub_img1);title(' Local three-dimensional gray image ');
shading interp;
chart 3 Global and local three-dimensional grayscale images of infrared images with weak and small targets
2.2.2 Goal oriented SCR
- The code given in this article is only applicable to grayscale images ;
- The reference calculation model is shown in the figure 2.
function scr = CalculateSCR(img, pos, t_size, d)
%% Functional specifications : Calculate the... Of weak and small targets SCR
%% Parameter description : img -- Original image
% pos -- The position of the target in the original image
% t_size = [a,b]-- Target size
% d -- Target neighborhood radius , The final calculated target and the size of its local area are (2d+a)*(2d+b)
% 1. Go to grayscale
if(size(img,3)>1)
img = rgb2gray(img);
end
% 2. The target size is a*b
a = t_size(1);
b = t_size(2);
T = img(ceil(pos(1)-b/2):ceil(pos(1)+b/2), ceil(pos(2)-a/2):ceil(pos(2)+a/2));
% 3. The target and its surrounding neighborhood , The size is (a+2d)*(b+2d)
B = img(ceil(pos(1)-b/2-d):ceil(pos(1)+b/2+d), ceil(pos(2)-a/2-d):ceil(pos(2)+a/2+d));
B(d:d+b,d:d+a) = 0;
% 4. Display the target image and background image respectively
figure
imshow(T);title('Target');
figure
imshow(B);title('Background');
% 5. Calculate the gray mean value of the target respectively 、 The gray mean and standard deviation of the background
T_avg = mean(T(:));
B_avg = sum(B(:)) / ((a+2*d)*(b+2*d) - a*b);
size(B)
B_1 = B(1:d,:);
B_2 = B(a+d+1:a+2*d,:);
B_3 = B(d+1:d+a, 1:d);
B_4 = B(d+1:d+a, d+b+1: 2*d+b);
B_final = [B_1(:)',B_2(:)',B_3(:)',B_4(:)'];
size(B_final);
B_std = std(double(B_final));
% 6. Calculation SCR
scr = abs(T_avg - B_avg)/B_std;
end
chart 4 Original picture 、 Target image and local background image ,
The size of the original image here is (150,200), The manually selected target location is pos=(80,108), The target size is t_size=(4,4),d = 10.
3、 ... and 、 Average signal-to-noise ratio (Average SCR,
)
When (1) There are multiple targets in a picture ;(2) When there are multiple targets in the image sequence , The average signal to clutter ratio of the target is used to evaluate the difficulty of multi-target detection and the performance of the algorithm .
The average signal to clutter ratio is defined as : …………………… The formula (2)
In style ,N Indicates the number of targets ; It means the first one i The signal to clutter ratio of three goals .
The literature [1] in , Also used Respectively represent the average signal to clutter ratio of the detected real target and the undetected real target . Usually , When the detection false alarm rate is determined ,
The smaller it is , The better the detection performance of the algorithm .
Four 、ROC curve
Weak small target detection ROC Curve and machine learning ROC The curve definition is slightly different .
Weak small target detection ROC curve , With false alarm rate (false-rate, FA) Is the horizontal axis , At the detection rate (Probability of detection, PD) For the vertical axis (FA,PD See part I for the definition of ).
Usually , When the false alarm rate is the same , The higher the detection rate , The better the performance of the algorithm .
chart 5 Different algorithms ROC Curve contrast , Excerpt from [1]
draw ROC The curve is not difficult , The difficulty lies in the need to obtain data through experiments —— The detection rate of different algorithms under the same false alarm rate .
Here is given MATLAB A simple example of drawing a line chart , Contains some tips : Set up x, y The spacing of the axes ; Set lineweight and line style ; Set up x, y Axis description
x = 0:0.5:15;
%% Here we need to replace it with the experimental results
Pd_1 = 1 - exp(-x) ;
Pd_2 = 1 - exp(-1/2*x);
% Set the display style and lineweight LineWidth
plot(x, Pd_1, '-ob', 'LineWidth', 2);
hold on
plot(x, Pd_2, '-*r', 'LineWidth', 1);
% Set the axis range
axis([0,15,0,1]);
% Set the coordinate axis range and interval
set(gca, 'XTick', [0:5:15]);
set(gca, 'YTick', [0:0.1:1]);
% Show Legend
legend('method_1', 'method_2');
% Display axis description and title
xlabel('False-rate, F_a');
ylabel('Probability of detection, P_d');
title(' Different algorithms ROC curve ');
chart 6 ROC figure
reference
[1] C. Gao et al., “Infrared Patch-Image Model for Small Target Detection in a Single Image,” vol. 22, no. 12, pp. 4996–5009, 2013.
边栏推荐
- 金融业数字化转型中,业务和技术融合需要经历三个阶段
- 《ClickHouse原理解析与应用实践》读书笔记(7)
- Introduction to ADB tools
- The way fish and shrimp go
- The circuit is shown in the figure, r1=2k Ω, r2=2k Ω, r3=4k Ω, rf=4k Ω. Find the expression of the relationship between output and input.
- Ml self realization / logistic regression / binary classification
- Direct addition is more appropriate
- 力扣6_1342. 将数字变成 0 的操作次数
- burpsuite
- adb工具介绍
猜你喜欢
科普 | 什么是灵魂绑定代币SBT?有何价值?
线程死锁——死锁产生的条件
2022国内十大工业级三维视觉引导企业一览
Monthly observation of internet medical field in May 2022
LeetCode精选200道--链表篇
Xmeter newsletter 2022-06 enterprise v3.2.3 release, error log and test report chart optimization
Unity 射线与碰撞范围检测【踩坑记录】
[knowledge map paper] attnpath: integrate the graph attention mechanism into knowledge graph reasoning based on deep reinforcement
力争做到国内赛事应办尽办,国家体育总局明确安全有序恢复线下体育赛事
Semantic segmentation | learning record (5) FCN network structure officially implemented by pytoch
随机推荐
Is it necessary for project managers to take NPDP? I'll tell you the answer
Anan's judgment
发现值守设备被攻击后分析思路
Disk rust -- add a log to the program
Applet running under the framework of fluent 3.0
关于TXE和TC标志位的小知识
MQTT X Newsletter 2022-06 | v1.8.0 发布,新增 MQTT CLI 和 MQTT WebSocket 工具
OpenGL/WebGL着色器开发入门指南
数据链路层及网络层协议要点
JVM memory and garbage collection -4-string
Strive to ensure that domestic events should be held as much as possible, and the State General Administration of sports has made it clear that offline sports events should be resumed safely and order
leetcode 873. Length of Longest Fibonacci Subsequence | 873. 最长的斐波那契子序列的长度
Leetcode featured 200 channels -- array article
How to use diffusion models for interpolation—— Principle analysis and code practice
Redission源码解析
Leetcode question brushing record | 27_ Removing Elements
Emqx 5.0 release: open source Internet of things message server with single cluster supporting 100million mqtt connections
Where to think
[knowledge map paper] r2d2: knowledge map reasoning based on debate dynamics
Alo who likes TestMan