CN115861688A - Drug packaging and container appearance modeling identification and counting method and system - Google Patents

Drug packaging and container appearance modeling identification and counting method and system Download PDF

Info

Publication number
CN115861688A
CN115861688A CN202211466269.XA CN202211466269A CN115861688A CN 115861688 A CN115861688 A CN 115861688A CN 202211466269 A CN202211466269 A CN 202211466269A CN 115861688 A CN115861688 A CN 115861688A
Authority
CN
China
Prior art keywords
model
identification
recognition
toxic
anesthetic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211466269.XA
Other languages
Chinese (zh)
Other versions
CN115861688B (en
Inventor
范隆
王天龙
刘丰源
冯雪辛
张雨辰
李勍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Geriatrics Medical Research Center
Xuanwu Hospital
Original Assignee
Beijing Geriatrics Medical Research Center
Xuanwu Hospital
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Geriatrics Medical Research Center, Xuanwu Hospital filed Critical Beijing Geriatrics Medical Research Center
Priority to CN202211466269.XA priority Critical patent/CN115861688B/en
Publication of CN115861688A publication Critical patent/CN115861688A/en
Application granted granted Critical
Publication of CN115861688B publication Critical patent/CN115861688B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02WCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO WASTEWATER TREATMENT OR WASTE MANAGEMENT
    • Y02W90/00Enabling technologies or technologies with a potential or indirect contribution to greenhouse gas [GHG] emissions mitigation

Landscapes

  • Medical Preparation Storing Or Oral Administration Devices (AREA)

Abstract

The invention discloses a method and a system for modeling, identifying and counting the shapes of medicine packages and containers, wherein the method comprises the following steps: the method comprises the steps of collecting packaging container shape image data of N toxic and anesthetic drugs in a preset image collection mode, setting an identification mode of the packaging container image of the toxic and anesthetic drugs, learning and modeling the packaging container shape image data of the N toxic and anesthetic drugs through a YOLOv5 machine learning algorithm based on the identification mode, obtaining an identification model, and loading the identification model into a terminal application program to perform batch identification, counting and recovery on the toxic and anesthetic drugs. The image data of the toxic and anesthetic glass containers and the recognition modes set for the image data are utilized to carry out recognition, learning and modeling on the image data by utilizing a machine learning algorithm so as to obtain recognition models to automatically carry out recognition technology recovery on the toxic and anesthetic glass containers in batches, so that the recovery efficiency is improved, and the time cost is greatly saved.

Description

Drug packaging and container appearance modeling identification and counting method and system
Technical Field
The invention relates to the technical field of information processing, in particular to a method and a system for modeling, identifying and counting the shapes of medicine packages and containers.
Background
The anesthesia medicine is the management and control medicine, and manual management wastes time and energy, and intelligent medicine cabinet management is the trend, but the accurate recovery of empty container is the key link, needs discernment container type, figure, and empty container is put in at fixed point, concentrates and takes out the scheduling problem, and the main method of discerning the recovery container at present is container subsides OCR sign indicating number recognition method, and above-mentioned method can only be applicable to the single recovery of container, influences peak period work efficiency, need handle alone, can not wide application in clinical work, has reduced recovery efficiency.
Disclosure of Invention
In view of the above-mentioned problems, the present invention provides a method and a system for modeling, identifying and counting the shapes of pharmaceutical packaging and containers, which are used to solve the problems that the conventional techniques mentioned in the background art are only suitable for single recycling of containers, which affects the work efficiency during peak medication periods, requires separate processing, cannot be widely applied to clinical work, and reduces the recycling efficiency.
A method for modeling, identifying and counting pharmaceutical product packaging and container profiles, comprising the steps of:
collecting the appearance image data of the packaging container of N toxic anesthetic drugs in a preset image collection mode;
setting an identification mode of an image of a packaging container for toxic and anesthetic drugs;
learning and modeling the packaging container shape image data of the N narcotic drugs by a YOLOv5 machine learning algorithm based on the identification mode to obtain an identification model;
and loading the identification model into a terminal application program to carry out batch identification, counting and recovery on the narcotic drugs.
Preferably, the data of the shape image of the packaging container for collecting the N narcotic drugs by the preset image collecting mode includes:
setting image acquisition conditions according to the preset image acquisition mode, wherein the image acquisition conditions comprise: lighting conditions and ground conditions;
setting a shooting angle and a focal length parameter of a camera according to the image acquisition condition;
detecting the arrangement condition of the packaging containers of the toxic and anesthetic drugs in a preset arrangement sequence;
and judging whether the requirement of image acquisition is met according to the arrangement condition, if so, controlling a camera in a preset image acquisition mode to acquire the image data of the appearance of the packaging container of the N toxic anesthetic drugs according to set parameters.
Preferably, the setting of the identification mode of the image of the packaging container for the toxic and anesthetic drugs includes:
acquiring bottleneck parameters and visual parameters of a toxic and anesthetic drug packaging container and state parameters of solution or powder inside the container;
acquiring a label pattern identification parameter and a shape identification parameter of a toxic and anesthetic packaging container according to the visual parameter, acquiring an empty bottle identification parameter of the toxic and anesthetic according to a state parameter of solution or powder in the container, and acquiring a use state identification parameter of the toxic and anesthetic according to the bottleneck parameter;
determining a plurality of display states of the packaging container of the toxic and anesthetic drugs based on all the identification parameters;
and constructing an identification rule corresponding to each display state and generating an identification mode corresponding to the display state.
Preferably, before learning and modeling the image data of the outer shape of the packaging container of the N narcotic drugs by a YOLOv5 machine learning algorithm based on the recognition model and obtaining the recognition model, the method further includes:
obtaining model parameters of a preset YOLOv4 machine learning model;
screening out a model input end parameter, a reference network parameter, a Neck network parameter and a Head output layer parameter from the model parameters;
optimizing the input end parameters, the reference network parameters, the Neck network parameters and the Head output layer parameters of the model;
and acquiring a YOLOv5 machine learning algorithm according to the optimized YOLOv4 machine learning model.
Preferably, the learning and modeling the image data of the outer shape of the packaging container of the N narcotic drugs by a YOLOv5 machine learning algorithm based on the recognition model to obtain the recognition model includes:
dividing the N packaging container appearance images of the toxic and anesthetic drugs into M training images and N-M verification images, and respectively generating a data training set and a data verification set;
dividing the M training images into a plurality of training data sets according to the preset data bearing quantity of each training set, and setting the maximum quantity, the super-parameters and the resolution of single batch processing data of the training data sets;
writing a YOLOv5 machine learning algorithm and a recognition mode into a preset neural network model, and performing recognition training for six times on training images in a plurality of training data sets by using the preset neural network model;
and performing error analysis on output data of the preset neural network model after six times of training, determining whether the training model is qualified according to an analysis result, and if so, determining the training model as the recognition model.
Preferably, the loading the identification model into a terminal application program to perform batch identification, counting and recycling on the narcotic drugs includes:
coding the identification model to obtain a coding result, and writing the coding result into the terminal application program to generate a narcotic drug identification program;
collecting target images of the toxic and anesthetic packaging containers to be identified, and identifying the target images by using the toxic and anesthetic identification program to determine the number and the types of the containers and the using states of the containers;
classifying and recycling the toxic and anesthetic packaging containers in batches according to the number and the types of the containers and the using states of the containers;
adding the counting identification information of the toxic and anesthetic medicine packaging container into a filing system to be matched with the information of a medicine taker and a medicine returning person;
and if not, generating an information mismatch prompt to inform the doctor and the drug administrator through a preset information platform.
Preferably, the performing error analysis on the output data of the preset neural network model after six times of training, determining whether the training model is qualified according to the analysis result, and if so, determining the training model as the recognition model, including:
inputting a verification image in a data verification set into the trained preset neural network model for recognition to obtain a recognition result;
determining the recognition error probability of the trained preset neural network model according to the recognition result, and analyzing the recognition error of the trained preset neural network model according to the recognition error probability;
determining whether the recognition error is within a preset error threshold range, if so, determining that the training model is qualified, and if not, determining that the training model is unqualified;
and when the training model is qualified, confirming the training model as the recognition model.
Preferably, the method further comprises:
obtaining model parameters of the recognition model, and obtaining a loss function mean value, a detection loss mean value, a classification loss mean value, a precision value and a recall rate threshold value of the recognition model according to the model parameters;
determining the detection precision of the recognition model according to the loss function mean value and the detection loss mean value;
determining the classification precision of the recognition model based on the classification loss mean value;
and determining the recognition accuracy of the recognition model according to the accuracy value and the recall rate threshold, and determining whether the recognition model needs to be trained continuously or not based on the detection accuracy, the classification accuracy and the recognition accuracy.
Preferably, the batch classifying and recycling treatment of the narcotic drug packaging containers according to the number and the types of the containers and the using states of the containers comprises the following steps:
dividing the toxic and anesthetic medicine packaging containers to be identified according to the container types to obtain first division results;
dividing each drug and anesthetic packaging container in the first division result into an empty bottle after use, a half bottle after non-use and a full bottle after non-use according to the using state of the container to obtain a second division result;
and selecting an adaptive recovery mode according to the first division result and the second division result to carry out batch recovery processing on the toxic and anesthetic packaging containers.
A pharmaceutical packaging and container profile modeling identification and counting system, the system comprising:
the acquisition module is used for acquiring the image data of the appearance of the packaging container of the N narcotic drugs in a preset image acquisition mode;
the setting module is used for setting an identification mode of the image of the packaging container of the toxic and anesthetic drugs;
the modeling module is used for learning and modeling the packaging container appearance image data of the N narcotic drugs through a YOLOv5 machine learning algorithm based on the recognition mode to obtain a recognition model;
and the loading module is used for loading the identification model into a terminal application program to carry out batch identification, counting and recovery on the narcotic drugs.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
FIG. 1 is a flow chart of the operation of a method for modeling, identifying and counting the shapes of pharmaceutical packages and containers according to the present invention;
FIG. 2 is another workflow diagram of a method for modeling identification and counting of pharmaceutical product packaging and container profiles provided by the present invention;
FIG. 3 is a further workflow diagram of a method for modeling identification and counting of pharmaceutical product packaging and container profiles provided by the present invention;
fig. 4 is a schematic structural diagram of a drug package and container profile modeling, identification and counting system provided by the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The anesthesia medicine is the management and control medicine, and manual management wastes time and energy, and intelligent medicine cabinet management is the trend, but the accurate recovery of empty container is the key link, needs discernment container type, figure, and empty container is put in at fixed point, concentrates and takes out the scheduling problem, and the main method of discerning the recovery container at present is container subsides OCR sign indicating number recognition method, and above-mentioned method can only be applicable to the single recovery of container, influences peak period work efficiency, need handle alone, can not wide application in clinical work, has reduced recovery efficiency. In order to solve the above problems, the present embodiment discloses a method for modeling, identifying and counting the shapes of pharmaceutical packages and containers.
A method for modeling, identifying and counting pharmaceutical product packaging and container profiles, as shown in fig. 1, comprising the steps of:
s101, collecting the shape image data of a packaging container of N toxic anesthetic drugs in a preset image collection mode;
s102, setting an identification mode of an image of a packaging container for toxic and anesthetic drugs;
s103, learning and modeling the packaging container shape image data of the N narcotic drugs through a YOLOv5 machine learning algorithm based on the identification mode to obtain an identification model;
and step S104, loading the identification model into a terminal application program to carry out batch identification, counting and recovery on the narcotic drugs.
In this embodiment, the preset image acquisition mode may be a scanning mode, a shooting mode, a transmission mode, an uploading mode, and the like;
in the present embodiment, the recognition mode includes appearance recognition and shape recognition as well as color recognition and state recognition of the packaging container for the toxic and anesthetic drugs;
in this embodiment, the loading manner may be loaded into the terminal application program in the form of an applet or an application.
The working principle of the technical scheme is as follows: the method comprises the steps of collecting packaging container shape image data of N toxic and anesthetic drugs in a preset image collection mode, setting an identification mode of the packaging container image of the toxic and anesthetic drugs, learning and modeling the packaging container shape image data of the N toxic and anesthetic drugs through a YOLOv5 machine learning algorithm based on the identification mode, obtaining an identification model, and loading the identification model into a terminal application program to perform batch identification, counting and recovery on the toxic and anesthetic drugs.
The beneficial effects of the above technical scheme are: the image data of the toxic and anesthetic glass containers and the recognition modes set for the image data are used for recognizing, learning and modeling the image data by a machine learning algorithm so as to obtain recognition models to automatically recognize, learn and recycle the recognition technologies of the toxic and anesthetic glass containers in batches, the recycling efficiency is improved, the time cost is greatly saved, and the problems that the traditional technology can only be applied to single recycling of the containers, the working efficiency during peak medication is influenced, the independent processing is needed, the method cannot be widely applied to clinical work, and the recycling efficiency is reduced are solved.
In an embodiment, as shown in fig. 2, the acquiring of the image data of the external shape of the packaging container of N narcotic drugs by the preset image acquisition mode includes:
step S201, setting image acquisition conditions according to the preset image acquisition mode, wherein the image acquisition conditions comprise: lighting conditions and ground conditions;
s202, setting a shooting angle and a focal length parameter of a camera according to the image acquisition condition;
step S203, detecting the arrangement condition of the packaging containers of the toxic and anesthetic drugs in a preset arrangement sequence;
and S204, judging whether the image acquisition requirements are met or not according to the arrangement condition, if so, controlling a camera in a preset image acquisition mode to acquire the image data of the appearance of the packaging container of the N narcotic drugs according to set parameters.
In the present embodiment, the arrangement situation is represented as the placement of the packaging containers for toxic and anesthetic drugs in the shooting arrangement sequence set by the camera.
The beneficial effects of the above technical scheme are: the image acquisition work can be more clearly and completely realized by setting the image acquisition condition, the working efficiency and the stability are improved, furthermore, the definition of the acquired image can be further ensured by setting the shooting angle and the focal length parameter of the camera, a high-quality training sample is laid for the subsequent model training, and the learning precision of the model in the training process is improved.
In one embodiment, the setting of the identification pattern of the image of the packaging container of the drug includes:
acquiring bottleneck parameters and visual parameters of a toxic and anesthetic drug packaging container and state parameters of solution or powder inside the container;
acquiring a label pattern identification parameter and a shape identification parameter of a toxic and anesthetic packaging container according to the visual parameter, acquiring an empty bottle identification parameter of the toxic and anesthetic according to a state parameter of solution or powder in the container, and acquiring a use state identification parameter of the toxic and anesthetic according to the bottleneck parameter;
determining a plurality of display states of the packaging container of the toxic and anesthetic drugs based on all the identification parameters;
and constructing an identification rule corresponding to each display state and generating an identification mode corresponding to the display state.
In the present embodiment, the bottleneck parameter is represented as a state parameter when the bottleneck is complete or broken;
in the present embodiment, the visual parameter is expressed as a shape visual parameter of the drug pack container;
in the present embodiment, the display states are represented as a drug-carrying display state and an appearance display state of the packaging container for toxic and anesthetic drugs.
The beneficial effects of the above technical scheme are: the multiple display states of the toxic and anesthetic medicine packaging container are determined by determining the multiple parameters of the toxic and anesthetic medicine packaging container so as to generate the identification mode, all display forms of the toxic and anesthetic medicine packaging can be taken into account, so that real-time samples can be identified without omission, and the identification efficiency and stability are further improved.
In this embodiment, constructing an identification rule corresponding to each display state and generating an identification pattern corresponding to the display state includes:
determining the visual angle attribute of the toxic and anesthetic packaging container in each display state;
determining a description factor of the toxic and anesthetic packaging container in each display state based on the visual angle attribute;
constructing an identification model of the narcotic drug packaging container in each display state through the description factors;
acquiring identification parameters of the toxic and anesthetic drug packaging container in each display state according to the identification model;
arranging and combining the identification parameters to generate M identification strategies, and setting N preset identification rules, wherein M = N;
fusing the preset identification rules and the identification strategies to obtain N identification strategy rules;
extracting rule parameters and strategy parameters of the N identification strategy rules and constructing a calculation model of each identification strategy rule according to the rule parameters and the strategy parameters;
carrying out self-adaptive learning processing on the identification parameters of the toxic and anesthetic drug packaging container in each display state by using a convolutional neural network, and determining the calculation parameters corresponding to the calculation model of each identification strategy rule according to the processing result;
generating a calculation expression of each identification strategy rule according to the calculation parameters and the calculation models corresponding to the calculation models of the identification strategy rules;
executing a calculation expression of each identification strategy rule based on the identification parameters of the drug packaging container in each display state, and selecting the optimal identification strategy rule of the drug packaging container in each display state according to an execution result;
determining the recognition loss difference of the narcotic drug packaging container in each display state under the optimal recognition strategy rule, and creating a recognition dictionary according to the recognition loss difference;
acquiring a constant matrix, an embedded matrix and a tag matrix of the recognition dictionary;
and setting corresponding identification modes of the narcotic drug packaging container in each display state according to the constant matrix, the embedded matrix and the label matrix.
In the embodiment, the view angle attribute is expressed as a multi-view angle display attribute factor of the poison and anesthetic packaging container in each display state;
in the present embodiment, the description factor is expressed as the appearance description condition of the narcotic drug packaging container in each display state;
in the embodiment, the identification parameters are represented as a shape identification parameter, a color identification parameter, an integrity identification parameter and a state identification parameter of the poison and anesthetic packaging container in each display state;
in the embodiment, the identification loss difference is expressed as the identification error or the ratio of the identification image loss local area to the whole area of the toxic and anesthetic drug packaging container in each display state under the optimal identification strategy rule;
in the present embodiment, the recognition dictionary is represented as a network dictionary that performs recognition compensation for a recognition loss difference.
The beneficial effects of the above technical scheme are: the identification parameters of the toxic and anesthetic packaging container in each display state can be rapidly acquired by constructing the identification model of the toxic and anesthetic packaging container in each display state, so that the optimal identification strategy rule is selected according to the test result of the toxic and anesthetic packaging container to different strategy rules, the screened rule is more objective and practical, further, an identification dictionary is established according to the identification loss difference of the screened identification strategy rule, and an identification mode is set, so that the error or loss caused by the identification rule can be overcome, more accurate and stable identification work can be carried out on the toxic and anesthetic packaging container, the identification precision is guaranteed while the stability is improved, and the practicability is improved.
In one embodiment, before learning and modeling the image data of the packaging container outline of the N narcotic drugs by a YOLOv5 machine learning algorithm based on the recognition model, the method further includes:
obtaining model parameters of a preset YOLOv4 machine learning model;
screening out a model input end parameter, a reference network parameter, a Neck network parameter and a Head output layer parameter from the model parameters;
optimizing the input end parameters, the reference network parameters, the Neck network parameters and the Head output layer parameters of the model;
and acquiring a YOLOv5 machine learning algorithm according to the optimized YOLOv4 machine learning model.
The beneficial effects of the above technical scheme are: by optimizing the model parameters, the recognition accuracy, the recognition speed and other performances of the machine learning algorithm can be greatly improved, and the recognition efficiency and the practicability are further improved.
In one embodiment, as shown in fig. 3, the learning and modeling the image data of the packaging container external shape of the N narcotic drugs by a YOLOv5 machine learning algorithm based on the recognition pattern to obtain a recognition model includes:
step S301, dividing the shape images of the packaging containers of N toxic and anesthetic drugs into M training images and N-M verification images, and respectively generating a data training set and a data verification set;
step S302, dividing the M training images into a plurality of training data sets according to the preset data bearing quantity of each training set, and setting the maximum quantity, the hyper-parameters and the resolution of single batch processing data of the training data sets;
step S303, writing a YOLOv5 machine learning algorithm and a recognition mode into a preset neural network model, and performing recognition training for six times on training images in a plurality of training data sets by using the preset neural network model;
and S304, carrying out error analysis on output data of the preset neural network model after six times of training, determining whether the training model is qualified according to an analysis result, and if so, determining the training model as the recognition model.
In this embodiment, the hyperparameter may be a positive integer different from zero;
in this embodiment, the six recognition training rounds are the optimal training rounds for ensuring the convergence of the preset neural network model.
The beneficial effects of the above technical scheme are: the model can be trained and verified at the same time by generating the data training set and the data verification set, so that the practicability is further improved, and further, the model can be orderly trained by dividing batch processing parameters of the training array and the image data, so that the stability is further improved.
In one embodiment, the loading the identification model into the terminal application for batch identification counting recovery of the narcotic drugs comprises:
coding the identification model to obtain a coding result, and writing the coding result into the terminal application program to generate a narcotic drug identification program;
collecting a target image of a drug and anesthetic packaging container to be identified, and identifying the target image by using a drug and anesthetic identification program to determine the number and the type of the containers and the use state of the containers;
classifying and recycling the toxic and anesthetic packaging containers in batches according to the number and the types of the containers and the using states of the containers;
adding the counting identification information of the toxic and anesthetic medicine packaging container into a filing system to be matched with the information of a medicine taker and a medicine returning person;
and if not, generating an information mismatch prompt to inform the doctor and the drug administrator through a preset information platform.
In the present embodiment, the narcotic drug identification program is represented as a narcotic drug identification application program that can be run on a computer or a server terminal.
The beneficial effects of the above technical scheme are: treat discernment glass container through terminals such as computers and carry out intelligent recognition classification and recovery processing work, intelligent and recovery efficiency has been improved, the human cost has been saved, the practicality has further been improved, furthermore, the information phase-match through adding the count identifying information of poison narcotic drug packaging container to the record system and getting it filled the people and returning the medicine the people can take notes the in service behavior information of every poison narcotic drug, realize the accurate control to every poison narcotic drug use flow, the practicality has further been improved.
In this embodiment, the counting identification information of the poison and anesthetic packaging container is added to the filing system, which specifically includes:
acquiring node state information of a storage server corresponding to the filing system;
determining idle nodes in the storage server according to the node state information, and calling the residual storage resources of each idle node;
determining a memory value required for storing counting identification information of a toxic and anesthetic medicament packaging container;
calculating the recommendation degree of each idle node according to the residual storage resources of each idle node and the memory value required by the counting identification information of the toxic and anesthetic medicine packaging container:
Figure BDA0003956378160000121
wherein ,Fi Expressed as recommendation of the ith free node, D i Data transmission efficiency, T, expressed as the ith idle node 1i Remaining storage resources, T, denoted as the ith free node 2i Expressed as the total allocated storage resource of the ith idle node, alpha is expressed as a gain factor of the allocated resource proportion of the node to the data transmission efficiency, log is expressed as logarithm, and p Expressed as the memory value, p, required for storing the count identification information of the narcotic drug packaging container i The allocated memory value is expressed as the ith idle node, e is expressed as a natural constant and takes the value of 2.72 a i Expressed as the processing capacity value of the ith idle node, B is expressed as the data volume corresponding to the counting identification information of the poison and anesthetic packaging container, B i Expressed as maximum amount of data stored in a single cycle for the ith idle node, D i Expressed as transmission delay index, V, of the ith idle node i Current network bandwidth, V, expressed as ith spatial node Expressed as a preset reference bandwidth threshold;
selecting a target idle node with the maximum recommendation degree as a data transmission node;
and the counting identification information of the toxic and anesthetic drug packaging container is stored in a corresponding storage server through the target idle node filing system.
The beneficial effects of the above technical scheme are: the recommendation degree of each idle node is calculated according to the state parameters and the working parameters of each idle node, the adaptability of each idle node can be comprehensively evaluated according to the digestion condition and the transmission efficiency of each idle node to the counting identification information of the narcotic drug packaging container, the transmission time delay, the transmission capacity and other dimensions, so that the idle node with the highest recommendation degree is selected for data transmission, the data transmission efficiency is guaranteed, the stability and the memory of the data transmission are also guaranteed, and the practicability is improved.
In an embodiment, the performing error analysis on the output data of the preset neural network model after six times of training, determining whether the training model is qualified according to the analysis result, and if so, determining that the training model is the recognition model, including:
inputting a verification image in a data verification set into the trained preset neural network model for recognition to obtain a recognition result;
determining the recognition error probability of the trained preset neural network model according to the recognition result, and analyzing the recognition error of the trained preset neural network model according to the recognition error probability;
determining whether the recognition error is within a preset error threshold range, if so, determining that the training model is qualified, and if not, determining that the training model is unqualified;
and when the training model is qualified, confirming the training model as the recognition model.
In this embodiment, the recognition error probability is expressed as a comprehensive probability of a trained preset neural network model recognizing a label error, a recognition appearance error and a recognition bottle medicine state error;
in this embodiment, the recognition error is represented as a ratio of a number of failed recognitions of the trained preset neural network model to a number of successful recognitions of the packaging container of the narcotic drug.
The beneficial effects of the above technical scheme are: the recognition error of the training model is analyzed according to the recognition error probability of the training model, so that the recognition effect of the training model can be rapidly determined, whether the training model is continuously trained or not is selected, the precision and the training effect of the training model are guaranteed, and the stability and the practicability are further improved.
In one embodiment, the method further comprises:
obtaining model parameters of the recognition model, and obtaining a loss function mean value, a detection loss mean value, a classification loss mean value, a precision value and a recall rate threshold value of the recognition model according to the model parameters;
determining the detection precision of the recognition model according to the loss function mean value and the detection loss mean value;
determining the classification precision of the recognition model based on the classification loss mean value;
and determining the recognition accuracy of the recognition model according to the accuracy value and the recall rate threshold, and determining whether the recognition model needs to be trained continuously or not based on the detection accuracy, the classification accuracy and the recognition accuracy.
The beneficial effects of the above technical scheme are: the accuracy condition of the recognition model in each functional dimension is determined according to the model parameters, so that the recognition effect of the model can be further determined, and the accuracy and the recognition accuracy of the model are further ensured.
In one embodiment, the batch classifying and recycling process of the narcotic drug packaging containers according to the number and the types of the containers and the use states of the containers comprises the following steps:
dividing the toxic and anesthetic medicine packaging containers to be identified according to the container types to obtain first division results;
dividing each drug and anesthetic packaging container in the first division result into an empty bottle after use, a half bottle after non-use and a full bottle after non-use according to the using state of the container to obtain a second division result;
and selecting an adaptive recovery mode according to the first division result and the second division result to carry out batch recovery processing on the toxic and anesthetic packaging containers.
The beneficial effects of the above technical scheme are: the recovery efficiency is further ensured by comprehensively determining all states of the toxic and anesthetic packaging containers through twice division of the toxic and anesthetic packaging containers and then selecting the optimal recovery mode of each toxic and anesthetic packaging container.
The present embodiment also discloses a pharmaceutical product packaging and container appearance modeling, recognizing and counting system, as shown in fig. 4, the system includes:
the acquisition module 401 is used for acquiring the image data of the appearance of the packaging container of N toxic anesthetic drugs in a preset image acquisition mode;
a setting module 402, configured to set an identification mode of an image of a packaging container for drugs and drugs;
a modeling module 403, configured to perform learning modeling on the image data of the packaging container outline of the N narcotic drugs by using a YOLOv5 machine learning algorithm based on the identification pattern, so as to obtain an identification model;
a loading module 404, configured to load the identification model into a terminal application program to perform batch identification, counting, and recycling on the narcotic drugs.
The working principle and the advantageous effects of the above technical solution have been explained in the method claims, and are not described herein again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for modeling, identifying and counting pharmaceutical product packaging and container profiles, comprising the steps of:
collecting the appearance image data of the packaging container of N toxic anesthetic drugs in a preset image collection mode;
setting an identification mode of an image of a packaging container of the toxic and anesthetic drugs;
learning and modeling the packaging container appearance image data of the N narcotic drugs through a YOLOv5 machine learning algorithm based on the recognition model to obtain a recognition model;
and loading the identification model into a terminal application program to carry out batch identification, counting and recovery on the toxic and anesthetic drugs.
2. The method for modeling, recognizing and counting pharmaceutical packaging and container profiles as set forth in claim 1, wherein the collecting of the image data of the packaging container profile of N narcotic drugs by the preset image collecting means comprises:
setting image acquisition conditions according to the preset image acquisition mode, wherein the image acquisition conditions comprise: lighting conditions and ground conditions;
setting a shooting angle and a focal length parameter of the camera according to the image acquisition condition;
detecting the arrangement condition of the packaging containers of the toxic and anesthetic drugs in a preset arrangement sequence;
and judging whether the requirement of image acquisition is met according to the arrangement condition, if so, controlling a camera in a preset image acquisition mode to acquire the image data of the appearance of the packaging container of the N toxic anesthetic drugs according to set parameters.
3. The method for modeling identification and counting of pharmaceutical product packaging and container profiles of claim 1, wherein said setting of identification patterns for images of packaging containers of drugs comprises:
acquiring bottleneck parameters and visual parameters of a toxic and anesthetic drug packaging container and state parameters of solution or powder inside the container;
acquiring a label pattern identification parameter and a shape identification parameter of a toxic and anesthetic packaging container according to the visual parameter, acquiring an empty bottle identification parameter of the toxic and anesthetic according to a state parameter of solution or powder in the container, and acquiring a use state identification parameter of the toxic and anesthetic according to the bottleneck parameter;
determining a plurality of display states of a packaging container of the toxic and anesthetic drugs based on all the identification parameters;
and constructing an identification rule corresponding to each display state and generating an identification mode corresponding to the display state.
4. The method for modeling, recognizing and counting pharmaceutical product packaging and container shapes according to claim 1, further comprising, before learning and modeling the image data of the packaging container shapes of the N-narcotic drugs by a YOLOv5 machine learning algorithm based on the recognition patterns to obtain recognition models:
obtaining model parameters of a preset YOLOv4 machine learning model;
screening out a model input end parameter, a reference network parameter, a Neck network parameter and a Head output layer parameter from the model parameters;
optimizing the input end parameters, the reference network parameters, the Neck network parameters and the Head output layer parameters of the model;
and acquiring a YOLOv5 machine learning algorithm according to the optimized YOLOv4 machine learning model.
5. The method for modeling, recognizing and counting pharmaceutical product packaging and container shapes according to claim 1, wherein the learning modeling of the packaging container shape image data of the N-narcotic drugs by a YOLOv5 machine learning algorithm based on the recognition model to obtain a recognition model comprises:
dividing the N packaging container appearance images of the toxic and anesthetic drugs into M training images and N-M verification images, and respectively generating a data training set and a data verification set;
dividing the M training images into a plurality of training data sets according to the preset data bearing quantity of each training set, and setting the maximum quantity, the super-parameters and the resolution of single batch processing data of the training data sets;
writing a YOLOv5 machine learning algorithm and a recognition mode into a preset neural network model, and performing recognition training for six times on training images in a plurality of training data sets by using the preset neural network model;
and performing error analysis on output data of the preset neural network model after six times of training, determining whether the training model is qualified according to an analysis result, and if so, determining the training model as the recognition model.
6. The method for modeling, recognizing and counting pharmaceutical packaging and container profiles as recited in claim 1, wherein the loading of the recognition model into an end application for batch recognition and counting recovery of narcotic drugs comprises:
coding the identification model to obtain a coding result, and writing the coding result into the terminal application program to generate a narcotic drug identification program;
collecting a target image of a drug and anesthetic packaging container to be identified, and identifying the target image by using a drug and anesthetic identification program to determine the number and the type of the containers and the use state of the containers;
classifying and recycling the toxic and anesthetic packaging containers in batches according to the number and the types of the containers and the using states of the containers;
adding the counting identification information of the toxic and anesthetic medicine packaging container into a filing system to be matched with the information of a medicine taker and a medicine returning person;
and if not, generating an information mismatch prompt to inform the doctor and the drug administrator through a preset information platform.
7. The method for modeling, recognizing and counting the shapes of pharmaceutical packages and containers according to claim 5, wherein the performing error analysis on the output data of the preset neural network model after six times of training, determining whether the training model is qualified according to the analysis result, and if so, confirming the training model as the recognition model comprises:
inputting a verification image in a data verification set into the trained preset neural network model for recognition to obtain a recognition result;
determining the recognition error probability of the trained preset neural network model according to the recognition result, and analyzing the recognition error of the trained preset neural network model according to the recognition error probability;
determining whether the recognition error is within a preset error threshold range, if so, determining that the training model is qualified, and if not, determining that the training model is unqualified;
and when the training model is qualified, confirming the training model as the recognition model.
8. The pharmaceutical product packaging and container appearance modeling identification and counting method of claim 5, further comprising:
obtaining model parameters of the recognition model, and obtaining a loss function mean value, a detection loss mean value, a classification loss mean value, a precision value and a recall rate threshold value of the recognition model according to the model parameters;
determining the detection precision of the recognition model according to the loss function mean value and the detection loss mean value;
determining the classification precision of the recognition model based on the classification loss mean value;
and determining the recognition accuracy of the recognition model according to the accuracy value and the recall rate threshold, and determining whether the recognition model needs to be trained continuously or not based on the detection accuracy, the classification accuracy and the recognition accuracy.
9. The method for modeling, identifying and counting pharmaceutical product packaging and container profiles as recited in claim 6, wherein the batch classification and recycling process for narcotic pharmaceutical packaging containers based on the number and type of containers and the usage status of the containers comprises:
dividing the toxic and anesthetic medicine packaging containers to be identified according to the container types to obtain first division results;
dividing each drug and anesthetic packaging container in the first division result into an empty bottle after use, a half bottle after non-use and a full bottle after non-use according to the using state of the container to obtain a second division result;
and selecting an adaptive recovery mode according to the first division result and the second division result to carry out batch recovery processing on the toxic and anesthetic packaging containers.
10. A pharmaceutical packaging and container profile modeling identification and counting system, comprising:
the acquisition module is used for acquiring the image data of the appearance of the packaging container of the N narcotic drugs in a preset image acquisition mode;
the setting module is used for setting an identification mode of the image of the packaging container of the toxic and anesthetic drugs;
the modeling module is used for learning and modeling the packaging container appearance image data of the N narcotic drugs through a YOLOv5 machine learning algorithm based on the identification mode to obtain an identification model;
and the loading module is used for loading the identification model into a terminal application program to carry out batch identification, counting and recovery on the narcotic drugs.
CN202211466269.XA 2022-11-22 2022-11-22 Medicine packaging and container appearance modeling identification and counting method and system Active CN115861688B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211466269.XA CN115861688B (en) 2022-11-22 2022-11-22 Medicine packaging and container appearance modeling identification and counting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211466269.XA CN115861688B (en) 2022-11-22 2022-11-22 Medicine packaging and container appearance modeling identification and counting method and system

Publications (2)

Publication Number Publication Date
CN115861688A true CN115861688A (en) 2023-03-28
CN115861688B CN115861688B (en) 2023-08-11

Family

ID=85664932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211466269.XA Active CN115861688B (en) 2022-11-22 2022-11-22 Medicine packaging and container appearance modeling identification and counting method and system

Country Status (1)

Country Link
CN (1) CN115861688B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804227A (en) * 2018-05-23 2018-11-13 大连理工大学 The method of the unloading of computation-intensive task and best resource configuration based on mobile cloud computing
CN110533078A (en) * 2019-08-02 2019-12-03 西安电子科技大学 Multi-angle of view recognition methods based on dictionary pair
CN111931774A (en) * 2020-09-27 2020-11-13 耀方信息技术(上海)有限公司 Method and system for warehousing medicine data
CN113538417A (en) * 2021-08-24 2021-10-22 安徽顺鼎阿泰克科技有限公司 Transparent container defect detection method and device based on multi-angle and target detection
CN114388106A (en) * 2022-01-12 2022-04-22 首都医科大学宣武医院 Medicine consumable management information checking and analyzing system and equipment based on face recognition

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804227A (en) * 2018-05-23 2018-11-13 大连理工大学 The method of the unloading of computation-intensive task and best resource configuration based on mobile cloud computing
CN110533078A (en) * 2019-08-02 2019-12-03 西安电子科技大学 Multi-angle of view recognition methods based on dictionary pair
CN111931774A (en) * 2020-09-27 2020-11-13 耀方信息技术(上海)有限公司 Method and system for warehousing medicine data
CN113538417A (en) * 2021-08-24 2021-10-22 安徽顺鼎阿泰克科技有限公司 Transparent container defect detection method and device based on multi-angle and target detection
CN114388106A (en) * 2022-01-12 2022-04-22 首都医科大学宣武医院 Medicine consumable management information checking and analyzing system and equipment based on face recognition

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JIAO PENG ET AL.: "Towards Toxic and Narcotic Medication Detection with Rotated Object Detector", ARXIV:2110.09777V1 [CS.CV], pages 1 - 15 *

Also Published As

Publication number Publication date
CN115861688B (en) 2023-08-11

Similar Documents

Publication Publication Date Title
WO2020249125A1 (en) Method and system for automatically training machine learning model
CN109376615A (en) For promoting the method, apparatus and storage medium of deep learning neural network forecast performance
CN110888857A (en) Data label generation method, device, terminal and medium based on neural network
CN108875768A (en) Data mask method, device and system and storage medium
US20220237917A1 (en) Video comparison method and apparatus, computer device, and storage medium
CN113435998B (en) Loan overdue prediction method and device, electronic equipment and storage medium
US20200320440A1 (en) System and Method for Use in Training Machine Learning Utilities
CN110222733B (en) High-precision multi-order neural network classification method and system
CN110210194A (en) Electronic contract display methods, device, electronic equipment and storage medium
CN113570286B (en) Resource allocation method and device based on artificial intelligence, electronic equipment and medium
CN110175990A (en) Quality of human face image determination method, device and computer equipment
Kokoulin et al. The optical subsystem for the empty containers recognition and sorting in a reverse vending machine
CN110310012A (en) Data analysing method, device, equipment and computer readable storage medium
CN114219507A (en) Qualification auditing method and device for traditional Chinese medicine supplier, electronic equipment and storage medium
CN116825311B (en) DRG/DIP-based hospital management and control operation method and system
CN114066438A (en) Model-based monitoring data display method, device, equipment and storage medium
CN111414930A (en) Deep learning model training method and device, electronic equipment and storage medium
CN109886206A (en) Three-dimensional object identification method and equipment
CN115861688A (en) Drug packaging and container appearance modeling identification and counting method and system
CN116029757A (en) Operation strategy triggering method and device based on deep learning and electronic equipment
CN115410250A (en) Array type human face beauty prediction method, equipment and storage medium
CN114299485A (en) Method and system for evaluating identification accuracy of quota invoice based on artificial intelligence
CN113392086A (en) Medical database construction method, device and equipment based on Internet of things
CN112132061A (en) Medicine screening method and system based on online identification system
CN113642530A (en) Intelligent medical management system based on deep neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant