Gamma spectrum peak position detection and nuclide identification method based on improved YOLO and gaussian fitting

CN122967037APending Publication Date: 2026-10-23SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611149176.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0005]此外,现有基于深度学习的能谱分析方法普遍针对特定类型的探测器设计,泛化能力有限

Benefits of technology

[0096]1、本发明所述的基于改进YOLO与高斯拟合的γ能谱峰位检测及核素识别方法提出了一种融合目标检测与物理后处理的γ能谱分析方法。该方法将一维能谱图像化,利用YOLO模型实现峰区域的自动检测,再通过基于物理模型的高斯拟合后处理算法精确解析峰参数。相比端到端分类模型,本发明所述的基于改进YOLO与高斯拟合的γ能谱峰位检测及核素识别方法能够输出峰位能量、峰边界等物理参数,能够增强分析过程的可解释性与结果的可验证性;相比传统寻峰方法,能够实现全自动化,显著提升复杂能谱,特别是重叠峰的分析精度与鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122967037A_ABST
    Figure CN122967037A_ABST
Patent Text Reader

Abstract

The application relates to the field of energy spectrum analysis and nuclide / element identification, and discloses a gamma energy spectrum peak position detection and nuclide identification method based on improved YOLO and Gaussian fitting. The method can maintain the high efficiency of deep learning while explicitly outputting peak parameters with clear physical meanings. The method comprises the following steps: S1, constructing a gamma spectrum image dataset; S2, setting a lightweight target detection GM-YOLOv11n model; S3, training the GM-YOLOv11n model using a training set; S4, post-processing of detection results and separation of overlapping peaks; and S5, nuclide identification and model effect evaluation. Further, a dynamic convolution kernel adaptive peak detection network is integrated in the backbone network of the GM-YOLOv11n to replace the original fixed convolution layer. The method can realize full automation, significantly improve the analysis accuracy and robustness of complex energy spectrum, especially overlapping peaks, and is suitable for deployment on resource-limited edge computing devices or embedded systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy spectrum analysis and nuclide / element identification, specifically to a method for detecting peak positions in γ-ray spectra and identifying nuclides based on improved YOLO and Gaussian fitting. Background Technology

[0002] In fields such as nuclear safety monitoring, environmental radiation assessment, nuclear medicine, and nuclear waste treatment, gamma spectroscopy analysis is a core technology for identifying radionuclides. Its physical basis lies in the fact that the gamma photons released during the decay of different radionuclides possess characteristic energies. Using a detector (such as a NaI(Tl) scintillator detector) and a multichannel analysis system, the energy spectrum distribution can be obtained with channels as the horizontal axis and counts as the vertical axis. Accurately extracting information such as the position, boundaries, and area of ​​characteristic peaks from the measured gamma spectrum is a crucial prerequisite for achieving precise nuclide identification.

[0003] However, actual gamma-ray spectra are affected by multiple factors, including detector energy resolution limitations, statistical fluctuations in radioactive decay, interference from overlapping characteristic peaks, and background noise, often exhibiting complex forms such as peak broadening, baseline drift, and weak peak submersion. Traditional energy spectrum analysis methods mainly include smoothing filtering, background subtraction, energy calibration, and peak location. Common peak-finding methods, such as derivative peak finding, covariance peak finding, and symmetric zero-area transformation, are computationally simple, but generally require manual setting of multiple parameters, are sensitive to noise, and are inefficient and subjective when processing overlapping peaks, weak peaks, or low count rate spectra, making it difficult to meet the needs of large-scale automated and high-reliability analysis.

[0004] In recent years, deep learning technology has provided new avenues for nuclide identification. Some studies treat nuclide identification as an end-to-end classification problem, directly mapping energy spectra to nuclide categories using models such as convolutional neural networks. However, these methods completely bypass the intermediate step of peak finding, which has clear physical significance. The model's decision-making process operates as a "black box," unable to output key physical parameters such as the boundary positions, peak energies, and peak heights of characteristic peaks. The identification results are untraceable, difficult to verify, and lack physical interpretability. This is especially true when dealing with nuclide identification problems such as... 65 Zn (1115.5 keV) and 60 When overlapping peaks are generated by neighboring nuclides such as Co (1173.2 keV), end-to-end classification models cannot provide separation and analysis results for each sub-peak, severely limiting their reliability in high-risk scenarios such as nuclear safety regulation and radioactive waste classification. Therefore, how to integrate the physical logic of energy spectrum analysis into deep learning models to achieve high-precision, interpretable, and lightweight automatic peak position detection and nuclide identification is a technical problem that urgently needs to be solved in this field.

[0005] Furthermore, existing deep learning-based energy spectrum analysis methods are generally designed for specific types of detectors, resulting in limited generalization capabilities. For example, a model trained for a NaI(Tl) scintillator detector (wide peak shape) is difficult to accurately detect when directly applied to X-ray spectra acquired by a silicon drift detector (narrow peak shape) due to the significant difference in peak width (wide peak FWHM approximately 50 keV, narrow peak FWHM approximately 0.15 keV). Similarly, the alpha spectrum has extremely narrow peak shapes (FWHM approximately 20 keV), which existing models also struggle to handle effectively. The fundamental reason is that existing models use fixed-size convolution kernels, which can only adapt to peak widths of a specific size. Therefore, designing a universal energy spectrum peak detection method that can adaptively select the convolution kernel size based on peak width is another technical problem that urgently needs to be solved in this field. Summary of the Invention

[0006] The technical problem to be solved by this invention is to provide a method for gamma spectrum peak position detection and nuclide identification based on improved YOLO and Gaussian fitting that can maintain the high efficiency of deep learning while explicitly outputting peak parameters with clear physical meaning, and realizing interpretable automated energy spectrum analysis.

[0007] The technical solution adopted by this invention to solve its technical problem is: a method for detecting peak positions and identifying nuclides in the γ-ray spectrum based on improved YOLO and Gaussian fitting, comprising the following steps:

[0008] S1. Construct a γ-energy spectrum image dataset:

[0009] S2. Set up a lightweight target detection GM-YOLOv11n model;

[0010] The GM-YOLOv11n model takes a preprocessed energy spectrum grayscale image as input and outputs the coordinates, category, and confidence score of the feature peak detection box.

[0011] The GM-YOLOv11n model includes a backbone network, a neck network, and a detection head; the backbone network introduces a Ghost module to replace traditional convolution, and the neck network and detection head undergo structured pruning.

[0012] S3. Train the GM-YOLOv11n model using the training set;

[0013] Input image size adjusted to The SGD optimizer was used, with an initial learning rate of 0.01, momentum factor of 0.937, and weight decay coefficient of 0.0005; the batch size was set to 16, and the number of training epochs was set to 300.

[0014] The loss functions include bounding box regression loss, classification loss, and target-specific loss, all using binary cross-entropy loss. During training, the mAP performance on the validation set is monitored, and the best model is saved. The model weights at which the mAP@0.5:0.95 metric is highest on the validation set are used. After each iteration during training, the validation set mAP@0.5:0.95 is calculated, and the model parameters at which this metric reaches its historical maximum value are saved. If the validation set mAP does not improve for 20 consecutive iterations, training is terminated early to prevent overfitting.

[0015] S4. Post-processing of detection results and separation of overlapping peaks:

[0016] After the GM-YOLOv11n model completes the peak region detection of the energy spectrum image, it outputs the detection bounding box in the image coordinate system.

[0017] The post-processing workflow for detection results includes image-channel inverse mapping, overlapping peak separation and analysis, peak position refinement, and energy calibration; specifically, it includes the following steps:

[0018] S41, Image-channel inverse mapping and energy spectrum data extraction;

[0019] Normalize the coordinates of the bounding boxes detected by GM-YOLOv11n Convert back to the original energy spectrum channel domain; first, convert to the image pixel coordinate system:

[0020] ;

[0021] Based on the compression ratio during forward mapping, i.e., 1 pixel corresponds to 2 energy spectrum channels, reverse mapping is performed to the energy spectrum channel domain:

[0022] ;

[0023] Obtain the region of interest in the energy spectrum From raw energy spectrum data Extract the counting sequence of the corresponding channel interval. The extracted sequence is reconstructed by linear interpolation to restore channel-level resolution. The reconstructed sequence retains the statistical properties and peak shape characteristics of the original energy spectrum.

[0024] S42. To address the potential overlap of adjacent nuclides within the detection area, perform peak separation and analysis.

[0025] The overlapping peak separation analysis employs an analytical separation method based on second-derivative convolution and Gaussian iterative fitting; specifically, it includes the following steps:

[0026] S421, second derivative convolution enhancement; in the extracted overlapping peak region signal Above, the second-order Gaussian derivative kernel function is used to perform convolution operations to achieve noise suppression and feature enhancement;

[0027] The expression for the second-order Gaussian derivative kernel function is:

[0028] ;

[0029] The expression for convolution is:

[0030] ;

[0031] in, The scale parameter controls the width of the convolution kernel; It is the independent variable in the convolution kernel function, representing the channel offset (in terms of the number of channels) of the current calculation position relative to the center of the convolution kernel, and its value range is integer. It is a second-order Gaussian derivative kernel function, used to perform convolution operations on energy spectrum signals to enhance the second derivative in the peak region, thereby highlighting the peak inflection point and suppressing low-frequency noise. It is the energy spectrum channel number (integer) corresponding to the current convolution operation, indicating the channel position aligned with the center of the convolution kernel. This refers to the offset (integer) within the convolution kernel relative to the center position i, with a value range of [-3]. , 3 ] is used to traverse the neighborhood channels covered by the convolution kernel. The signal value at channel i is the enhanced signal value after being enhanced by second-order Gaussian derivative convolution, and its local extremum points correspond to the candidate positions of peaks in the original energy spectrum. This refers to the value of the reconstructed energy spectrum count sequence at channel (i+k), i.e., the count intensity of each channel within the coverage area of ​​the convolution kernel. Combined with the energy calibration coefficient... keV / channel;

[0032] S422, Initial parameter estimation; from convolutional enhancement signal Extract the initial physical parameters of the overlapping peaks;

[0033] Peak position location: identification Two significant local extrema in This corresponds to the center position of the double peaks in the original energy spectrum;

[0034] Peak height estimation: Obtain the net count of the original energy spectrum at the location point. ,in This is a local background estimation function; This is the initial estimate of the peak height of the first sub-peak, representing the net count after deducting the local background at the first peak position in the original energy spectrum, expressed in counts. For the reconstructed energy spectrum counting sequence in channel The original count value at the channel position corresponding to the first local extremum (i.e., the original count value before deducting the background) is given. Initial peak width: The initial peak width standard deviation is set based on the detector resolution. aisle;

[0035] S423. Iterative optimization fitting; construct a double Gaussian superposition model to describe the overlapping peak morphology, the model expression is:

[0036] ;

[0037] in Let be the parameter vector to be optimized. The base term is linear; a phased iterative optimization is employed; the iteration termination criterion is the change in the normalized sum of squared residuals. Or reach the maximum number of iterations ;

[0038] S43. Perform refinement processing on all identified peaks; first, implement local weighted smoothing:

[0039] ;

[0040] in This is the current energy spectrum channel number to be smoothed. Weighting function. The design employs a triangular window, with the center having the greatest weight and decreasing weight at the edges; It is the count of the original energy spectrum at channel (i+k). This is the smoothed count result at channel i after local weighted smoothing.

[0041] Perform precise peak search in a smooth sequence:

[0042] ; The initial peak channel position is obtained by Gaussian fitting. Local search radius, take Channel, indicating that in the thought Center Search for the precise peak position within the interval. It is the final peak channel position determined after local refinement search, which is the one with the largest smooth count in the neighborhood.

[0043] Establish a channel-energy linear conversion model The calibration coefficients are determined through standard source calibration; using 137 A basic linear relationship is established using Cs (661.7 keV), through... 60 Co bimodal verification of calibration accuracy and linearity, goodness of fit. Finally, the refined peak channel Convert to energy value ;

[0044] S5. Nuclide identification and model performance evaluation;

[0045] S51. Probabilistic matching mechanism based on Bayesian framework;

[0046] Establish a nuclide database Each nuclide Associate its characteristic energy set ; represents the first The set of characteristic gamma-ray energies corresponding to a certain nuclide, among which This indicates the sequence number of the different energy characteristic peaks that the nuclide may emit. For the extracted peak energy... The matching process is based on a Bayesian framework; then, the probability is verified, specifically expressed as:

[0047] ;in Peak energy was observed Under these conditions, the peak belongs to a nuclide. The posterior probability. This refers to the assumption that the peak originates from a nuclide. At that time, energy was observed. The likelihood probability. Nuclide The prior probability is equal to 1 / M when there is no prior information.

[0048] The likelihood function adopts a Gaussian distribution:

[0049] ; It is the characteristic peak energy value (unit: keV) extracted from the energy spectrum and converted by energy calibration. Nuclide No. Reference energy values ​​(in keV) for each characteristic peak. The total uncertainty in energy measurement combines detector energy resolution and calibration system error. Refers to the energy resolution of the detector.

[0050] in , For detector energy resolution, The scale system error is considered; the decision rule is to select the nuclide with the highest posterior probability as the identification result.

[0051] ;

[0052] The verification conditions include: (1) posterior probability threshold (2) Energy deviation constraint ;

[0053] Nearly half of the data sets for constructing gamma-ray spectrum images involve the following steps:

[0054] We acquired measured single-source gamma spectrum data and constructed a spectrum dataset containing single-source and multi-source mixtures using a data synthesis method based on physical statistical independence.

[0055] Each energy spectrum in the dataset is normalized by counting, and the one-dimensional energy spectrum data is converted into a two-dimensional grayscale image by proportional compression coding to obtain a standardized energy spectrum image dataset.

[0056] Furthermore, step S1 includes the following steps:

[0057] S11. Acquisition of measured single-source energy spectrum data;

[0058] S12. Synthesis of multi-source energy spectrum data based on physical constraints; synthesis of multi-source mixed energy spectra using a linear superposition method based on the statistical independence of gamma-ray detection; mixed energy spectrum. Construct using the following formula:

[0059] ;

[0060] in, For the first Single-source energy spectrum of a radioactive source The background energy spectrum, The number of radioactive sources in the mixed source is denoted by ; using this method, energy spectrum datasets containing dual-source, triple-source, and five-source mixtures were constructed, totaling 3120 sets;

[0061] S13, Energy Spectrum Normalization and Image Coding;

[0062] All energy spectrum data were normalized by counting; the original energy spectrum was... Total count Normalized energy spectrum This transforms it into a probability density distribution;

[0063] The normalized 2048-channel one-dimensional energy spectrum is converted into a 1024-pixel-width two-dimensional grayscale image through proportional compression encoding.

[0064] S14. Dataset Labeling and Partitioning: A hybrid strategy combining first-order derivative peak finding and manual experience-based supplementation is employed to accurately label the feature peak regions in the image, generating bounding box labels. The specific process for manual experience-based supplementation is as follows: For feature peaks in high-energy regions (energy above 1000 keV) or low-count-rate regions (total count of a single peak less than 50), first-order derivative peak finding may result in zero-crossing drift or failure to detect due to statistical fluctuations. In this case, researchers with experience in energy spectrum analysis manually adjust the bounding box within the corresponding channel interval based on the known characteristic energy positions of the nuclide (referencing the nuclide database) to ensure that the left and right boundaries of the peak region completely cover the peak shape (including the valley to the baselines on both sides). During manual labeling, the following guidelines are followed: the left boundary is taken at the half-height position of the rising edge of the peak, and the right boundary is taken at the half-height position of the falling edge of the peak; if overlapping peaks exist, the lowest point of the valley is used as the sub-peak boundary. This manual labeling result serves as the final label for model training. The final dataset is randomly divided into training, validation, and test sets in an 8:1:1 ratio.

[0065] Furthermore, the backbone network of the GM-YOLOv11n model mentioned in step S2 is a lightweight backbone network based on the Ghost module;

[0066] Generated from intrinsic features through a simple linear transformation; where intrinsic features refer to basic feature maps with complete semantic information extracted from the input data through standard convolution. In the Ghost module, the number of intrinsic feature maps *m* is less than the number of target output channels *n*, and they are the core foundation for subsequently generating more redundant features through inexpensive linear transformations. This is achieved through the Ghost module, for the input... ,in It is the input tensor of the Ghost module, with dimensions of ,in Input the number of channels. and These represent the height and width (spatial dimension) of the input feature map, respectively. In the γ-ray spectral image analysis task, X represents the feature map of the intermediate layer of the backbone network, and its spatial dimension varies with the network depth. First, a small number of intrinsic feature maps are generated through a single ordinary convolution. The target number of output channels is given by the following formula:

[0067] ;

[0068] in For each intrinsic feature map, the kernel is used as the convolution kernel; then, for each intrinsic feature map... Apply A cheap linear transformation ;generate The ghost's characteristics are shown in the following formula:

[0069] ;

[0070] Finally, all feature maps are concatenated to obtain the output. ;when At that time, the computational cost of the Ghost module is approximately one-third that of the standard convolution. In the formula, s is the feature mapping ratio;

[0071] The GM-YOLOv11n-backbone is constructed by replacing all traditional convolutional layers in the standard YOLOv11n backbone network with Ghost modules.

[0072] Based on replacing the backbone network, redundant convolutional layers and channels in the neck network and detection head are structurally pruned; key components that have been verified to be effective by the nuclide identification task, namely the C3K, C3K2, SPPF, and C2PSA modules, are retained; the pruned model is denoted as GM-YOLOv11n.

[0073] Furthermore, step S423 employs a phased iterative optimization approach, with the specific steps as follows:

[0074] Width optimization stage: fixed Assuming Optimize common width parameters ;

[0075] Position optimization phase: Fixed optimization and Optimize peak position parameters ;

[0076] Height and background optimization stage: fixed , ,optimization .

[0077] Furthermore, in step S2, an adaptive peak detection network with dynamic convolutional kernels is integrated into the backbone network of GM-YOLOv11n to replace the original fixed convolutional layers.

[0078] The specific integration location is as follows: after the initial convolutional layer, a dynamic convolutional kernel module is used to replace the original C3k2 module, so that the entire backbone network has the ability to adaptively process peaks of different widths.

[0079] The aforementioned adaptive peak detection network based on dynamic convolution kernels is applied to peak position detection in gamma-ray spectra, X-ray spectra, and alpha-ray spectra.

[0080] The adaptive peak detection network based on dynamic convolution kernels determines the width of the peak through a "multi-scale competitive response" mechanism: the same input signal passes through three convolution kernels of different sizes at the same time, and the response intensity of each is compared - the response of a narrow peak is strong when passing through a small convolution kernel and weak when passing through a large convolution kernel, while the response of a wide peak is the opposite.

[0081] The construction of an adaptive peak detection network based on dynamic convolutional kernels includes the following steps:

[0082] A. Multi-scale competitive response module:

[0083] Set up three parallel branches with different kernel sizes: a narrow branch, a medium branch, and a wide branch.

[0084] Narrow branch: kernel size 3, input channels 16, output channels 32;

[0085] Middle branch: kernel size 7, input channels 16, output channels 32;

[0086] Wide branch: kernel size 15, input channels 16, output channels 32;

[0087] B. Calculation of Competition Response Weights:

[0088] The response weights of each branch are calculated using a competitive attention mechanism; the outputs of the three branches are concatenated, and then processed through global pooling and a fully connected layer to output the weight coefficients of the three branches. ;

[0089] These are the weight coefficients for narrow branches, medium branches, and wide branches, respectively.

[0090] The weighting coefficients reflect the strength of each branch's response to the current input—for narrow-peak inputs, Maximum; during peak input, maximum;

[0091] C. Dynamic fusion output;

[0092] The outputs of the three branches are weighted and fused according to their respective weight coefficients to obtain the final output features:

[0093] ;

[0094] This fusion mechanism allows the output of the small convolution kernel branch to be used primarily in narrow peak regions to preserve details, while the output of the large convolution kernel branch to be used primarily in wide peak regions to cover the complete peak shape; thus achieving the function of dynamically selecting the convolution kernel based on the peak width.

[0095] The beneficial effects of this invention are:

[0096] 1. This invention proposes a gamma-ray spectrum peak position detection and nuclide identification method based on improved YOLO and Gaussian fitting, which integrates target detection and physical post-processing. This method visualizes the one-dimensional energy spectrum, uses the YOLO model to automatically detect peak regions, and then accurately analyzes peak parameters using a Gaussian fitting post-processing algorithm based on a physical model. Compared to end-to-end classification models, this invention's gamma-ray spectrum peak position detection and nuclide identification method based on improved YOLO and Gaussian fitting can output physical parameters such as peak energy and peak boundaries, enhancing the interpretability of the analysis process and the verifiability of the results. Compared to traditional peak-finding methods, it achieves full automation, significantly improving the analysis accuracy and robustness of complex energy spectra, especially overlapping peaks.

[0097] 2. The GM-YOLOv11n lightweight target detection network constructed based on the improved YOLO and Gaussian fitting γ-ray spectrum peak position detection and nuclide identification method described in this invention, by introducing Ghost modules to replace standard convolutions in the backbone network and combining structured pruning strategies, achieves a model parameter count of less than 1.6M and a computational cost of less than 3.5 GFLOPs while maintaining high detection accuracy. Compared with the standard YOLOv11n model, the number of parameters is reduced by about 39.3% and the computational cost is reduced by about 48.4%, making it suitable for deployment on resource-constrained edge computing devices or embedded systems.

[0098] 3. The γ-ray spectrum peak position detection and nuclide identification method based on improved YOLO and Gaussian fitting described in this invention integrates an adaptive peak detection network with dynamic convolutional kernels into the backbone network of GM-YOLOv11n, replacing the original fixed convolutional layers. The adaptive peak detection network with dynamic convolutional kernels determines the width of the feature peaks (narrow or wide) through a multi-scale competitive response mechanism, and dynamically selects convolutional kernels of different sizes for feature extraction based on the determination results. Compared with traditional networks with fixed convolutional kernels, the adaptive peak detection network with dynamic convolutional kernels can simultaneously handle narrow peaks, such as X-ray peaks and alpha particle peaks, and wide peaks, such as high-energy γ-ray peaks of NaI detectors, which can significantly improve the model's detection capability and generalization ability for peaks of different widths. Attached Figure Description

[0099] Figure 1 This is a flowchart of the method for detecting γ-ray peak positions and identifying nuclides based on improved YOLO and Gaussian fitting in an embodiment of the present invention;

[0100] Figure 2 This is a schematic diagram of single-source and hybrid-source γ-ray spectrum images in an embodiment of the present invention;

[0101] Figure (a) is 137 Cs γ energy spectrum image; (b) is 137 Cs+ 60 Co γ energy spectrum image;

[0102] Figure 3 This is a diagram of the GM-YOLOv11n network structure in an embodiment of the present invention;

[0103] Figure 4 This is a structural diagram of the Ghost module in an embodiment of the present invention.

[0104] Figure 5 This is for the embodiments of the present invention. 65 Zn+ 60 Comparison of Co overlapping peak separation effects;

[0105] Figure 6 This is a schematic diagram of the nuclide identification results in an embodiment of the present invention;

[0106] Figure 7 This is a block diagram of the dynamic routing network structure in an embodiment of the present invention;

[0107] Figure 8 This is an X-ray energy spectrum test pattern in an embodiment of the present invention;

[0108] Figure 9 This is an alpha-ray energy spectrum test diagram in an embodiment of the present invention. Detailed Implementation

[0109] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0110] Example 1

[0111] This embodiment provides a method for gamma-ray spectrum peak position detection and nuclide identification based on improved YOLO and Gaussian fitting, including the following steps:

[0112] S1. Construct a γ-energy spectrum image dataset:

[0113] S11. Measured Single-Source Energy Spectrum Data Acquisition. Measurements were performed in a lead-free shielded environment using a NaI(Tl) scintillator detector (crystal diameter 7.62 cm) in conjunction with a DSPEC50 digital multichannel spectrometer. Five standard gamma-ray sources were used in the experiment: 109 Cd, 137 Cs、 54 Mn, 65 Zn and 60 Co. systematically set three independent variable parameters: detection distance (16cm to 46cm, in 5cm intervals), measurement time (30s, 60s, 90s, 120s), and detection angle (0°, 30°, 45°, 60°, 90°), and obtained a total of 720 sets of measured single-source energy spectrum data. Each energy spectrum contains 2048 channels.

[0114] S12. Synthesis of Multi-Source Energy Spectrum Data Based on Physical Constraints. Due to laboratory safety management restrictions, it is not possible to measure multiple radiation sources simultaneously. Based on the statistical independence of gamma-ray detection, a linear superposition method is used to synthesize the mixed energy spectrum of multiple sources. Mixed Energy Spectrum Constructed from equation (1):

[0115]

[0116] in, For the first Single-source energy spectrum of a radioactive source The background energy spectrum, denoted as the number of radioactive sources in the hybrid source. Using this method, energy spectrum datasets containing dual-source, triple-source, and five-source hybrids were constructed, totaling 3120 datasets.

[0117] S13. Energy Spectrum Normalization and Visualization Coding. To eliminate differences in measurement conditions, all energy spectrum data undergo count normalization. The original energy spectrum is... Total count Normalized energy spectrum This transforms the spectrum into a probability density distribution. The normalized 2048-channel one-dimensional energy spectrum is then converted into a 1024-pixel wide two-dimensional grayscale image through proportional compression encoding. Figure 2 The normalized single-source and multi-source γ-ray spectra are shown.

[0118] S14. Dataset Labeling and Splitting. A hybrid strategy combining first-order derivative peak finding and manual experience-based supplementation was adopted to accurately label the feature peak regions in the images and generate bounding box labels. The final dataset contains 3120 images, which are randomly divided into a training set (2496 images), a validation set (312 images), and a test set (312 images) in an 8:1:1 ratio.

[0119] S2. Design a lightweight object detection network GM-YOLOv11n:

[0120] The GM-YOLOv11n network proposed in this embodiment takes a preprocessed energy spectrum grayscale image (size: The output is the coordinates, category, and confidence score of the feature peak detection box. The entire model consists of three parts: a backbone network, a neck network, and a detection head. The overall architecture is as follows: Figure 3 As shown. To reduce model complexity for edge deployment, two main improvements are made to the standard YOLOv11n: introducing Ghost modules to replace traditional convolutions in the backbone network, and performing structured pruning on the neck network and the detection head.

[0121] The detailed design of each module is as follows:

[0122] S21. Lightweight backbone network based on Ghost modules. Standard convolution has high computational cost, while the feature maps of deep neural networks contain a lot of redundancy, which can be generated from intrinsic features through simple linear transformations. For example... Figure 4 As shown, the Ghost module implements this function. For input... First, a small number of intrinsic feature maps are generated through a single ordinary convolution. The target number of output channels is shown in equation (2):

[0123]

[0124] in The kernel is used for convolution. Then, for each intrinsic feature map... Apply A cheap linear transformation (like (Depth convolution) to generate The ghost features are shown in equation (3):

[0125]

[0126] Finally, all feature maps are concatenated to obtain the output. .when At that time, the computational cost of the Ghost module is approximately one-third that of the standard convolution. In this embodiment, the kernel size is transformed inexpensively. Feature mapping ratio The GM-YOLOv11n-backbone is constructed by replacing all traditional convolutional layers in the standard YOLOv11n backbone network with Ghost modules.

[0127] S22. Structured Pruning. Based on replacing the backbone network, redundant convolutional layers and channels in the neck network and detection head are structurally pruned. Key components validated by the nuclide identification task, such as C3K, C3K2, SPPF, and C2PSA modules, are retained. The pruned model is denoted as GM-YOLOv11n.

[0128] S3. Train the GM-YOLOv11n network using the training set. Adjust the input image size. The SGD optimizer was used, with an initial learning rate of 0.01, momentum factor of 0.937, and weight decay coefficient of 0.0005. The batch size was set to 16, and the number of training epochs was 300. Multi-scale training and Mosaic data augmentation strategies were employed to improve the model's generalization ability. Loss functions included bounding box regression loss (CIoU Loss), classification loss, and object recognition loss (all using binary cross-entropy loss). During training, the mAP performance on the validation set was monitored, and the best model was saved.

[0129] S4. Post-processing of detection results and separation of overlapping peaks:

[0130] In this embodiment, after the GM-YOLOv11n model completes peak region detection in the energy spectrum image, it outputs the detection bounding box in the image coordinate system. To obtain physically meaningful peak parameters and achieve accurate nuclide identification, a complete post-processing workflow needs to be designed, including image-channel inverse mapping, overlapping peak separation and analysis, peak position refinement, and energy scaling. The specific implementation steps of this post-processing algorithm are as follows:

[0131] S41. Image-channel inverse mapping and energy spectrum data extraction:

[0132] Normalize the coordinates of the bounding boxes detected by GM-YOLOv11n Transform back to the original energy spectrum channel domain. First, transform to the image pixel coordinate system:

[0133] ;

[0134] Then, based on the compression ratio during forward mapping (1 pixel corresponds to 2 energy spectrum channels), perform inverse mapping to the energy spectrum channel domain:

[0135] ;

[0136] Obtain the region of interest in the energy spectrum From the raw energy spectrum data Extract the counting sequence of the corresponding channel interval. Considering the information loss introduced by compression coding, linear interpolation is performed on the extracted sequence to restore channel-level resolution. The reconstructed sequence retains the statistical properties and peak shape characteristics of the original energy spectrum, providing a data foundation for subsequent accurate analysis.

[0137] S42. Regarding the possible overlap of energy-adjacent nuclides in the detection area (such as...) 65 Zn at 1115.5 keV and 60 This invention proposes an analytical separation algorithm based on second-derivative convolution and Gaussian iterative fitting (Co 1173.2 keV). This algorithm automatically achieves accurate separation of overlapping sub-peaks without relying on manual experience settings.

[0138] S43, Second-derivative convolution enhancement. This enhances the signal in the extracted overlapping peak region. Above, a second-order Gaussian derivative kernel function is applied to perform convolution operations, achieving noise suppression and feature enhancement. The expression for the second-order Gaussian derivative kernel function is:

[0139]

[0140] The expression for convolution is:

[0141]

[0142] in, The scale parameter controls the width of the convolution kernel. In this embodiment, the width is optimized based on the physical characteristics of the detector: a NaI(Tl) scintillator detector is used. 137 The energy resolution at the characteristic peak of the Cs radioactive source at 661.67 keV is 7.9%, combined with the energy calibration coefficient. The optimal transform scale is determined by keV / channel and after optimization through convolution operations. aisle.

[0143] S44. Initial parameter estimation: from the convolutional enhancement signal Extracting the initial physical parameters of the overlapping peaks:

[0144] Peak position location: identification Two significant local extrema in This corresponds to the center position of the double peaks in the original energy spectrum;

[0145] Peak height estimation: Obtain the net count of the original energy spectrum at the location point. ,in This is a local background estimation function;

[0146] Initial peak width: The initial peak width standard deviation is set based on the detector resolution. aisle.

[0147] S45. Iterative optimization fitting. Construct a double Gaussian superposition model to describe the overlapping peak morphology. The model expression is:

[0148]

[0149] in Let be the parameter vector to be optimized. This is a linear background term. A phased iterative optimization strategy is adopted, with the following specific steps:

[0150] Width optimization stage: fixed Assuming Optimize common width parameters ;

[0151] Position optimization phase: Fixed optimization and Optimize peak position parameters ;

[0152] Height and background optimization stage: fixed ,optimization .

[0153] The iteration termination criterion is the change in the normalized sum of squared residuals. Or reach the maximum number of iterations . Figure 5 Showing 60 Co+ 65 A comparison of the effects of Zn overlapping peak separation before and after shows that the peak shapes of each sub-peak are clearly distinguishable after separation.

[0154] S45. Perform refinement processing on all identified peaks (including single peaks and separated sub-peaks). First, perform local weighted smoothing:

[0155]

[0156] The weight function A triangular window design is employed, with the center having the highest weight and decreasing weight at the edges. Precise peak search is performed in smooth sequences.

[0157]

[0158] Establish a channel-energy linear conversion model The calibration coefficients are determined through standard source calibration: using... 137 A basic linear relationship is established using Cs (661.7 keV), through... 60 The Co bimodal (1173.2 keV, 1332.5 keV) assay verifies the calibration accuracy and linearity, and the goodness of fit. This ensures conversion reliability. Finally, the refined peak channel... Convert to energy value .

[0159] S5. Nuclide identification and model performance evaluation.

[0160] S51. Probabilistic matching mechanism based on Bayesian framework:

[0161] Establish a nuclide database Each nuclide Associate its characteristic energy set Regarding the extracted peak energy The matching process is based on a Bayesian framework, and the posterior probability calculation expression is:

[0162]

[0163] The likelihood function adopts a Gaussian distribution:

[0164]

[0165] in , For detector energy resolution, This represents the calibration systematic error. The decision rule is to select the nuclide with the highest posterior probability as the identification result:

[0166]

[0167] The verification conditions include: (1) posterior probability threshold (2) Energy deviation constraint (3) Multi-peak consistency: If a nuclide has multiple characteristic peaks, it is necessary to verify that the intensity ratio conforms to the theoretical branching ratio.

[0168] S52. Model Performance Evaluation Index System:

[0169] In this embodiment, to comprehensively evaluate the performance of the proposed GM-YOLOv11n combined with Gaussian fitting post-processing method in the gamma-ray spectrum peak detection and nuclide identification task, precision, recall, mean average precision (mAP), number of parameters, and computational cost (FLOPs) were selected as evaluation metrics. The calculation formulas for each metric are as follows:

[0170] 1. Precision:

[0171] ;

[0172] in These represent the sample size of true positives and false positives, respectively.

[0173] 2. Recall:

[0174] ;

[0175] in This represents the number of peaks that were missed.

[0176] 3. Mean Average Precision (mAP):

[0177] The mean precision (mAP) comprehensively reflects the balance between precision and recall, and is a core evaluation metric for target detection tasks. mAP@0.5:0.95: The mean mAP is calculated for 10 IoU thresholds from 0.5 to 0.95 (step size 0.05).

[0178] ;

[0179] 4. Number of Parameters

[0180] The number of parameters measures the complexity of a model and is defined as the total number of all learnable parameters in the model. For a convolutional layer, the number of parameters is calculated using the following formula:

[0181] ;

[0182] in The width and height of the convolution kernel. Input the number of channels. The number of output channels is 1, and the constant 1 represents the bias term.

[0183] 5. Computational cost (FLOPs):

[0184] The computational complexity is measured in floating-point operations (FLOPs) for the forward inference complexity of the model. It is particularly suitable for high-noise, low-resolution energy spectrum scenarios.

[0185] The trained GM-YOLOv11n model and Gaussian fitting post-processing algorithm were applied to an independent test set containing 312 samples. The resulting performance metrics are shown in Tables 1 and 2.

[0186] Table 1 Test Set Detection Performance Indicators

[0187] Accuracy 99.9% Recall rate 99.9% mAP@0.5:0.95 95%

[0188] As shown in Table 1, the method proposed in this invention achieved a precision of 99.9% and a recall of 99.9% on the test set, indicating that the model has excellent detection capabilities for γ-ray spectrum characteristic peaks, without generating a large number of false positives or missing true characteristic peaks. The mAP@0.5:0.95 reached 95.0%, indicating that the model maintains stable high-performance output under different positioning accuracy requirements.

[0189] Table 2 Model Complexity and Comparison Metrics

[0190] Parameter count (GM-YOLOv11n) 1.57 M Computational complexity (GM-YOLOv11n) 3.3 GFLOPs Compared to YOLOv11n, the number of parameters is reduced. 39.3% Compared to YOLOv11n, the computational cost is reduced. 48.4%

[0191] As shown in Table 2, the GM-YOLOv11n model proposed in this invention has only 1.57M parameters and a computational cost of 3.3 GFLOPs. Compared with the standard YOLOv11n model (2.59M parameters, 6.4 GFLOPs computational cost), the number of parameters is reduced by 39.3% and the computational cost is reduced by 48.4%, verifying the effectiveness of the Ghost module replacement and structured pruning strategy in terms of lightweighting. In summary, the γ-ray spectrum peak position detection and nuclide identification method based on improved YOLO and Gaussian fitting proposed in this invention achieves efficient, accurate, and interpretable automated energy spectrum analysis by combining image representation, a lightweight target detection network, and a physics model-driven post-processing algorithm, verifying its application value in the fields of radiation monitoring and nuclear safety assessment.

[0192] Example 2

[0193] Based on Example 1, an adaptive peak detection network with dynamic convolutional kernels is integrated into the backbone network of GM-YOLOv11n to replace the original fixed convolutional layers.

[0194] The specific integration location is as follows: after the initial convolutional layer, a dynamic convolutional kernel module is used to replace the original C3k2 module, enabling the entire backbone network to adaptively process peaks of different widths.

[0195] This embodiment proposes an adaptive peak detection network based on dynamic convolution kernels. This network can adaptively process feature peaks of different widths and can be generalized to peak position detection in gamma spectrum, X-ray spectrum and alpha spectrum.

[0196] 1. Specifically, the design principles of dynamic convolutional kernel networks:

[0197] The core innovation of this embodiment lies in dynamically selecting convolution kernels of different sizes for feature extraction based on the actual width of the feature peaks. Factors determining peak width include detector type (NaI peak width, SDD peak narrowness, PIPS extremely narrowness), radiation energy (higher energy means wider peaks), and radiation type (γ peak width, α peak narrowness, X-ray peak narrowness). Therefore, peaks of different widths may coexist in the same energy spectrum (e.g., thin peaks in the low-energy region and wide peaks in the high-energy region of a NaI detector), requiring the model to adaptively select convolution kernels based on peak width.

[0198] This invention determines peak width through a "multi-scale competitive response" mechanism: the same input signal simultaneously passes through three convolutional kernels of different sizes, and the response intensity of each kernel is compared—narrow peaks respond strongly to small kernels and weakly to large kernels, while wide peaks respond the opposite way. Through this competitive mechanism, the network automatically learns the peak width information without manual annotation.

[0199] 2. Module design of dynamic convolutional kernel network.

[0200] 2.1 Multi-scale competitive response module:

[0201] Design three parallel branches with convolutional kernels of different sizes, with the structure as follows: Figure 7 As shown in Table 3, the configuration parameters are as follows.

[0202] Table 3 Multi-scale competitive response module configuration table

[0203] Narrow branches 3 16 32 Middle branch 7 16 32 Wide branches 15 16 32

[0204] 2.2 Calculation of Competition Response Weights:

[0205] The response weights of each branch are calculated using a competitive attention mechanism. The outputs of the three branches are concatenated, then passed through a global pooling layer and a fully connected layer to output the weight coefficients of the three branches. The weighting coefficients reflect the strength of each branch's response to the current input—for narrow-peak inputs, Maximum; during peak input, maximum.

[0206] 2.3 Dynamic Fusion Output:

[0207] The outputs of the three branches are weighted and fused according to their respective weight coefficients to obtain the final output features:

[0208]

[0209] This fusion mechanism allows the output of the small convolution kernel branch to be used mainly in narrow peak regions to preserve details, while the output of the large convolution kernel branch to be used mainly in wide peak regions to cover the complete peak shape, thus realizing the function of dynamically selecting the convolution kernel according to the peak width.

[0210] 2.4. Integrate into the backbone network.

[0211] A dynamic convolutional kernel network is integrated into the backbone network of GM-YOLOv11n, replacing the original fixed convolutional layers. Specifically, the integration location is as follows: after the initial convolutional layer, the dynamic convolutional kernel module replaces the original C3k2 module, enabling the entire backbone network to adaptively handle peaks of different widths.

[0212] 3. Training of dynamic convolutional kernel networks.

[0213] Training was performed using the same γ-ray energy spectrum dataset as in Example 1. Since the energy spectrum of the NaI detector contains both narrow peaks (low energy region, such as 60-100 keV) and wide peaks (high energy region, such as 1332 keV), this dataset naturally covers peak shapes of different widths, which is sufficient to train the dynamic convolutional kernel network to learn the ability to select appropriate convolutional kernels based on peak width.

[0214] Training is conducted end-to-end, and the loss function only includes classification loss and detection loss. There is no need to label the width information of the peaks. The network automatically learns the width judgment ability through a competitive response mechanism.

[0215] 4. Generalization test across ray types.

[0216] 4.1 X-ray energy dispersive spectroscopy (EDS):

[0217] The trained dynamic convolutional kernel network was directly applied to X-ray energy spectrum data. Test results are as follows: Figure 8 As shown: The dynamic convolutional kernel network automatically identifies narrow peak features and narrow branch weights through a competitive response mechanism. Significantly higher than wide branch weights Feature extraction primarily relies on small convolutional kernel branches, achieving accurate peak detection. Peak detection precision reaches 98.5%, and recall reaches 97.8%, representing a 13.3 percentage point improvement compared to the baseline model without dynamic convolutional kernels (precision 85.2%).

[0218] 4.2 Alpha-ray energy spectrum test:

[0219] The trained dynamic convolutional kernel network was directly applied to the alpha spectrum data. The peak shape of the alpha spectrum is similar to the narrow peaks in the low-energy region of the NaI detector, belonging to the narrow peak category.

[0220] Test results are as follows Figure 9 As shown, the dynamic convolutional kernel network also identifies narrow peak features, with narrow branches dominating, achieving accurate nuclide identification. The peak detection precision reaches 97.1%, and the recall rate reaches 96.5%, verifying the effectiveness of the method of this invention for α-energy spectra.

[0221] 4.3 Comparison of generalization performance.

[0222] To verify the generalization advantage of dynamic convolutional kernel networks, a comparative experiment was designed: the same model was applied to the γ-ray spectrum (training domain), X-ray spectrum, and α-ray spectrum (target domain), and the results are shown in Table 4.

[0223] Table 4 Comparison of generalization performance across ray types for dynamic convolutional kernel networks

[0224] γ-ray spectrum (training domain) Width 99.9% 99.9% X-ray energy spectrum narrow 85.2% 98.5% α spectrum narrow 76.5% 97.1%

[0225] As shown in Table 4, the dynamic convolutional kernel network proposed in this invention significantly improves its generalization ability in X-ray and alpha spectra while maintaining the detection accuracy in the training domain (γ-ray spectrum). This is attributed to the adaptive perception of peak width by the multi-scale competitive response mechanism and the effective adaptation of the dynamic convolutional kernel selection mechanism to peaks of different widths.

Claims

1. A method for detecting peak positions and identifying nuclides in the γ-ray spectrum based on improved YOLO and Gaussian fitting, characterized in that, Includes the following steps: S1. Construct a γ-energy spectrum image dataset: S2. Set up a lightweight target detection GM-YOLOv11n model; The GM-YOLOv11n model takes a preprocessed energy spectrum grayscale image as input and outputs the coordinates, category, and confidence score of the feature peak detection box. The GM-YOLOv11n model includes a backbone network, a neck network, and a detection head; the backbone network introduces a Ghost module to replace traditional convolution, and the neck network and detection head undergo structured pruning. S3. Train the GM-YOLOv11n model using the training set; Input image size adjusted to The SGD optimizer was used, with an initial learning rate of 0.01, momentum factor of 0.937, and weight decay coefficient of 0.0005; the batch size was set to 16, and the number of training epochs was set to 300. The loss functions include bounding box regression loss, classification loss, and target loss, all of which use binary cross-entropy loss; during training, the mAP performance on the validation set is monitored, and the best model is saved; S4. Post-processing of detection results and separation of overlapping peaks: After the GM-YOLOv11n model completes the peak region detection of the energy spectrum image, it outputs the detection bounding box in the image coordinate system. The post-processing workflow for detection results includes image-channel inverse mapping, overlapping peak separation and analysis, peak position refinement, and energy calibration; specifically, it includes the following steps: S41, Image-channel inverse mapping and energy spectrum data extraction; Normalize the coordinates of the bounding boxes detected by GM-YOLOv11n Convert back to the original energy spectrum channel domain; first, convert to the image pixel coordinate system: ; Based on the compression ratio during forward mapping, i.e., 1 pixel corresponds to 2 energy spectrum channels, reverse mapping is performed to the energy spectrum channel domain: ; Obtain the region of interest in the energy spectrum From raw energy spectrum data Extract the counting sequence of the corresponding channel interval. The extracted sequence is reconstructed by linear interpolation to restore channel-level resolution. The reconstructed sequence retains the statistical properties and peak shape characteristics of the original energy spectrum. S42. To address the potential overlap of adjacent nuclides within the detection area, perform peak separation and analysis. The overlapping peak separation analysis employs an analytical separation method based on second-derivative convolution and Gaussian iterative fitting; specifically, it includes the following steps: S421, second derivative convolution enhancement; in the extracted overlapping peak region signal Above, the second-order Gaussian derivative kernel function is used to perform convolution operations to achieve noise suppression and feature enhancement; The expression for the second-order Gaussian derivative kernel function is: ; The expression for convolution is: ; in, The scale parameter controls the width of the convolution kernel; It is the independent variable in the convolution kernel function, representing the channel offset of the current calculation position relative to the center of the convolution kernel. The unit is the number of channels, and the value range is an integer. It is a second-order Gaussian derivative kernel function, used to perform convolution operations on energy spectrum signals to enhance the second derivative in the peak region, thereby highlighting the peak inflection point and suppressing low-frequency noise; It is the energy spectrum channel number corresponding to the current convolution operation, indicating the channel position aligned with the center of the convolution kernel; This refers to the offset (integer) within the convolution kernel relative to the center position i, with a value range of [-3]. , 3 ], used to traverse the neighborhood channels covered by the convolution kernel; ) refers to the enhanced signal value output at channel i after being enhanced by second-order Gaussian derivative convolution, and its local extremum points correspond to the candidate positions of peaks in the original energy spectrum; This refers to the value of the reconstructed energy spectrum counting sequence at channel (i+k), i.e., the count intensity of each channel within the coverage area of ​​the convolution kernel; combined with the energy calibration coefficient. keV / channel; S422, Initial parameter estimation; from convolutional enhancement signal Extract the initial physical parameters of the overlapping peaks; Peak position location: identification Two significant local extrema in This corresponds to the center position of the double peaks in the original energy spectrum; Peak height estimation: Obtain the net count of the original energy spectrum at the location point. ,in This is a local background estimation function; The initial estimate of the peak height of the first sub-peak represents the net count after deducting the local background at the position of the first peak in the original energy spectrum, expressed in counts. For the reconstructed energy spectrum counting sequence in channel The original count value at the location, i.e., the channel position corresponding to the first local extremum; the background has not yet been subtracted; initial peak width value: the initial peak width standard deviation is set based on the detector resolution. aisle; S423. Iterative optimization fitting; construct a double Gaussian superposition model to describe the overlapping peak morphology, the model expression is: ; in Let be the parameter vector to be optimized. The base term is linear; a phased iterative optimization is employed; the iteration termination criterion is the change in the normalized sum of squared residuals. Or reach the maximum number of iterations ; S43. Perform refinement processing on all identified peaks; first, implement local weighted smoothing: ; in, It is the current energy spectrum channel number to be smoothed; weighting function The design employs a triangular window, with the center having the greatest weight and decreasing weight at the edges; It is the count of the original energy spectrum at channel (i+k); This is the smoothed count result at channel i after local weighted smoothing; Perform precise peak search in a smooth sequence: ; The preliminary peak position channel location is obtained by Gaussian fitting; Local search radius, take Channel, indicating that in the thought Center Search for the precise peak position within the interval. It is the final peak channel position determined after local refinement search, which is the one with the largest smooth count in the neighborhood; Establish a channel-energy linear conversion model The calibration coefficients are determined through standard source calibration; using 137 A basic linear relationship is established using Cs (661.7 keV), through... 60 Co bimodal verification of calibration accuracy and linearity, goodness of fit. Finally, the refined peak channel Convert to energy value ; S5. Nuclide identification and model performance evaluation; S51. Probabilistic matching mechanism based on Bayesian framework; Establish a nuclide database Each nuclide Associate its characteristic energy set ; represents the first The set of characteristic gamma-ray energies corresponding to a certain nuclide, among which This indicates the sequence number of the different energy characteristic peaks that the nuclide may emit. For the extracted peak energy... The matching process is based on a Bayesian framework; then, the probability is verified, specifically expressed as: ;in Peak energy was observed Under these conditions, the peak belongs to a nuclide. The posterior probability. This refers to the assumption that the peak originates from a nuclide. At that time, energy was observed. The likelihood probability. Nuclide The prior probability is taken as 1 / M with equal probability in the absence of prior information; The likelihood function adopts a Gaussian distribution: ; In the formula, It is the energy value of the characteristic peak extracted from the energy spectrum and converted by energy calibration, with the unit being keV; Refers to nuclides No. The reference energy values ​​of each characteristic peak are expressed in keV. The total uncertainty in energy measurement combines detector energy resolution and calibration system error; Refers to the detector's energy resolution; in , For detector energy resolution, The scale system error is considered; the decision rule is to select the nuclide with the highest posterior probability as the identification result. ; The verification conditions include: (1) posterior probability threshold (2) Energy deviation constraint .

2. The method for γ-ray spectrum peak position detection and nuclide identification based on improved YOLO and Gaussian fitting as described in claim 1, characterized in that, Constructing a γ-ray spectrum image dataset involves the following steps: We acquired measured single-source gamma spectrum data and constructed a spectrum dataset containing single-source and multi-source mixtures using a data synthesis method based on physical statistical independence. Each energy spectrum in the dataset is normalized by counting, and the one-dimensional energy spectrum data is converted into a two-dimensional grayscale image by proportional compression coding to obtain a standardized energy spectrum image dataset.

3. The method for γ-ray spectrum peak position detection and nuclide identification based on improved YOLO and Gaussian fitting as described in claim 2, characterized in that, Step S1 includes the following steps: S11. Acquisition of measured single-source energy spectrum data; S12. Synthesis of multi-source energy spectrum data based on physical constraints; synthesis of multi-source mixed energy spectra using a linear superposition method based on the statistical independence of gamma-ray detection; mixed energy spectrum. Construct using the following formula: ; in, For the first Single-source energy spectrum of a radioactive source The background energy spectrum, The number of radioactive sources in the mixed source is denoted by ; using this method, energy spectrum datasets containing dual-source, triple-source, and five-source mixtures were constructed, totaling 3120 sets; S13, Energy Spectrum Normalization and Image Coding; All energy spectrum data were normalized by counting; the original energy spectrum was... Total count Normalized energy spectrum This transforms it into a probability density distribution; The normalized 2048-channel one-dimensional energy spectrum is converted into a 1024-pixel-width two-dimensional grayscale image through proportional compression encoding. S14. Dataset Labeling and Partitioning: A hybrid strategy combining first-order derivative peak finding and manual experience-based supplementation is employed to accurately label the feature peak regions in the image, generating bounding box labels. The specific process for manual experience-based supplementation is as follows: For feature peaks in high-energy regions (energy above 1000 keV) or low-count-rate regions (total count of a single peak less than 50), first-order derivative peak finding may result in zero-crossing drift or failure to detect due to statistical fluctuations. In this case, researchers with experience in energy spectrum analysis manually adjust the bounding box within the corresponding channel interval based on the known characteristic energy positions of the nuclide (referencing the nuclide database) to ensure that the left and right boundaries of the peak region completely cover the peak shape (including the valley to the baselines on both sides). During manual labeling, the following guidelines are followed: the left boundary is taken at the half-height position of the rising edge of the peak, and the right boundary is taken at the half-height position of the falling edge of the peak; if overlapping peaks exist, the lowest point of the valley is used as the sub-peak boundary. This manual labeling result serves as the final label for model training. The final dataset is randomly divided into training, validation, and test sets in an 8:1:1 ratio.

4. The method for γ-ray spectrum peak position detection and nuclide identification based on improved YOLO and Gaussian fitting as described in claim 1, characterized in that, The backbone network of the GM-YOLOv11n model mentioned in step S2 is a lightweight backbone network based on the Ghost module; Generated from intrinsic features through a simple linear transformation; the intrinsic features refer to basic feature maps with complete semantic information extracted from the input data through standard convolution; in the Ghost module, the number of intrinsic feature maps m is less than the number of target output channels n, which is achieved through the Ghost module for the input... ,in It is the input tensor of the Ghost module, with dimensions of ,in Input the number of channels. and These represent the height and width of the input feature map, respectively; in the γ-ray spectral image analysis task, X is the feature map of the intermediate layer of the backbone network, and its spatial size varies with the network depth; firstly, a small number of intrinsic feature maps are generated through a single ordinary convolution. The target number of output channels is given by the following formula: ; in For each intrinsic feature map, the kernel is used as the convolution kernel; then, for each intrinsic feature map... Apply A cheap linear transformation ;generate The ghost's characteristics are shown in the following formula: ; Finally, all feature maps are concatenated to obtain the output. ;when At that time, the computational cost of the Ghost module is approximately one-third that of the standard convolution. In the formula, s is the feature mapping ratio; The GM-YOLOv11n-backbone is constructed by replacing all traditional convolutional layers in the standard YOLOv11n backbone network with Ghost modules. Based on replacing the backbone network, redundant convolutional layers and channels in the neck network and detection head are structurally pruned; key components that have been verified to be effective by the nuclide identification task, namely the C3K, C3K2, SPPF, and C2PSA modules, are retained; the pruned model is denoted as GM-YOLOv11n.

5. The method for γ-ray spectrum peak position detection and nuclide identification based on improved YOLO and Gaussian fitting as described in claim 1, characterized in that, Step S423 employs a phased iterative optimization approach, with the specific steps as follows: Width optimization stage: fixed Assuming Optimize common width parameters ; Position optimization phase: Fixed optimization and Optimize peak position parameters ; Height and background optimization stage: fixed , ,optimization .

6. The method for γ-ray spectrum peak position detection and nuclide identification based on improved YOLO and Gaussian fitting as described in claim 1, characterized in that, The optimal model in step S2 refers to: The model weights at which the mAP@0.5:0.95 metric is highest on the validation set are calculated. During training, the validation set mAP@0.5:0.95 is calculated after each iteration, and the model parameters at which this metric reaches its historical maximum value are saved. If the validation set mAP does not improve for 20 consecutive iterations, training is terminated early to prevent overfitting.

7. The method for γ-ray spectrum peak position detection and nuclide identification based on improved YOLO and Gaussian fitting as described in claim 3, characterized in that, The specific process for manual supplementation in step S14 is as follows: For high-energy regions (i.e., energies above 1000 keV) or low-count-rate regions (i.e., feature peaks with a total single-peak count of less than 50), the first-derivative peak finding may drift at the zero-crossing point or fail to detect due to statistical fluctuations. In this case, based on the known feature energy position of the nuclide and referring to the nuclide database, the bounding box is manually adjusted within the corresponding channel interval to ensure that the left and right boundaries of the peak region cover the complete peak shape, including the valley to the baselines on both sides. During the manual annotation process, the following criteria are followed: the left boundary is taken at the half-height position of the rising edge of the peak, and the right boundary is taken at the half-height position of the falling edge of the peak. If there are overlapping peaks, the lowest point of the valley is used as the sub-peak boundary. The manual annotation result is used as the final label for model training. The final dataset is randomly divided into training set, validation set, and test set in a ratio of 8:1:

1.

8. The method for γ-ray spectrum peak position detection and nuclide identification based on improved YOLO and Gaussian fitting as described in claim 1, characterized in that: In step S2, an adaptive peak detection network with dynamic convolutional kernels is integrated into the backbone network of GM-YOLOv11n to replace the original fixed convolutional layers. The specific integration location is as follows: after the initial convolutional layer, a dynamic convolutional kernel module is used to replace the original C3k2 module, so that the entire backbone network has the ability to adaptively process peaks of different widths. The aforementioned adaptive peak detection network based on dynamic convolution kernels is applied to peak position detection in gamma-ray spectra, X-ray spectra, and alpha-ray spectra. The adaptive peak detection network based on dynamic convolution kernels determines the width of the peak through a "multi-scale competitive response" mechanism: the same input signal passes through three convolution kernels of different sizes at the same time, and the response intensity of each is compared - the narrow peaks have a strong response when passing through a small convolution kernel and a weak response when passing through a large convolution kernel, while the wide peaks have the opposite response. The construction of an adaptive peak detection network based on dynamic convolutional kernels includes the following steps: A. Multi-scale competitive response module: Set up three parallel branches with different kernel sizes: a narrow branch, a medium branch, and a wide branch. Narrow branch: kernel size 3, input channels 16, output channels 32; Middle branch: kernel size 7, input channels 16, output channels 32; Wide branch: kernel size 15, input channels 16, output channels 32; B. Calculation of Competition Response Weights: The response weights of each branch are calculated using a competitive attention mechanism; the outputs of the three branches are concatenated, and then processed through global pooling and a fully connected layer to output the weight coefficients of the three branches. ; These are the weight coefficients for narrow branches, medium branches, and wide branches, respectively. The weighting coefficients reflect the strength of each branch's response to the current input—for narrow-peak inputs, Maximum; during peak input, maximum; C. Dynamic fusion output; The outputs of the three branches are weighted and fused according to their respective weight coefficients to obtain the final output features: ; This fusion mechanism allows the output of the small convolution kernel branch to be used primarily in narrow peak regions to preserve details, while the output of the large convolution kernel branch to be used primarily in wide peak regions to cover the complete peak shape; thus achieving the function of dynamically selecting the convolution kernel based on the peak width.