J. Eur. Opt. Society-Rapid Publ. 21, 43( 2025) 127
Algorithm 1. External constraint generation
Fig. 4. Diagram of intrinsic constraints.
3.4 GCM
The results of each layer will be input into CSATM as intrinsic constraints. The training of the first layer does not provide intrinsic constraints for the previous layer. We stagger the number of layers of intrinsic constraints and external constraints and provide the first layer of external constraints to the first layer of CSATM. External constraints obtained from SAE represent the addition of global information, which can make the model more robust. Algorithm 1 briefly describes the acquisition of additional constraints, taking Y( 0) as an example.
The hyperspectral image is input into SAE, but the anomaly cannot be well reconstructed by the network due to its unique characteristics. Therefore, the residual between the original image and the reconstructed image can reflect the location of the anomaly. Apply the RX algorithm on residuals to obtain external constraints. The result
T ð3Þ 2 R H 8 W 8 generated by the first layer is spatially upsampled twice to obtain the first intrinsic constraint, which is fed back to CSATM along with the second external constraint S ð2Þ 2 R H 4 W 4. When running to the last layer, the weighted average of the intrinsic constraint T ð0Þ 2 R HW and the last external constraint S ð0Þ 2 R HW is used as the final result.
4 Experimental results and analysis
4.1 Datasets and experimental setup
This article uses five real hyperspectral data for experiments, and their pseudocolor images and the corresponding ground-truth maps are shown in Figure 5. Thespectral component of the hyperspectral imager is Acousto-Optic Tunable Filter( AOTF), and we have set the wavelength range to 449 – 801 nm, which includes 89 bands with band intervals of 4 nm.
1. Meadow: The image resolution is 1000 400, with fake turf-A placed as the abnormal target, and the background includes building walls and lawns.
2. Holly: The image resolution is 600 496, with fake turf-B placed as the abnormal target, and the background includes holly flower beds and architectural shadows. Meadow and Holly were both filmed on May 26, 2022, with geographic coordinates( 38 ° 27 0 W, 114 ° 30 0 E) and a ground spatial resolution of approximately 8.4 mm, both of which belong to typical urban near ground scenes.
1. Input y ð0Þ
t 2 Y ð0Þ 2 R HWB
2. TRAIN
for i = 1:( HW)
loss ¼ loss. backward 3. TEST for i = 1:( HW)
3. Cement Street: The image resolution is 500 300. Filmed on April 6, 2024, with geographic coordinates( 38 ° 27 0 W, 114 ° 30 0 E) and a ground spatial resolution of 1.5 mm, it belongs to a cement road background and targets two alloy aircraft models.
4. Jungle-I and Jungle-II: Filmed on April 6, 2024, with geographic coordinates( 38 ° 27 0 W, 114 ° 30 0 E) and a ground spatial resolution of 3.3 mm, all of which belong to a close-range jungle background, and the image resolution is 1000 1000. Different types of fake turf-C and fake turf-D were placed in Jungle-I and Jungle-II. Meadow serves as the training set for the entire framework.
All experiments were implemented on the Ubuntu system using PyTorch 1.8 and Python 3.8, with two GeForce GRX 2080 GPUs included. Table 1 shows the model parameter settings for the Transformer module and SAE in the proposed framework. Meadow will serve as the training set for the framework.
4.2 Evaluation metrics y ð0Þ i
� SAEðy ð0Þ i r ð0Þ i ¼½y ð0Þ i � SAEðy ð0Þ i ÞŠ 2 R ð0Þ
l ¼ mean R ð0Þ; K ¼ cov½R ð0Þ Š for i = 1:( HW) TK s ð0Þ i ¼ r ð0Þ i � l �1 r ð0Þ i � l
reshape S( 0) 4. Output results S( 0) 2 R H W
There are objective and subjective analyses of the results of HAD. The subjective analysis mainly involves decisionmakers combining ground-truth maps to visually analyze the detection results. The most commonly used methods in objective analysis are receiver operating characteristics( ROC) and area under the curve( AUC). The ROC curve establishes a correlation between the probability of false alarm( PFA) and the probability of detection( PD), which is based on a common threshold s. The traditional twodimensional ROC curve is essentially composed of s-PFA relationship curve and s-PD relationship curve. The definitions of PD and PFA are as follows:
PD ¼ N d
N t
; FPA ¼ N f
N b
:
Þ 2 = B 2 2 S ð0Þ ð11Þ
where N d is the number of real target pixels detected, which is the number of pixels that belong to the target and are considered the target by the detector, N t represents