A centrifuge automatic control system and method based on machine vision
Through the automatic control system based on machine vision, U-Net and ResNet50 networks are used to identify centrifuge images, and the frequency domain analysis method is combined to determine the fuzzy state, which solves the problem of frequent manual processing of existing centrifuges and improves the degree of intelligence and production efficiency. , reducing costs.
Patent Information
- Application Number
- CN202311154455.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-08
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-09-08
AI Technical Summary
Existing centrifuges have many links that require manual processing in the solid-liquid separation process, resulting in high costs, low production efficiency, and lack of intelligent control.
An automatic control system based on machine vision is used to preprocess the image through double filtering method, build a 50-layer U-Net network and ResNet50 residual network, train the model to identify the material and mother liquor images, and combine the frequency domain analysis method to determine the blur state of the image to achieve Automatic control and interlocking cleaning.
It improves the intelligence of the centrifuge, reduces manual intervention, improves production efficiency, ensures image quality, and reduces actual costs.
Smart Images

Figure CN117259035B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a centrifuge automatic control system and method based on machine vision. Background Art
[0002] Solid-liquid separation is a common method of separating substances, which is achieved through the difference in solubility of different substances in solvents. Centrifuge is a conventional equipment for solid-liquid separation, which is widely used in pharmaceuticals, new energy batteries, chemicals, petroleum, food, mineral processing, coal, water treatment and shipping industries. It has become an indispensable industrial machinery for current industrial production.
[0003] Usually in the process of separation of solid and mother liquor, measuring the relevant characteristic parameters of the material is one of the important means of controlling and optimizing to obtain the desired product quality and production efficiency. The existing technology uses cameras to collect images, but most of them still remain at the level of manual target recognition. As mentioned above, the image is only regarded as basic information, and there is a lack of information extraction and processing of the image.
[0004] During use, centrifuge equipment is often in non-steady working conditions such as variable speed and variable load. Due to the low level of intelligence of existing centrifuges, the sustainable production efficiency of traditional centrifuge control methods is low. In the solid-liquid separation process, such as regular cleaning of cameras, judging the material status and mother liquor separation status based on camera images, etc., the actual cost is relatively high.
[0005] The existing machine vision technology is to extract features from images through neural networks, thereby automatically obtaining the image features of interest. Machine vision is an important step in realizing automatic image feature extraction and is the basis for target classification and recognition. Applying machine vision technology to the solid-liquid separation in centrifuges is a feasible technical solution to improve the intelligence of centrifuges. Summary of the invention
[0006] The object of the present invention is to provide a centrifuge automatic control system and method based on machine vision, so as to solve the problem that the centrifuge in the prior art still has multiple links that require manual processing during solid-liquid separation, resulting in high costs.
[0007] In order to solve the above technical problems, the present invention specifically provides the following technical solutions:
[0008] A centrifuge automatic control method based on machine vision comprises the following steps:
[0009] S1: Preprocessing the collected material image and mother liquid image using a double filtering method to reduce the interference caused by fine features in the image, and obtaining the preprocessed material image and mother liquid image;
[0010] S2: Build a 50-layer U-Net network and use the ResNet50 residual network as the main network structure;
[0011] S3: Randomly divide the preprocessed material images and mother liquid images into a training set and a test set respectively, perform data amplification on the material image training set and the mother liquid image training set, and then input them into the network model for training, and obtain multiple trained network models according to each training set;
[0012] S4: inputting the material image test set and the mother liquid image test set into the multiple trained network models, and selecting the optimal network model with the highest pixel accuracy and the optimal intersection-over-union ratio according to the test set evaluation index obtained by each trained network model;
[0013] S5: inputting the material image and the mother liquid image collected in real time into the optimal network model to obtain data on material thickness, material color, mother liquid flow rate, and mother liquid color;
[0014] S6: Use the frequency domain analysis method to perform a fuzzy state analysis on the material image and the mother liquid image input in S5, and determine whether the image is in a fuzzy state based on the image spectrum. If the image is determined to be in a fuzzy state, a mirror cleaning operation is required; otherwise, it is determined that the image is not in a fuzzy state and no mirror cleaning operation is required.
[0015] As a preferred embodiment of the present invention, in S1, the material images collected are specifically at least 10,000 material images with an original resolution of 1920×960, of which at least 2 / 3 of the images are images of feeding through the centrifuge sight glass hole; and the mother liquor images collected, of which at least 1 / 3 of the images are images of the centrifuge drain pipe without mother liquor.
[0016] As a preferred solution of the present invention, in S1, the dual filtering method is specifically Gaussian blur and median filtering, and the specific steps of using the dual filtering method to preprocess the image are as follows:
[0017] S11: Use Gaussian blur to perform denoising on the collected image. First, a Gaussian kernel is defined according to the Gaussian distribution formula. The Gaussian distribution formula is as follows:
[0018]
[0019] Where G(x, y) is the coordinate of the Gaussian kernel, and σ is the standard deviation of the Gaussian kernel;
[0020] S12: For each pixel (x, y) in the image, multiply the Gaussian kernel with the pixels in the surrounding area of each pixel (x, y) in the image to obtain a product value, and add the product values to obtain the pixel value I after Gaussian filtering. smooth (x, y), the Gaussian filter formula is as follows:
[0021]
[0022] Among them, I(x+i, y+j) represents the pixel value in the neighborhood of the image, x and y represent the coordinate center value, G(i, j) represents the weight of the Gaussian kernel at the coordinate (i, j), i and j represent the weight value, and k is the radius of the field;
[0023] S13: Use median filtering to further process the residual noise of the Gaussian filtered image. The median filtering formula is as follows:
[0024] I smooth (x, y)=MedianI (x+i, y+j): -k≤i, j≤k
[0025] Wherein, MedianI(x+i, y+j) means removing the median of the pixel values in the region of the image;
[0026] S14: Scale the filtered image to a uniform size of 512×512.
[0027] As a preferred solution of the present invention, in S2, the ResNet50 residual network includes four residual structures, each of the residual structures includes a different number of residual blocks, and each of the residual blocks includes three layers of convolution;
[0028] The residual blocks of the same type are connected in sequence, and the number of convolution kernels of the first convolution layer of each residual structure is fixed to 64, 128, 256, and 512.
[0029] As a preferred solution of the present invention, in S3, 80% of the material images and mother liquid images are training sets, and the remaining 20% are test sets. The method of data enhancement for the training set is: randomly flipping, affine transforming and cropping the images of the training set to obtain the training set data after quantity expansion, and standardizing all the data to obtain the training set after data expansion.
[0030] As a preferred solution of the present invention, in S3, the specific method of inputting the data-enhanced training set into the ResNet-Unet network model for training is:
[0031] Each network parameter is initialized by random initialization, and the Adam gradient descent method is used to optimize the joint loss function combining DiceLoss and FocalLoss. The calculation method of the joint loss function is as follows:
[0032] L=λ*L1-logL2
[0033] Among them, L represents the joint loss function value of DiceLoss and FocalLoss between the mask predicted by the U-Net network and the real mask of the training sample set, λ represents the weight factor, L1 represents the FocalLoss loss function value, and L2 represents the DiceLoss loss function value;
[0034] The FocalLoss loss function value is calculated as follows:
[0035]
[0036] Among them, L1 represents the FocalLoss loss function value, α represents the parameter adjustment factor, γ represents the parameter adjustment factor, p represents the binary mask image output by the U-Net network, and t represents the manually annotated mask image;
[0037] The DiceLoss loss function value is obtained by the following formula:
[0038]
[0039] Among them, L2 represents the DiceLoss loss function value.
[0040] As a preferred solution of the present invention, in S4, the pixel accuracy is represented by PA, which is calculated as follows:
[0041]
[0042] The intersection-over-union ratio represents IOU, which is calculated as follows:
[0043]
[0044] Among them, TP represents the total number of training samples that predict the positive class as the positive class, FN represents the total number of training samples that predict the positive class as the negative class, FP represents the total number of training samples that predict the negative class as the positive class, and TN represents the total number of training samples that predict the negative class as the negative class.
[0045] As a preferred solution of the present invention, in S6, the specific steps of the frequency domain analysis method for determining whether the centrifuge image is in a blurred state are as follows:
[0046] S61: The image is converted from the spatial domain to the frequency domain through Fourier transform, and the image is decomposed into sine and cosine components of different frequencies, expressed in complex form. The Fourier transform formula is expressed as follows:
[0047] F(u,v)=∫∫f(x,y)·e -j2π(ux+uy) dxdy
[0048] Wherein, (u, v) represents the coordinate in the frequency domain, F(u, v) represents the value at the coordinate, (x, y) represents the coordinate in the space domain, f(x, y) represents the value at the coordinate, and j is an imaginary unit;
[0049] S62: using the amplitude spectrum of the frequency spectrum to judge the blur degree of the image, by calculating the modulus of the Fourier transform result F(u, v), obtaining the amplitude spectrum S(u, v) of the frequency spectrum;
[0050] S63: Calculate the center position of the amplitude spectrum of the frequency spectrum to obtain the center frequency of the frequency spectrum, which is used to further determine the blur degree of the image. The center frequency is calculated as follows:
[0051]
[0052]
[0053] Among them, u center and v center Respectively represent the center frequency of the coordinate value;
[0054] S64: an index representing the degree of image blur is obtained through S61-S63, and the index is used to determine whether the centrifuge needs to be flushed.
[0055] A centrifuge automatic control system based on machine vision, using the centrifuge automatic control method based on machine vision as described above, including two cameras connected to the centrifuge, an optical fiber switch, a graphics workstation and a PLC, characterized in that:
[0056] The two cameras are respectively installed at the centrifuge sight glass hole and the liquid discharge pipe, and are respectively used to collect the material image input into the centrifuge and the mother liquid image output, and input the collected images to the image workstation and the PLC through the optical fiber switch.
[0057] The optical fiber switch is used for the transmission of network data.
[0058] The graphic workstation includes an image acquisition module, an image processing and recognition module, and a logic control module. The image acquisition module is used to receive transmitted image information. The image processing and recognition module is used to run a network model to identify and analyze the color of the collected material images and mother liquid images. The logic control module is used to perform chain control on the analysis data obtained after processing.
[0059] The PLC is data-connected to the image workstation and is used for data processing and control.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] (1) The present invention collects images of materials and mother liquor separation in a centrifuge to train an existing network model, thereby obtaining a network model that matches the optimal values of the separation of materials and mother liquor in the centrifuge. The present invention can obtain the centrifuge material thickness, material color, mother liquor flow rate, and mother liquor color with high accuracy based on the collected images, thereby improving the intelligence of the centrifuge, reducing labor, and improving production efficiency.
[0062] (2) The present invention can also determine whether the collected image is blurred. When blurry, the graphic workstation will implement interlocking control with the PLC to trigger the mirror cleaning device to prevent materials from splashing onto the camera during the feeding process or causing fog to form on the camera mirror when feeding some hot materials, thereby ensuring the quality of the collected image. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0064] Figure 1 The figure is a schematic diagram of the method flow of the first embodiment of the present invention.
[0065] Figure 2 This is a schematic diagram of the system framework of the second embodiment of the present invention.
[0066] Figure 3 This is a schematic diagram of camera installation according to Embodiment 2 of the present invention.
[0067] Figure 4 It is a schematic diagram of the interlocking control system of PLC and graphic workstation of the present invention. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] The following first describes the concepts involved in the present application in conjunction with the accompanying drawings. It should be noted that the following description of each concept is only to make the content of the present application easier to understand, and does not limit the scope of protection of the present application; at the same time, the embodiments and features in the embodiments of the present application can be combined with each other in the absence of conflict. The present application will be described in detail with reference to the accompanying drawings and in conjunction with the embodiments.
[0070] Embodiment 1
[0071] like Figure 1 As shown, the present invention provides a centrifuge automatic control method based on machine vision, comprising the following steps:
[0072] S1: The collected material image and mother liquid image are preprocessed using a double filtering method to reduce the interference caused by small features in the image, thereby obtaining the preprocessed material image and mother liquid image.
[0073] Specifically, in S1, the material images collected are at least 10,000 material images with an original resolution of 1920×960, of which at least 2 / 3 of the images are images of feeding through the centrifuge sight glass hole; and the mother liquor images collected, of which at least 1 / 3 of the images are images of the centrifuge drain pipe without mother liquor.
[0074] Specifically, in S1, the dual filtering method is specifically Gaussian blur and median filtering, and the specific steps of using the dual filtering method to preprocess the image are as follows:
[0075] S11: Use Gaussian blur to perform denoising on the collected image. First, a Gaussian kernel is defined according to the Gaussian distribution formula. The Gaussian distribution formula is as follows:
[0076]
[0077] Where G(x, y) is the coordinate of the Gaussian kernel, and σ is the standard deviation of the Gaussian kernel;
[0078] S12: For each pixel (x, y) in the image, multiply the Gaussian kernel with the pixels in the surrounding area of each pixel (x, y) in the image to obtain a product value, and add the product values to obtain the pixel value I after Gaussian filtering. smooth (x, y), the Gaussian filter formula is as follows:
[0079]
[0080] Among them, I(x+i, y+j) represents the pixel value in the neighborhood of the image, x and y represent the coordinate center value, G(i, j) represents the weight of the Gaussian kernel at the coordinate (i, j), i and j represent the weight value, and k is the radius of the field;
[0081] S13: Use median filtering to further process the residual noise of the image after Gaussian filtering. The median filtering formula is as follows:
[0082] I smooth (x, y)=MedianI (x+i, y+j): -k≤i, j≤k
[0083] Wherein, MedianI(x+i, y+j) means removing the median of the pixel values in the region of the image;
[0084] S14: Scale the filtered image to a uniform size of 512×512.
[0085] S2: Build a network model with a 50-layer U-Net network and a ResNet50 residual network as the main network structure.
[0086] In S2, the ResNet50 residual network includes four residual structures, each of which includes a different number of residual blocks, and each of which includes three layers of convolution;
[0087] The residual blocks of the same type are connected in sequence, and the number of convolution kernels of the first convolution layer of each residual structure is fixed to 64, 128, 256, and 512.
[0088] S3: Randomly divide the preprocessed material images and mother liquid images into a training set and a test set respectively, perform data amplification on the material image training set and the mother liquid image training set, and then input them into the network model for training, and obtain multiple trained network models according to each training set.
[0089] Specifically, in S3, 80% of the material images and mother liquid images are training sets, and the remaining 20% are test sets. The method of performing data enhancement on the training sets is: randomly flipping, affine transforming and cropping the images of the training sets to obtain the training set data after quantity expansion, and standardizing all the data to obtain the training set after data expansion.
[0090] Furthermore, in S3, the specific method of inputting the data-enhanced training set into the ResNet-Unet network model for training is:
[0091] Each network parameter is initialized by random initialization, and the Adam gradient descent method is used to optimize the joint loss function combining DiceLoss and FocalLoss. The calculation method of the joint loss function is as follows:
[0092] L=λ*L1-logL2
[0093] Among them, L represents the joint loss function value of DiceLoss and FocalLoss between the mask predicted by the U-Net network and the real mask of the training sample set, λ represents the weight factor, L1 represents the FocalLoss loss function value, and L2 represents the DiceLoss loss function value;
[0094] The FocalLoss loss function value is calculated as follows:
[0095]
[0096] Among them, L1 represents the FocalLoss loss function value, α represents the parameter adjustment factor, γ represents the parameter adjustment factor, p represents the binary mask image output by the U-Net network, and t represents the manually annotated mask image;
[0097] The DiceLoss loss function value is obtained by the following formula:
[0098]
[0099] Among them, L2 represents the DiceLoss loss function value.
[0100] S4: Input the material image test set and the mother liquid image test set into the multiple trained network models, and select the optimal network model with the highest pixel accuracy and the optimal intersection-to-union ratio value according to the test set evaluation index obtained by each trained network model.
[0101] Specifically, in S4, the pixel accuracy is represented by PA, which is calculated as follows:
[0102]
[0103] The intersection-over-union ratio represents IOU, which is calculated as follows:
[0104]
[0105] Among them, TP represents the total number of training samples that predict the positive class as the positive class, FN represents the total number of training samples that predict the positive class as the negative class, FP represents the total number of training samples that predict the negative class as the positive class, and TN represents the total number of training samples that predict the negative class as the negative class.
[0106] S5: Inputting the material image and the mother liquid image collected in real time into the optimal network model to obtain data on material thickness, material color, mother liquid flow rate, and mother liquid color.
[0107] S6: Use the frequency domain analysis method to perform a fuzzy state analysis on the material image and the mother liquid image input in S5, and determine whether the image is in a fuzzy state based on the image spectrum. If the image is determined to be in a fuzzy state, a mirror cleaning operation is required; otherwise, it is determined that the image is not in a fuzzy state and no mirror cleaning operation is required.
[0108] In S6, the specific steps of using the frequency domain analysis method to determine whether the centrifuge image is in a blurred state are as follows:
[0109] S61: The image is converted from the spatial domain to the frequency domain through Fourier transform, and the image is decomposed into sine and cosine components of different frequencies, expressed in complex form. The Fourier transform formula is expressed as follows:
[0110]
[0111] Wherein, (u, v) represents the coordinate in the frequency domain, F(u, v) represents the value at the coordinate, (x, y) represents the coordinate in the space domain, f(x, y) represents the value at the coordinate, and j is an imaginary unit;
[0112] S62: using the amplitude spectrum of the frequency spectrum to judge the blur degree of the image, by calculating the modulus of the Fourier transform result F(u, v), obtaining the amplitude spectrum S(u, v) of the frequency spectrum;
[0113] S63: Calculate the center position of the amplitude spectrum of the frequency spectrum to obtain the center frequency of the frequency spectrum, which is used to further determine the blur degree of the image. The center frequency is calculated as follows:
[0114]
[0115]
[0116] Among them, u center and v center Respectively represent the center frequency of the coordinate value;
[0117] S64: an index representing the degree of image blur is obtained through S61-S63, and the index is used to determine whether the centrifuge needs to be flushed to clean the two cameras for collecting data.
[0118] The present invention trains the existing network model by collecting images of materials and mother liquor separation in the centrifuge, and obtains a network model that matches the optimal values of centrifuge material and mother liquor separation conditions. The present invention can derive the centrifuge material thickness and mother liquor width conditions with high accuracy based on the collected images, thereby improving the intelligence of the centrifuge, reducing labor, and improving production efficiency.
[0119] The present invention can also determine whether the collected image is blurred. When blurry, the graphic workstation will implement interlocking control with the PLC to trigger the mirror cleaning device to prevent materials from splashing onto the camera during the feeding process or causing fog on the camera mirror due to the feeding of some hot materials, thereby ensuring the quality of the collected image.
[0120] Embodiment 2
[0121] like Figures 2 to 4 As shown, a centrifuge automatic control system based on machine vision, using the centrifuge automatic control method based on machine vision as described above, is characterized in that it includes two cameras connected to the centrifuge, an optical fiber switch, a graphics workstation and a PLC, and is characterized in that:
[0122] The two cameras are respectively installed in the centrifuge sight glass hole and the drain pipe, and are used to collect the material image input into the centrifuge and the mother liquid image output, and input the collected images to the image workstation and the PLC through the optical fiber switch. Figure 3 The numbers in the figure represent respectively: 1. shell; 2. feed pipe; 3. drum; 4. drain hole; 5. motor; 6. shaft; 7. chamber; 8. liquid outlet; 9. camera; 10. computer; 11. retaining ring; 12. camera.
[0123] The optical fiber switch is used for the transmission of network data. The optical fiber switch is a high-speed network transmission relay device. The optical signal is input into the optical fiber through the transmitter and transmitted through the internal total reflection, maintaining the invariance of the optical signal intensity and phase characteristics, ensuring the integrity and accuracy of the signal.
[0124] The graphic workstation includes an image acquisition module, an image processing and recognition module, and a logic control module. The image acquisition module is used to receive transmitted image information. The image processing and recognition module is used to run a network model to identify and analyze the color of the collected material image and mother liquid image. The logic control module is used to perform chain control on the analysis data obtained after processing. The graphic workstation is an image analysis device with powerful processing capabilities, a high-speed graphics processor (GPU), and large-capacity memory and storage space.
[0125] The PLC is connected to the image workstation for data processing and control. The PLC is an electronic device for digital computing operations. It executes logic, sequence, timing, counting and arithmetic operations by programming and has digital or analog input and output capabilities.
[0126] The video of the material and mother liquid inside the centrifuge is transmitted to the graphic workstation through the on-site camera, and the video is analyzed through the intelligent algorithm to calculate the material layer thickness, material color, and mother liquid flow data. These data are transmitted to the PLC control system through the MODBUS-TCP protocol, and the centrifuge feeding, cleaning, and dehydration processes are accurately controlled through PLC linkage control.
[0127] Embodiment 3
[0128] like Figure 4 As shown, a centrifuge automatic control system based on machine vision uses the centrifuge automatic control method based on machine vision as described above, characterized in that the graphics workstation is used to run a network model to identify and color analyze the collected material images and mother liquor images. The graphics workstation is an image analysis device with powerful processing capabilities, a high-speed graphics processor (GPU) and a large capacity of memory and storage space.
[0129] The graphic workstation can perform image processing and analysis on multiple centrifuges (usually 8 centrifuges), transmit image data to the switch through communication with the PLC, and realize remote monitoring and operation of multiple centrifuges, saving a lot of manpower. Moreover, compared with managing each centrifuge individually, centralized management of multiple centrifuges can also improve overall efficiency and coordination.
Claims
1. A centrifuge automatic control method based on machine vision, characterized in that: The steps include: S1: Preprocessing the collected material image and mother liquid image using a double filtering method to reduce the interference caused by fine features in the image, and obtaining the preprocessed material image and mother liquid image; S2: Build a 50-layer U-Net network and use the ResNet50 residual network as the main network structure; S3: Randomly divide the preprocessed material images and mother liquid images into a training set and a test set respectively, perform data amplification on the material image training set and the mother liquid image training set, and then input them into the network model for training, and obtain multiple trained network models according to each training set; S4: inputting the material image test set and the mother liquid image test set into the multiple trained network models, and selecting the optimal network model with the highest pixel accuracy and the optimal intersection-over-union ratio according to the test set evaluation index obtained by each trained network model; S5: inputting the material image and the mother liquid image collected in real time into the optimal network model to obtain material thickness, material color, mother liquid flow rate, and mother liquid color data; S6: Use the frequency domain analysis method to perform a fuzzy state analysis on the material image and the mother liquid image input in S5, and determine whether the image is in a fuzzy state based on the image spectrum. If the image is determined to be in a fuzzy state, a mirror cleaning operation is required; otherwise, it is determined that the image is not in a fuzzy state and no mirror cleaning operation is required.
2. The centrifuge automatic control method based on machine vision according to claim 1, characterized in that: In S1, the material images collected are specifically at least 10,000 material images with an original resolution of 1920×960, of which at least 2 / 3 of the images are images of the feed through the centrifuge sight glass hole; and the mother liquor images collected, of which at least 1 / 3 of the images are images of the centrifuge drain pipe without mother liquor.
3. The centrifuge automatic control method based on machine vision according to claim 2, characterized in that: In S1, the double filtering method is specifically Gaussian blur and median filtering. The specific steps of using the double filtering method to preprocess the image are as follows: S11: Use Gaussian blur to perform denoising on the collected image. First, a Gaussian kernel is defined according to the Gaussian distribution formula. The Gaussian distribution formula is as follows: Where G(x, y) is the coordinate of the Gaussian kernel, and σ is the standard deviation of the Gaussian kernel; S12: For each pixel (x, y) in the image, multiply the Gaussian kernel with the pixels in the surrounding area of each pixel (x, y) in the image to obtain a product value, and add the product values to obtain the pixel value I after Gaussian filtering. smooth (x, y), the Gaussian filter formula is as follows: Among them, I(x+i, y+j) represents the pixel value in the neighborhood of the image, x and y represent the coordinate center value, G(i, j) represents the weight of the Gaussian kernel at the coordinate (i, j), i and j represent the weight value, and k is the radius of the field; S13: Use median filtering to further process the residual noise of the Gaussian filtered image. The median filtering formula is as follows: Yo smooth (x,y)=MedianI(x+i,y+j):-k≤i,j≤k Wherein, MedianI(x+i, y+j) means removing the median of the pixel values in the region of the image; S14: Scale the filtered image to a uniform size of 512×512.
4. The centrifuge automatic control method based on machine vision according to claim 1, characterized in that: In S2, the ResNet50 residual network includes four residual structures, each of which includes a different number of residual blocks, and each of which includes three layers of convolution; The residual blocks of the same type are connected in sequence, and the number of convolution kernels of the first convolution layer of each residual structure is fixed to 64, 128, 256, and 512.
5. The centrifuge automatic control method based on machine vision according to claim 1, characterized in that: In S3, 80% of the material images and mother liquid images are training sets, and the remaining 20% are test sets. The method of data enhancement for the training set is: randomly flipping, affine transforming and cropping the images of the training set to obtain the training set data after quantity expansion, and standardizing all the data to obtain the training set after data expansion.
6. The centrifuge automatic control method based on machine vision according to claim 5, characterized in that: In S3, the specific method of inputting the data-enhanced training set into the ResNet-Unet network model for training is: Each network parameter is initialized by random initialization, and the Adam gradient descent method is used to optimize the joint loss function combining DiceLoss and FocalLoss. The calculation method of the joint loss function is as follows: L=λ*L1-logL2 Among them, L represents the joint loss function value of DiceLoss and FocalLoss between the mask predicted by the U-Net network and the real mask of the training sample set, λ represents the weight factor, L1 represents the FocalLoss loss function value, and L2 represents the DiceLoss loss function value; The FocalLoss loss function value is calculated as follows: Among them, L1 represents the FocalLoss loss function value, α represents the parameter adjustment factor, γ represents the parameter adjustment factor, p represents the binary mask image output by the U-Net network, and t represents the manually annotated mask image; The DiceLoss loss function value is obtained by the following formula: Among them, L2 represents the DiceLoss loss function value.
7. The centrifuge automatic control method based on machine vision according to claim 1, characterized in that: In S4, the pixel accuracy is represented by PA, which is calculated as follows: The intersection-over-union ratio represents IOU, which is calculated as follows: Among them, TP represents the total number of training samples that predict the positive class as the positive class, FN represents the total number of training samples that predict the positive class as the negative class, FP represents the total number of training samples that predict the negative class as the positive class, and TN represents the total number of training samples that predict the negative class as the negative class.
8. The centrifuge automatic control method based on machine vision according to claim 1, characterized in that: In S6, the specific steps of using the frequency domain analysis method to determine whether the centrifuge image is in a blurred state are as follows: S61: The image is converted from the spatial domain to the frequency domain through Fourier transform, and the image is decomposed into sine and cosine components of different frequencies, expressed in complex form. The Fourier transform formula is expressed as follows: F(u,v)=∫∫f(x,y)·e -j2π(ux+uy) dxdy Wherein, (u, v) represents the coordinate in the frequency domain, F(u, v) represents the value at the coordinate, (x, y) represents the coordinate in the space domain, f(x, y) represents the value at the coordinate, and j is an imaginary unit; S62: using the amplitude spectrum of the frequency spectrum to judge the blur degree of the image, by calculating the modulus of the Fourier transform result F(u, v), obtaining the amplitude spectrum S(u, v) of the frequency spectrum; S63: Calculate the center position of the amplitude spectrum of the frequency spectrum to obtain the center frequency of the frequency spectrum, which is used to further determine the blur degree of the image. The center frequency is calculated as follows: Among them, u center and v center Respectively represent the center frequency of the coordinate value; S64: an index representing the degree of image blur is obtained through S61-S63, and the index is used to determine whether the centrifuge needs to be flushed.
9. A centrifuge automatic control system based on machine vision, using the centrifuge automatic control method based on machine vision as claimed in any one of claims 1 to 8, characterized in that: It includes two cameras connected to the centrifuge, a fiber optic switch, a graphics workstation and a PLC, and is characterized by: The two cameras are respectively installed at the centrifuge sight glass hole and the drain pipe, and are used to collect the material image input into the centrifuge and the mother liquid image output, and input the collected images to the graphic workstation and the PLC through the optical fiber switch. The optical fiber switch is used for the transmission of network data. The graphic workstation includes an image acquisition module, an image processing and recognition module, and a logic control module. The image acquisition module is used to receive transmitted image information. The image processing and recognition module is used to run a network model to identify and analyze the color of the collected material images and mother liquid images. The logic control module is used to perform chain control on the analysis data obtained after processing. The PLC is data-connected to the image workstation and is used for data processing and control.
Citation Information
Patent Citations
Blood processing apparatus with robust automated process control
CN101501472A
Interface detector for blood processing system
CN106377813A
Centrifuge networked control system
CN107505919A
Methods and apparatus for multi-view characterization
CN108738336A
A centrifuge and control system thereof
GB201307386D0
