Highly efficient automated identification method for highly reproducible characteristic targets
By establishing a sample packaging picture database and dynamic partition recognition technology, the problem of automatic recognition of pharmaceutical packaging with high reproducibility characteristics has been solved, a fast and accurate recognition process has been achieved, the recognition speed and accuracy have been improved, the misrecognition rate has been reduced, and it has provided a basis for pharmaceutical automation. Identification provides important support.
Patent Information
- Application Number
- CN202111213427.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-19
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-10-19
AI Technical Summary
During the drug verification process, drug packaging with highly reproducible characteristics makes automatic identification difficult, and it is difficult for existing technology to accurately and efficiently identify these targets.
By establishing a sample packaging image database, extract features and establish a 'sample-feature' mapping relationship, classify samples, set the number and accuracy requirements of collected images, dynamically partition and identify areas, and use convolutional neural networks and cluster analysis algorithms for feature matching. Set the recheck float value to improve recognition accuracy.
It achieves rapid and accurate identification of targets with highly reproducible features, improves identification speed and accuracy, reduces misidentification rates, and lays the foundation for automated drug identification.
Smart Images

Figure CN114202666B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent medicine, in particular to the field of automation of drug verification processes in outpatient clinics, inpatient pharmacies, etc., and more specifically to a high-efficiency automated recognition method for highly reproducible characteristic targets. Background Art
[0002] Highly reproducible feature objects refer to objects to be identified that have a large number of similar features with high reproducibility. For example, a common medicine box is an object with this feature.
[0003] Unlike ordinary commodities, the packaging and labeling of drugs must comply with the relevant regulations of the State Drug Administration. For example, generic names must be used on drugs, and trade names must be approved by the State Drug Administration before they can be used on packaging labels, and the area ratio of the generic name to the trade name must not be less than 1:2. At the same time, for registered trademarks that have been approved for registration, if they are not approved by the State Drug Administration to be used as trade names, they can only be used in the upper left or upper right corner of the packaging, and the font size must not be larger than the generic name. This has resulted in the same high-recurrence features appearing on a large number of drug packaging boxes from different manufacturers.
[0004] For example, according to the drug packaging specifications, the packaging of narcotic drugs, psychotropic drugs, toxic drugs for medical use, radioactive drugs and other specially managed drugs, external-use drugs and over-the-counter drugs must be printed with logos that comply with regulations, such as the common "OTC" mark. These marks make the same high-reproducibility features appear on the packaging of different manufacturers.
[0005] In addition, for different drugs from the same manufacturer, since the drug packaging specifications require that the outer packaging must indicate the name of the manufacturer, drug name, usage and dosage, etc., the same manufacturer has a large number of the same high-reproducibility features in the labeling part of the packaging. In particular, in the same manufacturer, the different specifications of the same drug packaging may only have slight differences in the specification markings, while other markings and outer packaging designs have the same design elements, which makes the different drug packaging of the same manufacturer also have high-reproducibility features.
[0006] These highly reproducible features occupy a large proportion on the packaging, but they are not unique to a certain package, so they become a difficulty in the automatic recognition process of such highly reproducible feature targets. Summary of the invention
[0007] The technical problem to be solved by the present invention is how to accurately and efficiently identify targets with high reproducibility characteristics, thereby laying a foundation for automation in these fields.
[0008] In order to solve the above technical problems, the present invention discloses a high-efficiency automatic recognition method for a target object with high reproducibility characteristics, comprising the following steps:
[0009] S1: Establish a sample packaging image database; for different samples, their packaging may have six-sided packaging images or two-sided packaging images. According to the actual situation, all sample packaging images are collected;
[0010] S2: extract features from each sample packaging image respectively, and establish a feature image database with a "sample-feature" mapping relationship; the "sample-feature" mapping relationship here refers to the mapping relationship between the sample name containing information such as product specifications and product name that can distinguish the sample from other samples and the features of the sample, and the features here come from the packaging images of each side of the sample packaging in step S1;
[0011] S3: Classify samples according to the number of "sample-feature" mapping relationships of the same sample, define samples with more mapping relationships as first-level samples, and so on, by setting a threshold for the number of features, define samples with different numbers of mapping relationships into different sample levels; (Does the database here have to be divided into three levels, because it is possible that one side of the drug contains more features and the other side has fewer features, so it is classified as first level, but during identification, the side with fewer features is seen)
[0012] S4: Setting the matching relationship between the sample level and the number and accuracy of collected images;
[0013] The number of collected images refers to the number of times the images are collected. The accuracy of collected images refers to the accuracy of the collected images as the basis for recognition. The accuracy is related to pixels and resolution. Low accuracy means low image pixels and small resolution. High accuracy means high image pixels and large resolution.
[0014] S5: Collect the sample image to be identified;
[0015] S6: performing rough recognition on the sample image to be identified collected in S5 to obtain the number of features contained in the sample image to be identified;
[0016] S7: Compare the number of features obtained in S6 with the feature number threshold set in S3 to obtain the sample level of the sample image to be identified;
[0017] S8: According to the matching relationship set in S4, the number and accuracy requirements of the collected images required for the sample image to be identified are obtained;
[0018] The quantity and accuracy requirements of the acquired images obtained in S8 are fed back to the acquisition system, thereby increasing the number of acquisitions or compressing the accuracy of the acquired images.
[0019] Further preferably, the method further comprises the following steps:
[0020] In S6, position information of features contained in the sample image to be identified is simultaneously obtained;
[0021] S9: Based on the position information of the features contained in the sample image to be identified, dynamically partitioning the sample image to be identified, wherein the dynamic partitioning refers to configuring different weights in different weight configuration units, so as to extract the effective area containing the features in the sample image to be identified;
[0022] S10: Identify features in the effective area, match them one by one with features in the feature image database, and output matching sample results corresponding to different features according to the “sample-feature” mapping relationship;
[0023] S11-1: Set a matching quantity threshold. If the matching sample result in S10 is greater than the matching quantity threshold, the match is considered successful and the sample name is output as the recognition result; if the matching sample result in S10 is less than the matching quantity threshold, the match is considered failed and the unrecognized result is output.
[0024] Further preferably, the method further comprises the following steps:
[0025] S11-2: Set the re-inspection floating value. When the matching sample result is within the range of the matching quantity threshold ± the re-inspection floating value, return to S10, perform identification and matching multiple times, and output multiple groups of matching sample results. The multiple groups of matching sample results are judged according to the method in S11-1. If the results are consistent, all are successful or all are failed, the result is determined to be accurate and the result is output. If the results are inconsistent, the result is considered to be questionable, and a prompt and manual intervention review are required.
[0026] Further preferably, in step S2, a convolutional neural network is used to extract features from each sample packaging image.
[0027] As a preferred technical solution, a cluster analysis algorithm is used in step S2 to classify samples in the feature database by analyzing sample image features.
[0028] As a preferred solution, samples are divided into three levels. According to thresholds A1 and A2, when the number of "sample-feature" mapping relationships ≥ A1, it is defined as a first-level sample; when A1>the number of "sample-feature" mapping relationships ≥ A2, it is defined as a second-level sample; when the number of "sample-feature" mapping relationships <A2, it is defined as a third-level sample.
[0029] Further preferably, when the sample image to be identified is a first-level sample, the image to be identified is compressed to 1 / n of the original pixel; when the sample image to be identified is a second-level sample, the sample image to be identified is directly used; when the sample image to be identified is a third-level sample, the number of times the sample image to be identified is collected is increased to obtain multiple sample images to be identified, preferably, n is 3.
[0030] Generally speaking, a method for obtaining multiple images of samples to be identified is to trigger a camera to take multiple consecutive photos.
[0031] Since the sample image to be identified may contain one sample, but more likely contains multiple samples, therefore, as a preferred technical solution, if the sample image to be identified contains multiple levels of samples, the number and accuracy requirements of the acquired images required to generate the sample image to be identified are based on the highest level. For example, if the sample image to be identified contains both first-level samples, second-level samples, and third-level samples, the number and accuracy requirements of the acquired images required to generate the sample image to be identified are based on the requirements of the third-level samples.
[0032] As a preferred technical solution, in step S9, the weight configuration unit is a nine-square grid.
[0033] In a preferred technical solution, the re-inspection floating value is 10%.
[0034] As a preferred technical solution, in step S11-2, the process returns to S10, and the number of identification and matching is less than or equal to 10.
[0035] In the field of automatic identification, improving the recognition accuracy and recognition speed is the goal pursued by those skilled in the art, and is also a technical difficulty that needs to be solved when facing different targets to be identified. The present invention creatively grades samples by the number of "sample-feature" mapping relationships, thereby making different image processing methods for samples of different levels to be identified, and providing an image basis that meets the recognition accuracy for subsequent identification. On the premise of ensuring that the recognition accuracy is met, the recognition speed can be greatly improved, and the effective identification of high-reproducibility feature targets is guaranteed. At the same time, during the recognition process, the feature distribution information obtained during the rough recognition process is used to dynamically partition the recognition area, and by configuring different weights, the purpose of focusing the detection attention on the difference partitions is achieved, effectively improving the detection accuracy between packages with only small differences, such as drug packaging. Finally, a retry mechanism is also provided in the present invention, thereby greatly reducing the misrecognition rate on the basis of ensuring the recognition speed, and ensuring the accuracy of the recognition results.
[0036] By adopting the technical solution disclosed in the present invention, it is possible to achieve rapid and accurate recognition of high-reproducibility feature targets such as pharmaceutical packaging, which is of great significance for the automated recognition of such targets and the development of artificial intelligence based on automated recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 Schematic diagram of a sample medicine box.
[0038] Figure 2 For identification diagram. DETAILED DESCRIPTION
[0039] In order to better understand the present invention, the present invention is further described below in conjunction with specific embodiments.
[0040] Example 1
[0041] The present invention discloses a highly efficient automatic identification method for a target object with high reproducibility characteristics. Below, we take a medicine box as an example to further illustrate the highly efficient automatic identification method for a target object with high reproducibility characteristics, comprising the following steps:
[0042] S1: Establish a sample packaging image database; for different samples, their packaging may have six-sided packaging images or two-sided packaging images. According to the actual situation, all sample packaging images are collected; for example, combined with Figure 1 The carbamazepine tablets used in this embodiment are the Deliduo brand produced by Novartis Pharmaceuticals with six-sided packaging. In the process of establishing the sample packaging image database, the six-sided packaging images are collected and stored in the sample packaging image database.
[0043] S2: extract features from each sample packaging image respectively, and establish a feature image database with a "sample-feature" mapping relationship; the "sample-feature" mapping relationship here refers to the mapping relationship between the sample name containing information such as product specifications and product name that can distinguish the sample from other samples and the features of the sample, and the features here come from the packaging images of each side of the sample packaging in step S1;
[0044] Combination Figure 2 It can be seen that in Figure 2 In the lower part of a and b, many identification points form the features mentioned in the present invention, and these features form a mapping relationship with "Novartis production, carbamazepine tablets, 200 mg, tablets", and the mapping relationship is stored in the feature image database. Further preferably, in this embodiment, a convolutional neural network is used to extract features in each sample packaging image. And a cluster analysis algorithm is used to classify the samples in the feature database by analyzing the sample image features.
[0045] S3: Classify samples according to the number of "sample-feature" mapping relationships of the same sample, define samples with more mapping relationships as first-level samples, and so on, by setting a threshold of the number of features, define samples with different numbers of mapping relationships into different sample levels;
[0046] As a preferred solution, samples are divided into three levels. According to thresholds A1 and A2, when the number of "sample-feature" mapping relationships ≥ A1, it is defined as a first-level sample; when A1>the number of "sample-feature" mapping relationships ≥ A2, it is defined as a second-level sample; when the number of "sample-feature" mapping relationships <A2, it is defined as a third-level sample.
[0047] In this embodiment, the medicine box sample is set as a third-level sample through the quantity threshold. It can also be seen from the packaging that due to the presence of a large number of blank areas in the medicine box, its identification is more difficult than that of a multi-feature medicine box.
[0048] S4: Setting the matching relationship between the sample level and the number and accuracy of collected images;
[0049] S5: Collect the sample image to be identified;
[0050] S6: performing rough recognition on the sample image to be identified collected in S5 to obtain the number of features contained in the sample image to be identified;
[0051] S7: Compare the number of features obtained in S6 with the feature number threshold set in S3 to obtain the sample level of the sample image to be identified;
[0052] S8: According to the matching relationship set in S4, the number and accuracy requirements of the collected images required for the sample image to be identified are obtained;
[0053] The quantity and accuracy requirements of the acquired images obtained in S8 are fed back to the acquisition system, thereby increasing the number of acquisitions or compressing the accuracy of the acquired images.
[0054] Further preferably, when the sample image to be identified is a first-level sample, the image to be identified is compressed to 1 / n of the original pixels; in this embodiment, the image is preferably compressed to 1 / 3 of the original pixels, and when the sample image to be identified is a second-level sample, the sample image to be identified is directly used; when the sample image to be identified is a third-level sample, the number of times the sample image to be identified is collected is increased to obtain multiple sample images to be identified.
[0055] In this embodiment, since the sample is a third-level sample, it is necessary to collect two samples of the sample to be identified. Figure 2 It can be seen that the sample images to be identified are Figure 2 a and b in .
[0056] Further preferably, the present embodiment also includes the following steps:
[0057] In S6, position information of features contained in the sample image to be identified is simultaneously obtained;
[0058] S9: Based on the position information of the features contained in the sample image to be identified, dynamically partitioning the sample image to be identified, wherein the dynamic partitioning refers to configuring different weights in different weight configuration units, so as to extract the effective area containing the features in the sample image to be identified;
[0059] As a preferred technical solution, in step S9, the weight configuration unit is a nine-square grid.
[0060] like Figure 2 As shown in , the upper part of the images to be identified in a and b are framed by the nine-square grid. At the same time, more weight configurations are given to areas with more features. For example, in a, the key identification area is the grid in the second row and third column, while in b, the key identification area is the two grids in the second row, first column and second column. It can be seen that in the whole process, the white blank area in the packaging box is discarded and does not occupy the identification amount, thereby significantly improving the recognition efficiency.
[0061] S10: Identify the features in the effective area, and match them one by one with the features in the feature image database, and output the matching sample results corresponding to different features according to the "sample-feature" mapping relationship; Figure 2 As shown in , the matching relationships are marked.
[0062] S11-1: Set a matching quantity threshold. If the matching sample result in S10 is greater than the matching quantity threshold, the match is considered successful and the sample name is output as the recognition result; if the matching sample result in S10 is less than the matching quantity threshold, the match is considered failed and the unrecognized result is output.
[0063] More preferably, the method further comprises the following steps:
[0064] S11-2: Set the re-inspection floating value. When the matching sample result is within the range of the matching quantity threshold ± the re-inspection floating value, return to S10, perform identification and matching multiple times, and output multiple groups of matching sample results. The multiple groups of matching sample results are judged according to the method in S11-1. If the results are consistent, all are successful or all are failed, the result is determined to be accurate and the result is output. If the results are inconsistent, the result is considered to be questionable, and a prompt and manual intervention review are required.
[0065] In a preferred technical solution, the re-inspection floating value is 10%.
[0066] As a preferred technical solution, in step S11-2, the process returns to S10, and the number of identification and matching is less than or equal to 10.
[0067] In this embodiment, if Figure 2 As shown in , after the recognition of the two acquired images and through feature matching in the effective area, the final output recognition result is "Novartis production, carbamazepine tablets, 200 mg, tablets".
[0068] It should be noted that since the sample image to be identified may contain one sample, but more likely contains multiple samples, when it contains multiple samples, such as Figure 2 As shown in , the medicine box region is anchored by the anchor frame, and then the number of features of each medicine box region is counted.
[0069] As a preferred technical solution, if the sample image to be identified contains samples of multiple levels, the number and accuracy requirements of the acquired images required for generating the sample image to be identified are based on the highest level. For example, if the sample image to be identified contains both first-level samples, second-level samples, and third-level samples, the number and accuracy requirements of the acquired images required for generating the sample image to be identified are based on the requirements of the third-level samples.
[0070] However, in the subsequent recognition process, if the medicine box is a first-level sample, one of the sample images to be identified is compressed, and its area is identified to obtain the recognition result; if the medicine box is a second-level sample, one of the sample images to be identified is directly used for identification, and the area where the medicine box is located is identified to obtain the recognition result; if the medicine box is a third-level sample, multiple sample images to be identified are combined and directly used for identification, and the area where the medicine box is located is identified as described above in this embodiment to obtain the recognition result.
[0071] Therefore, different recognition methods can be used for different targets to be identified, effectively balancing recognition accuracy and efficiency.
[0072] The above is a specific implementation of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also considered to be within the protection scope of the present invention.
Claims
1. A highly efficient automated identification method for highly reproducible characteristic targets, characterized in that: The following steps are involved: S1: Establish sample packaging image database; S2: Extract the features of each sample packaging image respectively, and establish a feature image database with a "sample-feature" mapping relationship; S3: Classify samples according to the number of "sample-feature" mapping relationships of the same sample, define samples with more mapping relationships as first-level samples, and so on, by setting a threshold for the number of features, define samples with different numbers of mapping relationships into different sample levels; S4: Setting the matching relationship between the sample level and the number and accuracy of collected images; S5: Collect the sample image to be identified; S6: performing rough recognition on the sample image to be identified collected in S5 to obtain the number of features contained in the sample image to be identified; S7: Compare the number of features obtained in S6 with the feature number threshold set in S3 to obtain the sample level of the sample image to be identified; S8: According to the matching relationship set in S4, the number and accuracy requirements of the collected images required for the sample image to be identified are obtained; Feeding back the quantity and accuracy requirements of the collected images obtained in S8 to the collection system, thereby increasing the number of collections or compressing the accuracy of the collected images; The processed image is transmitted to the recognition system as a sample image to be recognized to complete the recognition.
2. The high-efficiency automatic identification method of a target with high reproducibility characteristics according to claim 1, characterized in that: The following steps are also included: In S6, position information of features contained in the sample image to be identified is simultaneously obtained; S9: Based on the position information of the features contained in the sample image to be identified, dynamically partitioning the sample image to be identified, wherein the dynamic partitioning refers to configuring different weights in different weight configuration units, so as to extract the effective area containing the features in the sample image to be identified; S10: Identify the features in the effective area, match them one by one with the features in the feature image database, and output matching sample results corresponding to different features according to the "sample-feature" mapping relationship; S11-1: Set a matching quantity threshold. If the matching sample result in S10 is greater than the matching quantity threshold, the match is considered successful and the sample name is output as the recognition result; if the matching sample result in S10 is less than the matching quantity threshold, the match is considered failed and the unrecognized result is output.
3. The high-efficiency automatic identification method of a target with high reproducibility characteristics according to claim 2, characterized in that: The following steps are also included: S11-2: Set the re-inspection floating value. When the matching sample result is within the range of the matching quantity threshold ± the re-inspection floating value, return to S10, perform identification and matching multiple times, and output multiple groups of matching sample results. The multiple groups of matching sample results are judged according to the method in S11-1. If the results are consistent, all are successful or all are failed, the result is determined to be accurate and the result is output. If the results are inconsistent, the result is considered to be questionable, and a prompt and manual intervention review are required.
4. The high-efficiency automatic identification method of a target with high reproducibility characteristics according to claim 1, characterized in that: In step S2, a convolutional neural network is used to extract features from each sample packaging image.
5. The high-efficiency automatic identification method of a target with high reproducibility characteristics according to claim 1, characterized in that: In step S2, a cluster analysis algorithm is used to classify samples in the feature database by analyzing sample image features.
6. The high-efficiency automatic identification method of a target with high reproducibility characteristics according to claim 1, characterized in that: Samples are divided into three levels. According to thresholds A1 and A2, when the number of "sample-feature" mapping relationships ≥ A1, it is defined as a first-level sample; when A1>the number of "sample-feature" mapping relationships ≥ A2, it is defined as a second-level sample; when the number of "sample-feature" mapping relationships < A2, it is defined as a third-level sample.
7. The high-efficiency automatic identification method for high-reproducibility characteristic targets according to claim 1, characterized in that: When the sample image to be identified is a first-level sample, the image to be identified is compressed to 1 / n of the original pixel; when the sample image to be identified is a second-level sample, the sample image to be identified is directly used; when the sample image to be identified is a third-level sample, the number of times the sample image to be identified is collected is increased to obtain multiple sample images to be identified; preferably, n is 3.
8. The high-efficiency automatic identification method for high-reproducibility characteristic targets according to claim 1, characterized in that: If the sample image to be identified contains samples of multiple levels, the number and accuracy requirements of the acquired images required to generate the sample image to be identified at the highest level shall be followed.
9. The high-efficiency automatic identification method of a target with high reproducibility characteristics according to claim 1, characterized in that: In step S9, the weight configuration unit is a nine-square grid.
10. The high-efficiency automatic identification method of a target with high reproducibility characteristics according to claim 3, characterized in that: The re-inspection floating value is 10%; As a preferred technical solution, in step S11-2, the process returns to S10, and the number of identification and matching is less than or equal to 10.
