Search

CN-115995061-B - Blood collection tube aluminum foil cap state identification method, device, equipment and medium

CN115995061BCN 115995061 BCN115995061 BCN 115995061BCN-115995061-B

Abstract

The application discloses a method, a device, equipment and a medium for recognizing the state of an aluminum foil cap of a blood collection tube, and relates to the technical field of image recognition. The method comprises the steps of monitoring the position of a blood collection tube, collecting an original image of the blood collection tube when the position of the blood collection tube reaches a target detection position, processing the original image by using a preset machine vision algorithm to obtain a first tube opening aluminum foil cap image of the blood collection tube, normalizing the first tube opening aluminum foil cap image, and inputting the normalized first tube opening aluminum foil cap image into a pre-constructed lightweight deep learning classification network model so as to determine the aluminum foil cap state of the blood collection tube by using an identification result output by the lightweight deep learning classification network model. By the technical scheme, the accuracy of state identification of the aluminum foil cap of the blood collection tube can be effectively improved.

Inventors

  • HOU JIANPING
  • ZHAO WANLI
  • WANG CHAO
  • Sun Qianpeng
  • WANG CHI
  • DUAN YIRUI
  • Tong Jianan
  • LI HUABIN
  • LIU CONG

Assignees

  • 郑州安图生物工程股份有限公司
  • 安图实验仪器(郑州)有限公司

Dates

Publication Date
20260512
Application Date
20230227

Claims (11)

  1. 1. The method for identifying the state of the aluminum foil cap of the blood collection tube is characterized by comprising the following steps of: monitoring the position of a blood collection tube, and collecting an original image of the blood collection tube when the position of the blood collection tube reaches a target detection position; The method comprises the steps of obtaining an original image of a first tube orifice aluminum foil cap of a blood collection tube by utilizing a preset machine vision algorithm, wherein the preset machine vision algorithm comprises the steps of carrying out color conversion and filtering on the original image, sequentially adopting first preset processing to obtain a first region-of-interest image of the blood collection tube, cutting according to the preset aluminum foil cap height to obtain a second region-of-interest image of the aluminum foil cap of the blood collection tube, and cutting according to the second region-of-interest image to obtain the first tube orifice aluminum foil cap image, wherein the first preset processing sequentially comprises edge detection based on a preset low threshold value, contour extraction and determination of a minimum external rectangle; And carrying out normalization processing on the first pipe orifice aluminum foil cap image, and then inputting the normalized first pipe orifice aluminum foil cap image into a pre-constructed lightweight deep learning classification network model so as to determine the aluminum foil cap state of the blood collection pipe by utilizing the recognition result output by the lightweight deep learning classification network model.
  2. 2. The method for recognizing the state of an aluminum foil cap of a blood collection tube according to claim 1, wherein the monitoring the position of the blood collection tube and before the capturing of the original image of the blood collection tube when the position of the blood collection tube reaches a target detection position, further comprises: and loading a model file of the lightweight deep learning classification network model.
  3. 3. The method for recognizing the state of the aluminum foil cap of the blood collection tube according to claim 2, wherein the obtaining the model file comprises: Obtaining a plurality of aluminum foil cap samples containing blood sampling tubes of different types, wherein the aluminum foil cap samples comprise undeveloped samples of the aluminum foil caps, failure film removal samples of the aluminum foil caps and success film removal samples of the aluminum foil caps; Collecting a sample image of the aluminum foil cap sample by using an industrial camera, processing the sample image by using the preset machine vision algorithm according to the sample image, and determining a second pipe orifice aluminum foil cap image corresponding to the aluminum foil cap sample to obtain a model training set; Training the lightweight deep learning classification network model by using the model training set, dynamically adjusting the learning rate of the lightweight deep learning classification network model in the training process, so that after iterative training for preset times, determining the current optimal model parameters of the lightweight deep learning classification network model by using the current learning rate, and then determining the model file of the lightweight deep learning classification network model according to the optimal model parameters.
  4. 4. The method for recognizing the state of the aluminum foil cap of the blood collection tube according to claim 1, wherein the processing the original image by using a preset machine vision algorithm to obtain the image of the aluminum foil cap of the first tube opening of the blood collection tube comprises the following steps: Performing color conversion on the original image to convert an RGB color image corresponding to the original image into a gray image; carrying out space domain Gaussian filtering and/or median filtering on the gray level image, and then carrying out first preset processing on the filtered image to obtain a first region-of-interest image of the blood collection tube; Cutting the filtered image according to the first region of interest image and the preset height of the aluminum foil cap to obtain an aluminum foil cap region image of the orifice of the blood collection tube; Performing second preset processing on the aluminum foil cap area image to obtain a second interested area image of the aluminum foil cap; And cutting the aluminum foil cap region image according to the second region of interest image to obtain a first pipe orifice aluminum foil cap image of the blood collection pipe.
  5. 5. The method for recognizing the state of an aluminum foil cap of a blood collection tube according to claim 4, wherein the performing a first preset process on the filtered image to obtain a first region of interest image of the blood collection tube comprises: Processing the filtered image by using a first edge detection algorithm constructed based on a preset low threshold value to obtain an edge binarization image of the blood collection tube; Processing the edge binarization image of the blood collection tube by using a first contour extraction algorithm to obtain a first outer contour point set corresponding to the edge binarization image of the blood collection tube; And determining the minimum circumscribed rectangle of the first outline point set to obtain a first region-of-interest image of the blood collection tube.
  6. 6. The method for recognizing the state of the aluminum foil cap of the blood collection tube according to claim 4, wherein the performing a second preset process on the image of the aluminum foil cap region to obtain a second image of the region of interest of the aluminum foil cap comprises: Processing the aluminum foil cap area image by using a second edge detection algorithm constructed based on a preset high threshold value to obtain an edge binarization image of the aluminum foil cap; processing the edge binarization image of the aluminum foil cap by using a second contour extraction algorithm to obtain a second outer contour point set corresponding to the edge binarization image of the aluminum foil cap; And determining the minimum circumscribed rectangle of the second outline point set to obtain a second region of interest image of the aluminum foil cap.
  7. 7. The method for identifying the state of the aluminum foil cap of the blood collection tube according to claim 1, wherein the step of inputting the normalized first tube orifice aluminum foil cap image into a pre-constructed lightweight deep learning classification network model so as to determine the state of the aluminum foil cap of the blood collection tube by using the identification result output by the lightweight deep learning classification network model comprises the steps of: inputting the normalized first pipe orifice aluminum foil cap image into a pre-constructed lightweight deep learning classification network model, and determining an identification result output by the lightweight deep learning classification network model; if the score value of the identification result is not smaller than a first preset threshold value, determining a first classification type corresponding to the current identification result as an aluminum foil cap state of the blood collection tube; If the score value of the recognition result is smaller than the first preset threshold value and the recognition frequency of the lightweight deep learning classification network model is equal to a second preset threshold value, determining a corresponding second classification type according to a primary recognition result corresponding to the highest score value, and then determining the second classification type as an aluminum foil cap state of the blood collection tube; and if the score value of the recognition result is smaller than the first preset threshold value and the recognition times of the lightweight deep learning classification network model is smaller than the second preset threshold value, re-executing the step of processing the original image by using a preset machine vision algorithm to obtain a first pipe orifice aluminum foil cap image of the blood collection pipe.
  8. 8. The method for recognizing the state of the aluminum foil cap of the blood collection tube according to any one of claims 1 to 7, wherein constructing the lightweight deep learning classification network model comprises: The method comprises the steps of establishing a network structure of a lightweight deep learning classification network model, wherein the network structure comprises an input part, a main branch part, a side branch part and a classifier, the input part comprises a convolution layer and a maximum pooling layer which are sequentially connected, the convolution layer is transmitted to the maximum pooling layer after being processed by a preset activation function, the main branch part is a main path part in the network structure and comprises a first group of convolution layers, a second group of convolution layers and a third group of convolution layers, the first group of convolution layers, the second group of convolution layers and the third group of convolution layers are connected through the preset activation function, each of the first group of convolution layers, the second group of convolution layers and the third group of convolution layers comprises a plurality of main line convolution layers and branch line convolution layers which are connected with each other, and the side branch line part is a branch path part extending from the input part and the main branch line part in the network structure; and setting basic parameters of each part in the network structure to obtain the lightweight deep learning classification network model.
  9. 9. The utility model provides a heparin tube aluminium foil cap state recognition device which characterized in that includes: the blood collection tube position monitoring module is used for monitoring the position of the blood collection tube and collecting an original image of the blood collection tube when the position of the blood collection tube reaches a target detection position; The machine vision algorithm processing module is used for processing the original image by utilizing a preset machine vision algorithm to obtain a first pipe orifice aluminum foil cap image of the blood collection pipe, wherein the preset machine vision algorithm comprises the steps of carrying out color conversion and filtering on the original image, sequentially adopting first preset processing to obtain a first region of interest image of the blood collection pipe, cutting according to the preset aluminum foil cap height to obtain a second region of interest image of the aluminum foil cap, and cutting according to the second region of interest image to obtain the first pipe orifice aluminum foil cap image, wherein the first preset processing sequentially comprises edge detection based on a preset low threshold value, contour extraction and determination of a minimum external rectangle; The model processing module is used for carrying out normalization processing on the first pipe orifice aluminum foil cap image, and then inputting the normalized first pipe orifice aluminum foil cap image into a pre-constructed lightweight deep learning classification network model so as to determine the aluminum foil cap state of the blood collection pipe by utilizing the recognition result output by the lightweight deep learning classification network model.
  10. 10. An electronic device comprising a processor and a memory, wherein the memory is configured to store a computer program that is loaded and executed by the processor to implement the blood collection tube aluminum foil cap state identification method of any one of claims 1 to 8.
  11. 11. A computer readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the method for identifying the status of a blood collection tube aluminum foil cap according to any one of claims 1 to 8.

Description

Blood collection tube aluminum foil cap state identification method, device, equipment and medium Technical Field The invention relates to the technical field of image recognition, in particular to a method, a device, equipment and a medium for recognizing the state of an aluminum foil cap of a blood collection tube. Background In the running process of the medical detection assembly line, a part of blood samples of the blood sampling tube need to be subjected to multiple biochemical immunity and blood analysis detection in a time period, and the other part of blood samples of the blood sampling tube need to be subjected to sample retention so as to be subjected to subsequent retest. In general, a refrigerator is configured on a medical detection assembly line for storing blood samples of blood collection tubes at low temperature, the aluminum foil cap of the blood collection tubes needs to be removed from the refrigerator before the next detection after the blood samples of the blood collection tubes are taken out of the refrigerator, and a film removing device is configured beside the refrigerator for removing films of the aluminum foil cap. Taking out the aluminum foil cap of the blood collection tube from the refrigerator to remove the film can cause the risk of firing pins of various subsequent detection devices, and the operation safety of the detection devices and the biological safety of operators are seriously influenced, so that the film opening device needs to accurately identify the film removing state of the aluminum foil cap, and the aluminum foil cap state identification of the blood collection tube has very important application in a medical detection assembly line. Currently, in the process of detecting the state of an aluminum foil cap of a blood collection tube, one of the technologies is a technology for identifying the state of the aluminum foil cap of the blood collection tube based on ultrasonic detection, and the technology uses an ultrasonic detection principle to detect the state of the aluminum foil cap of the blood collection tube. However, the technology can only simply judge the state of the aluminum foil cap of the blood collection tube, can only judge whether the aluminum foil cap exists by detecting whether ultrasonic waves are blocked at the mouth of the blood collection tube, and cannot accurately identify the state of the aluminum foil cap of the blood collection tube for blood collection tube samples with unclean film removal of the aluminum foil cap, so that the identification accuracy is lower. Another is a blood collection tube aluminum foil cap state recognition technology based on traditional machine vision detection, which uses a template matching method in traditional machine vision to detect the state of the blood collection tube aluminum foil cap. However, the state of the aluminum foil cap of the blood collection tube with a specific model can only be identified by using the template matching technology, and the identification accuracy is lower due to the fact that the state of the aluminum foil cap of the blood collection tube is quite complex, the film removal is not clean and the interference of a liquid sample of the blood collection tube Guan Bigua is caused. In summary, how to improve the accuracy of identifying the state of the aluminum foil cap of the blood collection tube is a problem to be solved at present. Disclosure of Invention In view of the above, the present invention aims to provide a method, a device, an apparatus and a medium for recognizing the state of an aluminum foil cap of a blood collection tube, which can improve the accuracy of recognizing the state of the aluminum foil cap of the blood collection tube. The specific scheme is as follows: In a first aspect, the application discloses a method for identifying the state of an aluminum foil cap of a blood collection tube, which comprises the following steps: monitoring the position of a blood collection tube, and collecting an original image of the blood collection tube when the position of the blood collection tube reaches a target detection position; processing the original image by using a preset machine vision algorithm to obtain a first pipe orifice aluminum foil cap image of the blood collection pipe; And carrying out normalization processing on the first pipe orifice aluminum foil cap image, and then inputting the normalized first pipe orifice aluminum foil cap image into a pre-constructed lightweight deep learning classification network model so as to determine the aluminum foil cap state of the blood collection pipe by utilizing the recognition result output by the lightweight deep learning classification network model. Optionally, the monitoring the position of the blood collection tube, before collecting the original image of the blood collection tube when the position of the blood collection tube reaches the target detection position, further includes: and loading a model file