| The production of medical liquids is related to national security,social stability,and people’s health,and it is one of the priorities of my country’s strategic development.Medical liquid quality and safety testing is the last process in the production of liquid medicines,and the country,enterprises and consumers attach great importance to it.However,the detection of visible foreign body in medicine liquid has always been a difficult point in the industry.In the past,at home and abroad production companies mainly relied on professional human visual inspectors to complete this task.In this way,industry pain points such as low work efficiency,high labor costs,and poor adaptability have become increasingly prominent.In recent years,computer vision detection algorithms relying on deep learning have been rapidly developed.The paper is based on the object detection algorithm of deep learning,and combined with the object tracking algorithm to realize visible foreign body recognition of medical solutions.In response to the problem of image noise interference,a method of detecting and tracking the fusion of the object motion trajectory is proposed.Build a feature vector according to the center coordinates of the object trajectory,and achieve the object accurate classification with an improved semi-naive Bayes classification model.First of all,the thesis briefly describes the social background and significance of foreign body detection in liquid medicine,introduces the current research status of liquid medicine moving foreign body based on machine vision,and analyzes the difficulty of using machine vision to detect moving foreign bodies in liquid medicine,and introduce the current research status of the existing liquid medicine foreign body detection algorithm.Secondly,according to the source and characteristics of the liquid foreign body and the complex background environment of random noise interference,the auxiliary means of facilitating visual detection is summarized,and briefly describes the specific operation process of the automatic lamp inspection equipment.Collecting and constructing a data set for the detection of foreign objects in liquid medicines,and finally,for the complex characteristics of weak liquid medicine moving foreign bodies.A detection-tracking-recognition algorithm based on neural network is proposed.Thirdly,the structure function and development application of convolutional neural network are introduced.The advantages and disadvantages and implementation process of the three object detection algorithms based on convolutional neural network are briefly described,and the emphasis is on the principle and structure based on Faster R-CNN network,and the detection model of foreign body in medical liquid medicine is established.Aiming at the problem of the poor performance of the deep learning object detection algorithm in direct detection of foreign bodies,it is proposed to remove the network’s own classification and use the object trajectory results after tracking to perform classification.According to the data characteristics,optimize the hyperparameters,and modify the aspect ratio and size of the anchor in the RPN network.After experimental comparison,an object detection network model with higher accuracy rate and improved recall rate is selected,and the suspected foreign body object is predicted from the first frame of the sequence image.After that,it describes the tracking of suspected foreign objects by correlation filtering algorithms,and performs multi-target simultaneous tracking and performance optimization to improve speed,and proposes optical flow characteristics to evaluate abnormal objects to reduce classification errors.Subsequently,it introduces the construction of trajectory feature vectors,proposes a semi-naive Bayes classification algorithm based on trajectory characteristics for small samples of discrete data,introduces its specific process and then proves it through experiments compare the performance of the proposed semi-naive Bayes classification algorithm and the SVM classifier.Finally,after comprehensively analyzing the overall performance of the detection-trackingrecognition liquid medicine foreign body detection algorithm,and compared with the foreign body detection algorithm in other documents.The results show that the proposed method of detecting the suspected foreign object first,then tracking the trajectory,and finally classifying according to the trajectory characteristics guarantees a higher accuracy rate,and the detection efficiency is greatly improved.It proves that the research method described in the thesis can be effectively applied to the automatic detection of foreign bodies in the liquid medicine. |