CN-122023402-A - Neutron tube target film defect real-time detection method based on machine vision
Abstract
The invention provides a real-time detection method for target film defects of a neutron tube based on machine vision, which is characterized in that a reference feature library is constructed based on a self-encoder model, individual differences and complex operation environments of the target film of the neutron tube are adapted, a special dynamic reference is formed through deep vision features in a self-learning health state, misjudgment caused by equipment differences and drifting in an operation stage of a universal reference is avoided, a stable and single-tube-fitting characteristic reference basis is provided for subsequent detection, the consistency and reliability of detection are ensured, and based on the positioning of an abnormal region of a double-space conjugate self-encoder, the sensitivity of abnormal recognition is further improved by a conjugate structure based on the reference feature library through the capturing and verification of the deviation of the reference features by double-space constraint reinforcement.
Inventors
- LI KANG
- LIU YANG
- WANG ZIHAO
Assignees
- 西安冠能中子探测技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260410
Claims (10)
- 1. The real-time detection method for the target film defects of the neutron tube based on machine vision is characterized by comprising the following steps of: step S1, establishing an observation channel of a neutron tube target film, and acquiring a steady running state image of the neutron tube target film in a healthy state through the observation channel; s2, extracting the reference feature of each stable running state image based on the self-encoder model, and constructing a reference feature library of the neutron tube target film; s3, acquiring a real-time running state image of a neutron tube target film through the observation channel, and positioning an abnormal region of the real-time running state image through a double-space conjugate self-encoder based on the reference feature library to obtain an abnormal region and a confidence level; And S4, extracting time sequence evolution feature vectors of the abnormal region, inputting the time sequence evolution feature vectors into a long-term and short-term memory network model optimized based on a black hole particle swarm algorithm, outputting to obtain a defect type, and classifying risk levels of neutron tube target films based on the confidence level and the defect type.
- 2. The method for detecting defects of a neutron tube target film according to claim 1, wherein the step S1 of establishing an observation channel of the neutron tube target film, collecting steady operation state images of the neutron tube target film in a healthy state through the observation channel comprises: An observation channel is constructed outside the body structure of the neutron tube target film; establishing a time-synchronous imaging trigger mechanism, acquiring steady operation state images of different operation stages of a neutron tube target film through a neutron tube operation state sensor in an initial healthy stage of the neutron tube, wherein the acquisition time is T2, and the operation stages comprise a discharge steady stage and an ion beam steady stage, and the trigger time of a sensor signal is as follows The image acquisition time of the imaging device is Satisfying the time synchronization error Δt= | - |≤ Wherein For the maximum synchronization error threshold allowed, it is determined based on the minimum duration of each operating phase of the neutron tube.
- 3. The method according to claim 1, wherein the step S2 is based on extracting the reference feature of each steady-state operation state image from the encoder model, and constructing a reference feature library of the neutron tube target film, and includes: preprocessing each acquired steady running state image to obtain a preprocessed steady running state image; Inputting each preprocessed steady running state image into a self-encoder model to obtain an output reconstructed image vector, namely a reference feature, to form a reference feature library B, wherein the reference feature comprises 4 types of core feature indexes, namely a reaction region integral brightness distribution feature, a reaction region texture continuity feature, a reaction region reflection highlight position feature and a reaction region outline boundary feature; Dividing the reference feature library B into reference feature subsets in a discharge stabilization stage according to the operation stage of a neutron tube target film And ion beam stability phase reference feature subset ; Updating the reference feature library B based on a set updating period; the self-encoder model comprises an encoder and a decoder, wherein the input of the self-encoder model is a preprocessed steady running state image, and a reconstructed image vector is output; The encoder adopts a 3-layer full-connection network structure and is used for mapping high-dimensional image vectors into low-dimensional potential feature vectors, and the mathematical expression of the encoder is as follows: ; Wherein, the Is the first A one-dimensional vector after the running state image is flattened is stabilized at any time, 、 And The weight matrices of layers 1-3 of the encoder respectively, 、 The offset vectors of layers 1-3 of the encoder respectively, Is the first The potential feature vector of the moment in time, ( ) Activating a function for a ReLU; The decoder adopts a 3-layer full-connection network structure symmetrical to the encoder and is used for reconstructing potential feature vectors to obtain reconstructed image vectors, and the mathematical expression of the decoder is as follows: ; Wherein, the 、 And The weight matrices of layers 1-3 of the decoder respectively, 、 And The offset vectors of layers 1-3 of the decoder respectively, Is the first The reconstructed image vector at the moment in time, Is a Sigmoid function; training the self-encoder model to obtain a trained self-encoder model, wherein in the training process, a loss function of the self-encoder model is set The calculation formula of (2) is as follows: ; Wherein, the In order to train the number of samples, For the time stamp of the t-th training sample, In order to be an L2 norm, Is a loss function from the encoder model.
- 4. The method for detecting defects of a neutron tube target film in real time according to claim 3, wherein the step S3 of collecting real-time running state images of the neutron tube target film through the observation channel, positioning abnormal areas of the real-time running state images through a double-space conjugate self-encoder based on the reference feature library to obtain abnormal areas and confidence levels comprises the following steps: Constructing a double-space conjugate self-encoder, wherein the double-space conjugate self-encoder comprises a main encoder E 1 , an auxiliary encoder E 2 and a shared decoder D 3 , the main encoder E 1 comprises a 3-layer full-connection network, the auxiliary encoder E 2 is conjugate symmetric with the main encoder E 1 , the shared decoder D 3 comprises a 3-layer full-connection network, an initial weight matrix of the main encoder E 1 multiplexes weight matrices of the encoders in the self-encoder model, an initial bias vector multiplexes bias vectors of the encoders in the self-encoder model, the initial weight matrix of the auxiliary encoder E 2 is a transpose of the weight matrices of the encoders in the self-encoder model, the initial bias vector multiplexes bias vectors of the encoders in the self-encoder model, and an initial weight matrix of the shared decoder D 3 multiplexes weight matrices of the decoders in the self-encoder model; Training the double-space conjugated self-encoder based on a training set, and obtaining the trained double-space conjugated self-encoder, wherein the training set comprises a healthy and stable running state image and a manually marked defect simulation image which are randomly extracted from the reference feature library B; Positioning a real-time reaction zone in the real-time running state image based on a reaction zone outline template in the reference feature library B, and cutting out a corresponding real-time reaction zone local image from the preprocessed real-time running state image based on the real-time reaction zone; Inputting the real-time reaction region local image into the trained double-space conjugate self-encoder, outputting a fusion potential characteristic and a reconstruction image vector, and calculating a double-space deviation value, wherein the double-space deviation value comprises a sample space loss and a potential space loss; Determining a preliminary anomaly region in the real-time reaction zone partial image based on the sample space loss and the potential space loss; and calculating the confidence level of the preliminary abnormal region, further determining whether the preliminary abnormal region is a real abnormal region according to the confidence level, and outputting abnormal region coordinates, the confidence level and a double-space deviation value if the preliminary abnormal region is the real abnormal region, wherein the abnormal region coordinates refer to each pixel coordinate in the abnormal region.
- 5. The method for detecting defects of a neutron tube target film according to claim 4, wherein the double-space conjugate self-encoder has a loss function Expressed as: ; Wherein, the The weight is lost for the sample space, For the potential loss of weight of space, In order to achieve a loss of space for the sample, In order to be a potential loss of space, As a loss function; the formula of the sample space loss is Wherein X 3 (t) is a one-dimensional vector of the flattened real-time running state image, t 3 is a real-time acquisition time stamp, Reconstructing an image vector; the formula of the potential space loss is Wherein In order to fuse the potential features of the device, =( (t)+ (t))/2, (T) is the primary encoder output, (T) is the secondary encoder output, For the potential eigenvector mean value of the corresponding operation phase k output from the encoder model, k=1 corresponds to a discharge stabilization phase, and k=2 corresponds to an ion beam stabilization phase; Set sample space loss Is a determination threshold value theta of (2) , wherein, , The mean value of the loss function L 2 for the steady-state image output from the encoder model, A standard deviation of a loss function L 2 for the steady-state image output from the encoder model, and setting a potential spatial loss Wherein the decision threshold of (c) is set, wherein, , The standard deviation of the potential eigenvector Z (τ) of stage k output from the encoder model.
- 6. The method of claim 5, wherein inputting the real-time reaction region partial image into the trained dual-space conjugate self-encoder, outputting fusion latent features and reconstructed image vectors, and calculating dual-space deviation values comprises: flattening the real-time reaction region partial image into a one-dimensional vector X 3 (t); Inputting the one-dimensional vector X 3 (t) into a trained double-space conjugate self-encoder, and outputting a fusion latent feature Z 3 (t) and a reconstructed image vector 3 (T) calculating potential spatial losses of the real-time reaction zone partial image And wherein the sample space loss for each pixel in the real-time reaction zone partial image ; Determining a preliminary abnormal region in the real-time reaction region partial image, comprising: When (when) >θ And is also provided with > When the corresponding pixel is judged to be a candidate abnormal pixel; and carrying out connected domain analysis on the candidate abnormal pixels to form a preliminary abnormal region.
- 7. The method of claim 4, wherein calculating the confidence level of the preliminary abnormal region, and further determining whether the preliminary abnormal region is a real abnormal region according to the confidence level, and if so, outputting the abnormal region coordinates, the confidence level and the double spatial deviation value comprises: if the area ratio of the preliminary abnormal area < First preset area threshold value And max is% /θ , / ) And if the preliminary abnormal region is a low confidence level, judging that the normal operation fluctuates and not outputting abnormal coordinates, =Abnormal pixel count/total pixel count of reaction region; if the first preset area threshold value Preliminary abnormal region area ratio < Second preset area threshold value And the preset first ratio threshold value is less than or equal to max% /θ , / ) If the first specific value threshold is preset, the preliminary abnormal region is a central confidence level, the preliminary abnormal region is marked as a candidate defect region, and the aligned abnormal region coordinates and the double space deviation values are recorded; if the area ratio of the preliminary abnormal area Not less than a second preset area threshold Or max% /θ , / ) If the preliminary abnormal region is not less than a preset second ratio threshold, determining that the preliminary abnormal region is a final abnormal region; for the abnormal region, identifying an operation stage k corresponding to the real-time operation state image, wherein k=1 is a discharge stabilization stage, k=2 is an ion beam stabilization stage, and acquiring a reference feature subset of the corresponding stage ; From the subset of reference feature library Extracting anchor point information of a reaction zone, wherein the anchor point information of the reaction zone comprises a central coordinate and a boundary characteristic point set of the reaction zone; Calculating the center coordinates of the real-time reaction area based on the local images of the real-time reaction area, and calculating the center coordinates of the real-time reaction area and a subset of the reference feature library The coordinate offset of the central coordinate of the reaction area is corrected to be the aligned coordinate based on the coordinate offset, and the coordinate of the abnormal area is obtained; Outputting abnormal region coordinates, confidence level and sample space loss And potential space loss 。
- 8. The method for detecting the defects of the neutron tube target film according to claim 7, wherein the step S4 is characterized in that the step of extracting the time sequence evolution feature vector of the abnormal region, inputting the time sequence evolution feature vector into a long-term and short-term memory network model optimized based on a black hole particle swarm algorithm, outputting to obtain a defect type, and classifying the risk level of the neutron tube target film based on the confidence level and the defect type, and comprises the following steps: setting input window length Corresponding to Extracting with continuous sampling period A time sequence evolution characteristic vector of the abnormal region in a plurality of continuous sampling periods, wherein the time sequence evolution characteristic vector is expressed as: ; Wherein, the As the feature vector of the time-series evolution, Representation of The real-time running state image of the sampling moment is lost through the sample space of the double-space conjugate self-encoder, Representation of The real-time running state image of the sampling moment passes through the potential space loss of the double-space conjugate self-encoder, The pixel area of the abnormal region at the time t, And The central coordinates of the abnormal areas after alignment; normalizing each component in the time sequence evolution feature vector to obtain a normalized time sequence evolution feature vector ; Time sequence evolution characteristic vector of normalization processing Inputting the probability of each type of defect into a long-short-term memory network model LSTM; taking the defect type with the highest probability as the defect type of the abnormal area; And carrying out risk classification on the abnormal region according to the defect type, the confidence level and the time sequence evolution trend of the time sequence evolution feature vector of the abnormal region.
- 9. The method for detecting target film defects of neutron tubes according to claim 8, wherein the long-short-term memory network model LSTM comprises an input layer, a hidden layer and an output layer, the number of neurons of the input layer is 5, and the time sequence evolution characteristic vector of normalization processing is received The hidden layer comprises 2 layers, and the number of neurons is , The method is characterized in that the method is an optimization target of a black hole particle swarm algorithm BHPSO, an activation function is a ReLU function, the number of neurons of the output layer is 3, the neurons correspond to 3 types of core defects, namely sputtering erosion SE, isotope dissipation TD and thermal stress microcrack TSC, the activation function is a Softmax function, and the probabilities P (SE), P (TD) and P (TSC) of the 3 types of defects are output; Based on a black hole particle swarm algorithm BHPSO, 4 key super parameters of a long-term memory network model LSTM are optimized by simulating a mechanism of 'particle swarm search + black hole attraction + particle regeneration', so as to obtain an optimal super parameter combination, wherein the 4 key super parameters comprise the number of neurons in a hidden layer Rate of learning Batch size And the number of iterations ; Training the long-term memory network model LSTM by adopting an optimal super-parameter combination to obtain a trained long-term memory network model LSTM; normalized time sequence evolution characteristic vector Inputting a trained long-short-period memory network model LSTM, outputting the probability value of the 3 types of defects, and judging the defect type according to the probability value.
- 10. The method for detecting the defects of the neutron tube target film according to claim 9, wherein the optimization of 4 key super parameters of the long-term memory network model LSTM to obtain the optimal super parameter combination by simulating a mechanism of 'particle swarm search + black hole attraction + particle regeneration' based on the black hole particle swarm algorithm BHPSO comprises the following steps: initializing population particles, wherein each particle corresponds to 1 group of super-parameter combinations, and the particle position vectors are as follows: ; each particle updates the speed and the position according to the individual optimal position and the global optimal position, and the calculation formula is as follows: ; ; Wherein, the For the number of iterations of BHPSO, As a vector of the velocity of the particles, As the weight of the inertia is given, And For the acceleration factor, respectively guiding particles to be optimally and globally close to each other; And Is a random number in the interval of 0,1, For a historic optimal position of an individual particle, The global optimal position of the whole particle swarm is obtained; According to the black hole attraction mechanism, the particles are randomly regenerated in the search space, including: Will globally optimal position The calculation formula of the suction radius of the black hole is shown as the following: ; Wherein, the In order to control the coefficient of the absorption range, For the size of the particle population, For the euclidean distance of the ith particle from the global optimum, The suction radius is the black hole; the calculation formula of Euclidean distance between each particle and the global optimal position is as follows: ; Wherein j is the index of the hyper-parameter dimension, Is the j-th dimension hyper-parameter of the position vector of the i-th particle, Euclidean distance between each particle and the global optimal position; euclidean distance between the ith particle and the global optimum position < Black hole suction radius > The particles are absorbed by the black holes, and new particles are randomly regenerated in the search space, and the formula is as follows: , wherein, And A lower search space bound and an upper search space bound, Is a random number of [0,1], A regenerated particle; And obtaining the optimal super-parameter combination of the long-term and short-term memory network model LSTM through iterative optimization.
Description
Neutron tube target film defect real-time detection method based on machine vision Technical Field The invention relates to the technical field of neutron tubes, in particular to a real-time detection method for target film defects of a neutron tube based on machine vision. Background The neutron tube is used as core equipment in the fields of nuclear physical experiments, industrial nondestructive detection and the like, the target film is used as a key component of the target film, the target film is subjected to ion bombardment and thermal loading for a long time, the defects of sputtering erosion, microcracks and the like are easily generated, the stability of neutron yield and the operation safety of equipment are directly influenced, machine vision becomes a preferable technical path for detecting the defects of the target film due to the advantages of non-contact, nondestructive and real-time monitoring, and the core requirement is that a judging standard for attaching the individual characteristics of the equipment is established, and abnormal evolution under an operation state is accurately identified. The traditional neutron tube target film defect detection method is usually based on a single-space self-encoder, a standard library is built by collecting healthy target film images of a neutron tube, shallow layer features such as brightness and texture are extracted from the standard library to serve as healthy features, the healthy features are learned by the single-space self-encoder to build a feature model of a healthy state, during detection, real-time running state images of the neutron tube target film are collected, corresponding real-time features are extracted, reconstruction deviation between the real-time features and the healthy features is calculated through the feature model, and accordingly whether the neutron tube target film is abnormal or not is judged. However, the conventional method relies on a general reference library constructed based on the average health states of a plurality of neutron tube target films, and cannot adapt to individual characteristics of a single neutron tube target film formed by manufacturing process and deposition quality differences, so that inherent deviation exists between a judgment reference and the actual health state of single equipment, normal fluctuation of the equipment and actual defect of the target film cannot be accurately distinguished, finally, the misjudgment rate of abnormal detection is higher, and engineering precision requirements of real-time monitoring of the defect of the neutron tube target film are difficult to meet. Disclosure of Invention Aiming at the technical problems in the prior art, the invention provides a neutron tube target film defect real-time detection method based on machine vision, which can overcome the defects in the background art. The invention provides a real-time detection method for target film defects of a neutron tube based on machine vision, which comprises the following steps: step S1, establishing an observation channel of a neutron tube target film, and acquiring a steady running state image of the neutron tube target film in a healthy state through the observation channel; s2, extracting the reference feature of each stable running state image based on the self-encoder model, and constructing a reference feature library of the neutron tube target film; s3, acquiring a real-time running state image of a neutron tube target film through the observation channel, and positioning an abnormal region of the real-time running state image through a double-space conjugate self-encoder based on the reference feature library to obtain an abnormal region and a confidence level; And S4, extracting time sequence evolution feature vectors of the abnormal region, inputting the time sequence evolution feature vectors into a long-term and short-term memory network model optimized based on a black hole particle swarm algorithm, outputting to obtain a defect type, and classifying risk levels of neutron tube target films based on the confidence level and the defect type. On the basis of the technical scheme, the invention can also make the following improvements. Optionally, step S1 establishes an observation channel of the neutron tube target film, and acquires a steady running state image of the neutron tube target film in a healthy state through the observation channel, including: An observation channel is constructed outside the body structure of the neutron tube target film; establishing a time-synchronous imaging trigger mechanism, acquiring steady operation state images of different operation stages of a neutron tube target film through a neutron tube operation state sensor in an initial healthy stage of the neutron tube, wherein the acquisition time is T2, and the operation stages comprise a discharge steady stage and an ion beam steady stage, and the trigger time of a sensor signal is as follows The image acq