A crystal quality evaluation method and system based on a deep neural network
By constructing YOLOv5 and ResNet-CG models, automated evaluation and intelligent temperature control of scintillation crystal quality were achieved, solving the problem of inconsistent manual evaluation in existing technologies and improving production efficiency and crystal quality consistency.
Patent Information
- Application Number
- CN202211556758.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-06
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-12-06
AI Technical Summary
In the existing technology, the quality assessment of scintillation crystals relies on manual observation and experience judgment, lacking a numerical system, which leads to inconsistent production results and makes it difficult to achieve industrial production.
We construct deep learning models YOLOv5 and ResNet-CG, and through image acquisition, preprocessing, and neural network training, automatically identify and evaluate crystal quality to establish an intelligent temperature control system.
It enables automated evaluation and numerical management of crystal quality, improves the controllability of the production process and the consistency of crystal quality, and is suitable for intelligent manufacturing.
Smart Images

Figure CN115760837B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of crystal quality assessment technology, and in particular to a crystal quality assessment method and system based on deep neural networks. Background Technology
[0002] Scintillation crystals are materials that emit light when irradiated by high-energy particles or rays. They have wide applications in fields such as nuclear medicine imaging diagnosis, high-energy physics, security inspection, and geological exploration, and are a core component of various instruments. However, in the actual production of scintillation crystals, due to their high oxidizing and easily hydrolyzed properties, the reaction needs to be carried out in a vacuum environment. Generally, secondary feeding is not possible after initial feeding. Production personnel can only continuously observe the quality of the crystal growth process, adjust the ambient temperature, and manage the crystal's production trend to avoid large cracks and whitening of the crystal. However, production personnel cannot constantly observe and adjust the ambient temperature, and crystal quality assessment is based solely on experience and observation. The results vary from person to person and cannot be summarized into a complete numerical system for industrial production. This has significant shortcomings for intelligent crystal manufacturing.
[0003] Therefore, a crystal quality assessment method based on deep neural networks is disclosed. This method constructs a deep learning YOLOv5 model and a ResNet-CG model, which can automatically identify and grade the crystal quality based on the captured crystal images. Production personnel can use this crystal assessment method to establish a numerical intelligent temperature control system, adjust various environmental factors in the crystal growth process, and produce qualified and high-quality scintillation crystals for use in the intelligent manufacturing industry. Summary of the Invention
[0004] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description and other accompanying drawings.
[0005] The purpose of this invention is to overcome the above-mentioned shortcomings and provide a crystal quality assessment method and system based on deep neural networks. By establishing and training a target detection YOLOv5 model, the crystal can be located in the acquired image. A ResNet-CG neural network model is constructed and trained to score crystals whose quality needs to be judged. Production personnel can use the data obtained by this method to establish an intelligent temperature control system and adjust the production environment of the crystal for industrial crystal production.
[0006] To achieve the above objectives, the technical solution of the present invention is to provide a crystal quality evaluation method based on deep neural networks, comprising the following steps:
[0007] S1. Acquire crystal image dataset: Classify the crystal images acquired by the crystal image acquisition device according to the quality assessment criteria, and label the crystal quality scores of the images as input datasets;
[0008] S2. Data Processing: Label the input dataset, marking it as the training set and the test set;
[0009] S3. Building a Neural Network Model: Build an initial ResNet-CG neural network model. Use the training set and test set from step S2 as inputs, iteratively fit the function between the input and output, reduce the cross-entropy loss between the predicted output and the actual output through iteration, train the model parameters, and obtain a mature ResNet-CG model. Based on the trained ResNet-CG model, map the images in the training set to a score between [1,5].
[0010] S4. Build an object detection model: Build an object detection YOLOv5 model. Use the public dataset as input to train the initial YOLOv5 model so that it can roughly locate the crystal position in the image. After the initial model is built, use the training set and test set in step S2 as small sample input to train it to accurately locate the crystal position and generate decision boxes at the corresponding positions to generate a mature YOLOv5 model.
[0011] S5. Crystal Quality Assessment: Take photos of the crystal to be assessed using ordinary photography equipment or crystal image acquisition equipment. After preprocessing the images, input them into the YOLOv5 model and the ResNet-CG model to obtain a score for the crystal.
[0012] In some embodiments, the ResNet-CG model includes a 7x7 convolutional layer, 5 residual basic blocks, 3 residual downsampling blocks, 1 global max pooling layer, 1 global average pooling layer, and 2 fully connected layers.
[0013] In some embodiments, the convolutional layer consists of a 2D convolution Conv2d, a batch normalization layer (BN), and a ReLU activation function; the residual basic block consists of two 3x3 convolutional layers; and the residual downsampling block consists of a 3x3 convolutional layer with a stride of 1 and a 3x3 convolutional layer with a stride of 2.
[0014] In some embodiments, in step S5, the image obtained by ordinary photographic equipment is divided into three channels (R, G, and B) for separate noise reduction, and the image is enhanced and sharpened to enhance its features. The reflective areas generated by ordinary photographic equipment are eliminated by mean filtering.
[0015] In some embodiments, in step S5, the image obtained by the crystal image acquisition device needs to be pre-processed to eliminate overlapping parts of the image and the part of the crystal test tube shape that affects the crystal image.
[0016] In some embodiments, for crystal images captured by ordinary photographic equipment, the detection range of the crystal is first obtained by manually selecting or inputting into the YOLOv5 model. Then, the detection range is randomly expanded or reduced using a random algorithm to generate 10 temporary images, which are then input into the ResNet-CG model to obtain 10 temporary scores for the detection range of the crystal. The accurate score of the detection range of the crystal is obtained by weighted averaging of the 10 temporary scores.
[0017] In some embodiments, for crystal images captured by a crystal image acquisition device, the crystal quality score can be obtained directly by inputting them into the ResNet-CG model without going through the YOLOv5 model.
[0018] In some embodiments, during the training of the ResNet-CG model, the Adam optimization algorithm is selected to optimize the model, with a learning rate of 0.001 and a dropout rate of 0.75.
[0019] In some embodiments, in step S4, when training the YOLOv5 model using the training set and test set, the weights are initialized in the same way as when training the YOLOv5 model using the common training set, and the smart-optimizer algorithm is selected to optimize the YOLOv5 model in few-shot learning.
[0020] In some embodiments, the crystal image acquisition device includes a turntable, a line scan camera, a display screen, a light source, and a support rod. The display screen is disposed at the top of the support rod, and the turntable is disposed at the bottom of the support rod. The light source is slidably connected to the support rod and is located above the turntable. The line scan camera is slidably connected to the support rod and is located above the light source.
[0021] A crystal quality assessment system based on deep neural networks, including
[0022] The crystal image acquisition module is used to acquire crystal image information, including images acquired by ordinary photography equipment and images acquired by crystal image acquisition equipment. After preprocessing, the images are input into the crystal quality assessment module for scoring or into the model training module as input datasets.
[0023] Different preprocessing methods are applied to different crystal image acquisition methods. For images acquired using ordinary photographic equipment, the images are separated into R, G, and B channels for individual noise reduction. Image enhancement and sharpening operations are then performed to enhance features. For reflective areas captured by ordinary photographic equipment, mean filtering is used to eliminate the influence of reflections before inputting the image into the crystal quality assessment module for scoring. For images acquired using crystal image acquisition equipment, preprocessing is performed to eliminate overlapping parts and the influence of the crystal tube shape on the crystal image before inputting the image into the crystal quality assessment module for scoring or into the model training module as the input dataset.
[0024] The model training module includes a data processing module, a ResNet-CG neural network model training module, and a YOLOv5 object detection model training module;
[0025] The data processing module labels the input dataset obtained from the crystal image acquisition module, marking it as a training set and a test set for training the ResNet-CG neural network model and the YOLOv5 object detection model.
[0026] The ResNet-CG model training module of this neural network, based on the initial ResNet-CG model, takes the training set and test set in the data processing module as input to train and obtain a mature ResNet-CG model. Based on the trained ResNet-CG model, the images in the training set are mapped to a score between [1,5].
[0027] The object detection YOLOv5 model training module takes a public dataset as input to train an initial YOLOv5 model, enabling it to roughly locate the crystal position in the image. After the initial model is established, the training set and test set in the data processing module are used as small sample inputs to train it to accurately locate the crystal position and generate decision boxes at the corresponding positions, thus generating a mature YOLOv5 model.
[0028] The crystal quality assessment module takes a well-trained ResNet-CG neural network model and a YOLOv5 object detection model as input. The crystal to be assessed is photographed using ordinary photography equipment or crystal image acquisition equipment. After preprocessing the images, they are input into the YOLOv5 and ResNet-CG models to obtain a score for the crystal.
[0029] In some embodiments, the crystal image acquisition module includes a crystal image acquisition device, which includes a turntable, a line scan camera, a display screen, a light source, and a support rod. The display screen is disposed at the top of the support rod, and the turntable is disposed at the bottom of the support rod. The light source is slidably connected to the support rod and is located above the turntable. The line scan camera is slidably connected to the support rod and is located above the light source.
[0030] In some embodiments, in the crystal quality assessment module, for crystal images captured by ordinary photographic equipment, the crystal detection range is first obtained by manually selecting or inputting into the YOLOv5 model. Then, a random algorithm is used to randomly expand or shrink the detection range to generate 10 temporary images, which are then input into the ResNet-CG model to obtain 10 temporary scores for the crystal detection range. The accurate score for the crystal detection range is obtained by weighted averaging of the 10 temporary scores. For crystal images captured by crystal image acquisition equipment, the YOLOv5 model is not required; the crystal quality score is directly input into the ResNet-CG model.
[0031] By adopting the above technical solution, the beneficial effects of the present invention are:
[0032] By constructing deep learning models YOLOv5 and ResNet-CG, users can input images of the crystal into the device, which will automatically identify and grade the crystal quality. Production personnel can then use this crystal evaluation method to establish a numerical intelligent temperature control system, adjust various environmental factors during the crystal growth process, and produce qualified and high-quality scintillation crystals for use in the intelligent manufacturing industry.
[0033] The ResNet-CG neural network model reduces the original input size of the existing ResNet-18 model, making it more accurate in capturing crystal quality. It modifies the residual downsampling block to reduce the number of parameters by upscaling it to the original image size after dimensionality reduction. A fully connected layer is added as a data firewall to prevent erroneous features from directly entering the final output and affecting the data. The ResNet-CG model removes the last output layer of the original network and replaces it with a 5-class output layer to accommodate the five classifications of crystal quality.
[0034] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
[0035] Undoubtedly, such and other objects of the present invention will become more apparent after the following detailed description of the preferred embodiments, which are illustrated in various accompanying drawings and figures.
[0036] To make the above and other objects, features and advantages of the present invention more apparent and understandable, one or more preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0037] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0038] In the accompanying drawings, the same parts use the same reference numerals, and the drawings are schematic and not necessarily drawn to actual scale.
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only one or more embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on such drawings without creative effort.
[0040] Figure 1 This is a schematic diagram illustrating the process of establishing a quality assessment system in some embodiments of the present invention;
[0041] Figure 2 This is a schematic diagram of the crystal quality assessment process in some embodiments of the present invention;
[0042] Figure 3 This is a structural diagram of a crystal quality assessment system based on a deep neural network.
[0043] Figure 4 This is a schematic diagram of the neural network structure in some embodiments of the present invention;
[0044] Figure 5 This is a schematic diagram illustrating the performance metrics of different network depth models in some embodiments of the present invention;
[0045] Figure 6 This is a schematic diagram for crystal quality scoring in some embodiments of the present invention;
[0046] Figure 7 This is a schematic diagram of the front structure of a crystal image acquisition device in some embodiments of the present invention;
[0047] Figure 8 This is a schematic diagram of the side structure of a crystal image acquisition device in some embodiments of the present invention;
[0048] Figure 9 This is a schematic diagram showing the connection of various components of the crystal image acquisition device in some embodiments of the present invention.
[0049] Key reference numerals in the attached drawings: 1. Turntable; 2. Line scan camera; 3. Display screen; 4. Light source; 5. Support rod. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0051] Furthermore, in the description of this invention, it should be understood that the terms "center," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0052] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral unit; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. However, specifying a direct connection indicates that the two main bodies are not connected through a transitional structure, but rather formed as a whole through a connecting structure. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0053] In this invention, unless otherwise expressly specified and limited, the first feature "on" or "below" the second feature may be in direct contact with the first and second features, or indirect contact through an intermediate medium. In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0054] Reference Figure 1 , Figure 1 This is a schematic diagram illustrating the process of establishing a quality assessment system in some embodiments of the present invention.
[0055] According to some embodiments of the present invention, the present invention provides a crystal quality assessment method based on a deep neural network, comprising the following steps:
[0056] S1. Acquire Crystal Image Dataset: Classify the crystal images acquired by the crystal image acquisition device according to the quality assessment criteria, and label the crystal quality score of the images, using this as the input dataset; laboratory personnel will comprehensively judge the crystal quality score based on the crystal's transparency, envelope size, and degree of cracks;
[0057] S2. Data Processing: Label the input dataset and mark it as the training set and test set in a 9:1 ratio;
[0058] S3. Building a Neural Network Model: Build an initial ResNet-CG neural network model. Use the training set and test set from step S2 as inputs, iteratively fit the function between the input and output, reduce the cross-entropy loss between the predicted output and the actual output through iteration, train the model parameters, and obtain a mature ResNet-CG model. Based on the trained ResNet-CG model, map the images in the training set to a score between [1,5].
[0059] The ResNet-CG convolutional neural network model consists of a 7x7 convolutional layer, five residual basic blocks, three residual downsampling blocks, one global max pooling layer, one global average pooling layer, and two fully connected layers. The convolutional layer comprises a 2D Conv2D convolution, a batch normalization (BN) layer, and a ReLU activation function. The residual basic blocks consist of two 3x3 convolutional layers, and the residual downsampling blocks consist of a 3x3 convolutional layer with a stride of 1 and a 3x3 convolutional layer with a stride of 2. Both the residual basic blocks and the residual downsampling blocks utilize a residual learning strategy, adding residual connections between the input and output of the residual units to prevent the vanishing gradient problem.
[0060] S4. Build an object detection model: Build an object detection YOLOv5 model. Use the public dataset as input to train the initial YOLOv5 model so that it can roughly locate the crystal position in the image. After the initial model is built, use the training set and test set in step S2 as small sample input to train it to accurately locate the crystal position and generate decision boxes at the corresponding positions to generate a mature YOLOv5 model.
[0061] In the process of training the YOLOv5 model with few samples using the input training and test sets, the weights are initialized using the YOLOv5 model trained on the common training set for further few sample training. The minimum batch size is 453, the number of iterations is 100, and the smart-optimizer algorithm is selected to optimize the YOLOv5 model in few sample learning. The YOLOv5 model has a 95% chance of obtaining the target region.
[0062] For target detection of crystal regions on crystal images, a combination of manual and automatic methods is used. The automatic method involves inputting the crystal image into a pre-trained YOLOv5 model, which outputs two coordinate points with the coordinates of the top left and bottom right corners of the target region, as well as the length and width weights of the target region. Because there is a 5% chance that the target region cannot be obtained, and because YOLOv5 has a low probability of detecting targets in distorted crystal images, a manual cropping method is used to obtain the target region to ensure the accuracy of crystal position selection.
[0063] S5. Crystal Quality Assessment: Take photos of the crystal to be assessed using ordinary photography equipment or crystal image acquisition equipment. After preprocessing the images, input them into the YOLOv5 model and the ResNet-CG model to obtain a score for the crystal.
[0064] For an image of a crystal taken with ordinary photographic equipment, it is divided into three channels (R, G, and B) for separate noise reduction. The image is then enhanced and sharpened to enhance its features and prevent feature loss due to noise reduction. Secondly, considering that image reflections are caused by uneven light source distribution during camera shooting, the reflection is a specific shape. The color around the shape is used to recolor it, i.e., mean filtering is used to eliminate the influence of reflections. The pre-processed image is then input into the computer.
[0065] Considering that an intelligent management system for crystals can be developed based on this crystal quality assessment method, this invention also provides a crystal image acquisition device, including a turntable and a line scan camera. Using a shadowless light source as the background for crystal acquisition, it acquires panoramic images of inorganic scintillation crystals. Since the line scan camera scans one and a half circumferences of the crystal surface, a preprocessing program is set to delete overlapping portions of the crystal surface. After preprocessing, overlapping portions and the influence of the crystal tube shape on the crystal image can be eliminated before being input into a computer. The entire image acquisition process can be controlled by a computer, accurately locating the image without generating reflections, thus reducing the preprocessing required for image quality.
[0066] Reference Figure 2 , Figure 2 This is a schematic diagram of the crystal quality assessment process in some embodiments of the present invention.
[0067] According to some embodiments of the present invention, for crystal quality images obtained by crystal image acquisition devices, there is no need to pass through the target detection YOLOv5 model; the crystal quality score can be obtained directly by inputting the image into the ResNet-CG model. For crystal images captured by ordinary camera devices, the crystal detection range is first obtained by manual selection or input into the YOLOv5 model. Then, the detection range is randomly expanded or reduced using a random algorithm to generate 10 temporary images, which are then input into the ResNet-CG model to obtain 10 temporary scores for the crystal detection range. The accurate score of the crystal detection range is obtained by weighted averaging of the 10 temporary scores. The higher the score of the crystal detection range, the better the crystal quality.
[0068] Reference Figure 3 , Figure 3 This is a structural diagram of a crystal quality assessment system based on a deep neural network.
[0069] According to some embodiments of the present invention, the present invention also provides a crystal quality assessment system based on a deep neural network, characterized in that it includes...
[0070] The crystal image acquisition module is used to acquire crystal image information, including images acquired by ordinary photography equipment and images acquired by crystal image acquisition equipment. After preprocessing, the images are input into the crystal quality assessment module for scoring or into the model training module as input datasets.
[0071] Different preprocessing methods are applied to different crystal image acquisition methods. For images acquired using ordinary photographic equipment, the images are separated into R, G, and B channels for individual noise reduction. Image enhancement and sharpening operations are then performed to enhance features. For reflective areas captured by ordinary photographic equipment, mean filtering is used to eliminate the influence of reflections before inputting the image into the crystal quality assessment module for scoring. For images acquired using crystal image acquisition equipment, preprocessing is performed to eliminate overlapping parts and the influence of the crystal tube shape on the crystal image before inputting the image into the crystal quality assessment module for scoring or into the model training module as the input dataset.
[0072] The model training module includes a data processing module, a ResNet-CG neural network model training module, and a YOLOv5 object detection model training module;
[0073] The data processing module labels the input dataset obtained from the crystal image acquisition module, marking it as a training set and a test set for training the ResNet-CG neural network model and the YOLOv5 object detection model.
[0074] The ResNet-CG model training module of this neural network, based on the initial ResNet-CG model, takes the training set and test set in the data processing module as input to train and obtain a mature ResNet-CG model. Based on the trained ResNet-CG model, the images in the training set are mapped to a score between [1,5].
[0075] The object detection YOLOv5 model training module takes a public dataset as input to train an initial YOLOv5 model, enabling it to roughly locate the crystal position in the image. After the initial model is established, the training set and test set in the data processing module are used as small sample inputs to train it to accurately locate the crystal position and generate decision boxes at the corresponding positions, thus generating a mature YOLOv5 model.
[0076] The crystal quality assessment module takes a well-trained ResNet-CG neural network model and a YOLOv5 object detection model as input. The crystal to be assessed is photographed using ordinary photography equipment or crystal image acquisition equipment. After preprocessing the images, they are input into the YOLOv5 and ResNet-CG models to obtain a score for the crystal.
[0077] Reference Figure 4 , Figure 4 This is a schematic diagram of the neural network structure in some embodiments of the present invention.
[0078] The specific neural network algorithm is as follows:
[0079] 1. Preprocess the crystal quality image by dividing the image into test tube areas based on the test tube boundary, and then further dividing the test tube areas into a set of 128*128 images.
[0080] 2. Preprocess the segmented images;
[0081] 3. Initialize the weights before training and perform batch standardization on all parameters;
[0082] 4. Training the network involves two phases: the forward pass and the backward pass.
[0083] 1) Forward propagation process: Take samples of batch size and number from the sample, input them into the network, and calculate the corresponding actual output: First, reduce the dimensionality of the image and extract features according to the network structure, and then transform and transmit the features to the output layer step by step to obtain the actual output. In this embodiment, the feature is the high-dimensional feature of the crystal image, which is a composite of cracks, bubbles, color and other features.
[0084] 2) Backpropagation process: Calculate the difference between the actual output and the corresponding label according to the cross-entropy loss function, and adjust the weight matrix using the Adam optimization algorithm;
[0085] 5. Repeat step 4 until the weight matrix no longer changes or the target number of iterations is reached;
[0086] 6. Input the validation set into the trained neural network to verify the accuracy of the neural network. If it meets the standard, keep the trained neural network; otherwise, discard it and retrain.
[0087] Training details are shown in Table 1.
[0088] parameter value Input size 128*128*3 Batch size 453 loss function Cross-entropy loss function Activation function ReLU, SoftMax Optimization function Adam Iteration 65 Dropout 0.5
[0089] Table 1 Training details and hyperparameters
[0090] The cross-entropy loss function is formulated as follows:
[0091]
[0092] This indicates the result of the model's prediction. This represents the actual result, where M is the sample size; It represents the difference between the model's predicted results and the actual results, and is an important function for measuring the model's results.
[0093] The formulas for the ReLU activation function and the SoftMax activation function are as follows:
[0094]
[0095]
[0096] t represents the input of the artificial neuron, i.e., the output of the previous artificial neuron; the activation function is the function that runs on the neurons of the artificial neural network, responsible for mapping the neuron's input to its output; the Softmax activation function is used for neuron activation in multi-class classification problems, while ReLU is used for neuron activation for fitting features.
[0097] The optimization algorithm adopted is the Adam optimization algorithm, which combines the advantages of adaptive learning rate gradient descent and momentum gradient descent. It can adapt to sparse gradients and solve the gradient oscillation problem. Its formula is:
[0098]
[0099]
[0100]
[0101] in, It is the first moment of the gradient g, i.e., the expectation of the gradient. The first-order moment attenuation coefficient; It is the second moment of the gradient g, i.e., the gradient. Expectations The second-order moment attenuation coefficient; Represents the loss function. Indicates the learning rate. It is a fixed constant. t is the update step number.
[0102] According to some embodiments of the present invention, the Adam optimization algorithm is used to optimize the network model during training, with a learning rate of 0.001, a dropout rate of 0.5, a cross-entropy loss function, a minimum batch size of 453, and 65 model iterations. Dropout is a commonly used method in machine learning to prevent overfitting, which stops the operation of neurons with a certain probability during the forward training of the model. The Dropout probability used in this invention is 0.5, meaning that there is a 50% probability that neurons will stop working during a single training iteration.
[0103] According to some embodiments of the present invention, the ResNet-CG neural network is derived by modifying the existing ResNet-18 network. ResNet-CG modifies the original input size of ResNet-18, changing the original 224x224x3 input to 128x128x3; it also modifies the residual downsampling block to reduce the number of parameters by upscaling it to the original image size after dimensionality reduction; it adds a fully connected layer to the original ResNet-18 network structure as a data firewall to prevent extracted erroneous features from directly flowing into the final output and affecting the data; and it removes the last output layer of the original network and replaces it with a 5-class classification output layer. Its network structure is as follows: Figure 4 As shown.
[0104] According to some embodiments of the present invention, the general structure of the ResNet-CG model is as follows: Figure 4 As shown: The first layer is a 7x7 convolutional layer; layers 2 to 17 consist of 5 residual basic blocks and 3 residual downsampling blocks, which accelerates network convergence and extracts features while reducing network training problems caused by gradient vanishing; layer 18 outputs the image as a 1x256 vector through an average pooling layer and a fully connected layer to prevent data errors; layer 19 reduces the 256-dimensional array to a 5-dimensional array level through a fully connected layer.
[0105] According to some embodiments of the present invention, the final output is a five-dimensional array, obtained by 1X level[0] + 2X level[1] +
[0106] The method of 3X grade[2]+4X grade[3]+5X grade[4] is converted into a quality score.
[0107] Reference Figure 5 , Figure 5 This is a schematic diagram illustrating the performance metrics of different depth network models in some embodiments of the present invention.
[0108] Different network models with different depths exhibit varying classification accuracy on crystal datasets. AlexNet256 is a network model trained with few samples using the AlexNet network model, while ResNet18-2fc refers to a network model that adds only one fully connected layer to the original ResNet-18 model. Figure 4 The results show that the ResNet-CG neural network model of this invention, namely the ResNet18-CG model, performs best on average among all network models based on its own structure and training method characteristics. It achieves an accuracy of 90%, 83%, 90%, 70%, and 67% in the five levels, respectively, thus realizing the accurate evaluation of crystal quality by this crystal quality evaluation system.
[0109] Reference Figure 6 , Figure 6 This is a schematic diagram for crystal quality scoring in some embodiments of the present invention.
[0110] The system will rate the quality of the crystal under test according to the score range: [1, 1.5) is a completely unusable crystal, [1.5, 2.5) is a partially usable crystal, [2.5, 3.5) is an inorganic scintillation crystal with a through crack, [3.5, 4.5) is a high-quality crystal with some flaws, and [4.5, 5] is a perfect crystal.
[0111] Reference Figure 7-9 , Figure 7 This is a schematic diagram of the front structure of a crystal image acquisition device in some embodiments of the present invention; Figure 8 This is a schematic diagram of the side structure of a crystal image acquisition device in some embodiments of the present invention; Figure 9 This is a schematic diagram showing the connection of various components of the crystal image acquisition device in some embodiments of the present invention.
[0112] In some embodiments, the crystal image acquisition device includes a turntable 1, a line scan camera 2, a display screen 3, a light source 4, and a support rod 5. The display screen 3 is disposed at the top of the support rod 5, and the turntable 1 is disposed at the bottom of the support rod 5. The light source 4 is slidably connected to the support rod 5 and is located above the turntable 1. The line scan camera 2 is slidably connected to the support rod 5 and is located above the light source 4.
[0113] Due to the transparency and reflectivity of scintillation crystals, and the requirement for imaging in a vacuum environment, images of scintillation crystals captured by general equipment are not highly accurate and cannot meet the requirements for precise image classification. Therefore, in the process of acquiring crystal images, we use a line scan camera (2), an image acquisition device widely used in industry. The line scan camera (2) employs a line scan image sensor. The object being detected typically moves at a constant speed, and one or more cameras are used to continuously scan it line by line to achieve uniform detection of its entire surface. Finally, the multiple lines scanned by the line scan camera (2) are combined to obtain a high-precision area array image.
[0114] The specific operating steps for crystal image acquisition equipment are as follows:
[0115] 1. Place the scintillation crystal into the industrial turntable 1 and adjust the rotation speed of the turntable 1 according to the crystal specifications. Start the line scan camera 2 and its matching light source 4 when the crystal does not move additionally.
[0116] 2. Adjust light source 4, and simultaneously adjust line scan camera 2;
[0117] 3. Combine the line scan images acquired by the line scan camera 2 into an image and input it into the image acquisition card and preprocessing program to obtain an image of the inorganic scintillation crystal surface. The preprocessing program is a program to delete redundant parts of the crystal surface. Since the line scan camera scans a circle and a half of the crystal surface, it is necessary to delete the repetitive parts of the crystal surface.
[0118] It should be understood that the embodiments disclosed herein are not limited to the specific processing steps or materials disclosed herein, but should be extended to equivalent substitutions of such features as understood by those skilled in the art. It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting.
[0119] The term "embodiment" in this specification refers to a specific feature or characteristic described in connection with an embodiment that is included in at least one embodiment of the invention. Therefore, phrases or "embodiments" appearing in various places throughout the specification do not necessarily refer to the same embodiment.
[0120] Furthermore, the described features or characteristics can be incorporated into one or more embodiments in any other suitable manner. In the above description, specific details, such as thickness, quantity, etc., are provided to provide a comprehensive understanding of embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented without the aforementioned specific details or may be implemented using other methods, components, materials, etc.
Claims
1. A crystal quality assessment method based on deep neural networks, characterized in that, Includes the following steps: S1. Acquire crystal image dataset: Classify the crystal images acquired by the crystal image acquisition device according to the quality assessment criteria, and label the crystal quality scores of the images as input datasets; S2. Data Processing: Label the input dataset, marking it as the training set and the test set; S3. Building a Neural Network Model: Build an initial ResNet-CG neural network model. Use the training set and test set from step S2 as inputs, iteratively fit the function between the input and output, reduce the cross-entropy loss between the predicted output and the actual output through iteration, train the model parameters, and obtain a mature ResNet-CG model. Based on the trained ResNet-CG model, map the images in the training set to a score between [1,5]. S4. Build an object detection model: Build an object detection YOLOv5 model. Use the public dataset as input to train the initial YOLOv5 model so that it can roughly locate the crystal position in the image. After the initial model is built, use the training set and test set in step S2 as small sample input to train it to accurately locate the crystal position and generate decision boxes at the corresponding positions to generate a mature YOLOv5 model. S5. Crystal Quality Assessment: Take photos of the crystal to be assessed using ordinary photography equipment or crystal image acquisition equipment. After preprocessing the images, input them into the YOLOv5 model and the ResNet-CG model to obtain a score for the crystal. The ResNet-CG model includes a 7x7 convolutional layer, 5 residual basic blocks, 3 residual downsampling blocks, 1 global max pooling layer, 1 global average pooling layer, and 2 fully connected layers. The convolutional layer consists of a 2D convolutional Conv2d, a batch normalization layer, and a ReLU activation function. The residual basic block consists of two 3x3 convolutional layers, and the residual downsampling block consists of a 3x3 convolutional layer with a stride of 1 and a 3x3 convolutional layer with a stride of 2.
2. The crystal quality assessment method based on deep neural networks according to claim 1, characterized in that, In step S5, the image obtained using ordinary photographic equipment is divided into three channels (R, G, and B) for separate noise reduction. Image enhancement and sharpening operations are then performed to enhance the image's features. Furthermore, for reflective areas produced by ordinary photographic equipment, the effect of reflection is eliminated by mean filtering.
3. The crystal quality assessment method based on deep neural networks according to claim 1, characterized in that, In step S5, the image obtained by the crystal image acquisition device needs to be pre-processed to eliminate overlapping parts of the image and the influence of the crystal tube shape on the crystal image.
4. The crystal quality assessment method based on deep neural networks according to claim 1, characterized in that, For crystal images captured by ordinary photographic equipment, the detection range of the crystal is first obtained by manually selecting the area or inputting it into the YOLOv5 model. Then, the detection range is randomly expanded or reduced using a random algorithm to generate 10 temporary images, which are then input into the ResNet-CG model to obtain 10 temporary scores for the detection range of the crystal. The accurate score of the detection range of the crystal is obtained by weighted averaging of the 10 temporary scores.
5. The crystal quality assessment method based on deep neural networks according to claim 1, characterized in that, For crystal images captured by crystal image acquisition devices, there is no need to use the YOLOv5 model; the crystal quality score can be obtained directly by inputting the images into the ResNet-CG model.
6. The crystal quality assessment method based on deep neural networks according to claim 1, characterized in that, During the training of the ResNet-CG model, the Adam optimization algorithm was selected to optimize the model, with a learning rate of 0.001 and a dropout rate of 0.
75.
7. The crystal quality assessment method based on deep neural networks according to claim 1, characterized in that, In step S4, when training the YOLOv5 model using the training and test sets, the weights are initialized in the same way as when training the YOLOv5 model using the common training set. The smart-optimizer algorithm is then selected to optimize the YOLOv5 model during few-shot learning.
8. The crystal quality assessment method based on deep neural networks according to claim 1, characterized in that, The crystal image acquisition device includes a turntable, a line scan camera, a display screen, a light source, and a support rod. The display screen is mounted on the top of the support rod, and the turntable is mounted on the bottom of the support rod. The light source is slidably connected to the support rod and is located above the turntable. The line scan camera is slidably connected to the support rod and is located above the light source.
9. A crystal quality assessment system based on deep neural networks, characterized in that, include The crystal image acquisition module is used to acquire crystal image information. After preprocessing, the images are input into the crystal quality assessment module for scoring or into the model training module as input datasets. Different preprocessing methods are applied to different crystal image acquisition methods. For images acquired using ordinary photographic equipment, the images are separated into R, G, and B channels for individual noise reduction. Image enhancement and sharpening operations are then performed to enhance features. For reflective areas captured by ordinary photographic equipment, mean filtering is used to eliminate the influence of reflections before inputting the image into the crystal quality assessment module for scoring. For images acquired using crystal image acquisition equipment, preprocessing is performed to eliminate overlapping parts and the influence of the crystal tube shape on the crystal image before inputting the image into the crystal quality assessment module for scoring or into the model training module as the input dataset. The model training module includes a data processing module, a ResNet-CG neural network model training module, and a YOLOv5 object detection model training module; The data processing module labels the input dataset obtained from the crystal image acquisition module, marking it as a training set and a test set for training the ResNet-CG neural network model and the YOLOv5 object detection model. The ResNet-CG model training module of this neural network, based on the initial ResNet-CG model, takes the training set and test set in the data processing module as input to train and obtain a mature ResNet-CG model. Based on the trained ResNet-CG model, the images in the training set are mapped to a score between [1,5]. The object detection YOLOv5 model training module takes a public dataset as input to train an initial YOLOv5 model, enabling it to roughly locate the crystal position in the image. After the initial model is established, the training set and test set in the data processing module are used as small sample inputs to train it to accurately locate the crystal position and generate decision boxes at the corresponding positions, thus generating a mature YOLOv5 model. The crystal quality assessment module takes a well-trained ResNet-CG neural network model and a YOLOv5 object detection model as input. The crystal to be assessed is photographed using ordinary photography equipment or crystal image acquisition equipment. After preprocessing the images, they are input into the YOLOv5 model and the ResNet-CG model to obtain a score for the crystal. The ResNet-CG model includes a 7x7 convolutional layer, 5 residual basic blocks, 3 residual downsampling blocks, 1 global max pooling layer, 1 global average pooling layer, and 2 fully connected layers. The convolutional layer consists of a 2D convolutional Conv2d, a batch normalization layer, and a ReLU activation function. The residual basic block consists of two 3x3 convolutional layers, and the residual downsampling block consists of a 3x3 convolutional layer with a stride of 1 and a 3x3 convolutional layer with a stride of 2.
10. The crystal quality assessment system based on a deep neural network according to claim 9, characterized in that, The crystal image acquisition module includes a crystal image acquisition device, which includes a turntable, a line scan camera, a display screen, a light source, and a support rod. The display screen is located at the top of the support rod, and the turntable is located at the bottom of the support rod. The light source is slidably connected to the support rod and is located above the turntable. The line scan camera is slidably connected to the support rod and is located above the light source.
11. The crystal quality assessment system based on a deep neural network according to claim 9, characterized in that, In the crystal quality assessment module, for crystal images captured by ordinary photographic equipment, the detection range of the crystal is first obtained by manually selecting the area or inputting it into the YOLOv5 model. Then, a random algorithm is used to randomly expand or shrink the detection range to generate 10 temporary images, which are then input into the ResNet-CG model to obtain 10 temporary scores for the detection range of the crystal. The accurate score of the detection range of the crystal is obtained by weighted averaging of the 10 temporary scores. For crystal images captured by crystal image acquisition equipment, there is no need to go through the YOLOv5 model; the crystal quality score is obtained directly by inputting it into the ResNet-CG model.
Citation Information
Patent Citations
Surface smudginess detection method, terminal device and storage medium
CN110245697A
Scintillator crystal evaluation system
US20190180436A1