A screening method for collecting pictures under working conditions
By using the screening method of collecting pictures under working conditions in the automated identification system in the medical field, the image updated by the sample library is screened using similarity and feature quantity threshold threshold values, the backlog of sample library updates caused by frequent changes in drug packaging is solved, which improves the update efficiency and reduces the workload of operation and maintenance personnel.
Patent Information
- Application Number
- CN202210396133.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-15
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2042-04-15
AI Technical Summary
In the pharmaceutical field, due to the large number of drug manufacturers, there is no fixed time for new drug specifications and drug packaging replacement, the sample pictures in the sample library need to be updated frequently, which increases the workload of operation and maintenance personnel and may lead to a backlog of update tasks, reducing the work efficiency of automatic identification.
A screening method for collecting pictures under working conditions is adopted. By searching and identifying the sample images to be replaced in the task, the characteristics of the working conditions pictures are extracted, and the similarity to the sample images to be replaced is calculated, and the screening is carried out based on the set similarity threshold and feature quantity threshold threshold, and the pictures are automatically replaced or discarded to reduce manual intervention.
Effectively filter out working conditions pictures that meet the conditions, reduce the workload of operation and maintenance personnel, improve the efficiency of sample library updates, avoid updating tasks, and ensure the quality of sample pictures in the sample library.
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to the application of artificial intelligence in the field of recognition, and more specifically to a method for screening images collected under working conditions. Background Art
[0002] Artificial intelligence recognition is an important application direction of artificial intelligence. In the process of artificial intelligence recognition, the sampled sample is compared with the samples in the standard library, and then the similarity result is judged whether it is consistent with the samples in the standard library, and then the recognition result of the sampled sample is given.
[0003] According to the above process description, it can be seen that the samples in the standard library used for comparison have a significant impact on the accuracy of the recognition results.
[0004] In current application scenarios, most samples in the sample library are manually preset in the recognition system. In order to ensure the accuracy of recognition, samples need to be collected by operation and maintenance personnel under specific shooting conditions. The collection conditions are higher than those under recognition conditions, such as requiring appropriate lighting, angles, and focus distances.
[0005] As the field of intelligent identification continues to expand, automated intelligent identification and verification is also being carried out in processes such as picking up medicines at pharmacies. However, unlike previous application scenarios, in the pharmaceutical field, due to the large number of drug manufacturers and the lack of fixed time for new drug specifications and drug packaging changes, it is impossible to obtain them one by one, so there will be more needs to replace sample images in the sample library.
[0006] At present, this problem is mainly solved by operation and maintenance personnel who collect and obtain sample image information under specific environmental conditions based on known sample image information that needs to be replaced. This operation not only increases the workload of operation and maintenance personnel, but also causes a backlog of sample library image update tasks when updates are concentrated and the amount to be updated is large, thereby reducing the work efficiency of automatic recognition. Summary of the invention
[0007] The technical problem to be solved by the present invention is how to effectively screen the pictures collected in the working conditions as the updated sample pictures in the sample library so that they meet the conditions of the sample pictures in the sample library, thereby reducing the workload of the operation and maintenance personnel, and using computer technology to improve the replacement efficiency and avoid the backlog of replacement tasks.
[0008] In order to solve the above technical problems, the present invention discloses a method for screening collected pictures under working conditions, comprising the following steps:
[0009] S1: Search all recognition tasks for the sample images to be replaced and sort them;
[0010] S2: Sequentially extract the features of the working condition pictures corresponding to the pictures to be replaced taken in the recognition task, and calculate the similarity between the working condition pictures taken under the working condition and the sample pictures in the sample library corresponding to the pictures to be replaced, and compare the similarity results with the similarity threshold Th1, and process them as follows;
[0011] 2-1: If the similarity is greater than or equal to the set similarity threshold Th1, further count the feature quantities in the working condition picture and compare the feature quantities with the feature quantity threshold Th2;
[0012] a. If the feature quantity is greater than or equal to the feature quantity threshold Th2, the working condition picture is used to replace the original sample picture in the sample library as a new sample picture;
[0013] b. If the feature value is less than the feature value threshold Th2, the working condition picture is discarded;
[0014] 2-2: If the similarity is less than the set similarity threshold Th1, the working condition picture is pushed to the operation and maintenance personnel to request manual intervention;
[0015] a. If it is determined that the low similarity of the working condition picture is due to significant changes in the packaging, then confirm that the working condition picture will replace the original sample picture in the sample library as the new sample picture;
[0016] b. If it is determined that the change is not caused by a significant change in the packaging, the sample images are collected manually and updated into the sample library as new sample images;
[0017] S3: follow the method in S2 and try all the working condition pictures in the sequence in S1;
[0018] S4: Obtain the updated sample library.
[0019] Further preferably, the similarity threshold Th1 is obtained in the following manner:
[0020] X1: Search for the recognition tasks that contain the sample images to be replaced in all recognition tasks, and respectively establish the sample feature distribution curves Tn (n=1, 2, 3, ... n is an integer) of the images taken under various working conditions of the images to be replaced and the sample feature distribution curves T0 of the sample images originally preset in the system;
[0021] X2: Calculate the similarity between Tn and T0;
[0022] X3: Take the average of the similarity values obtained in X2 as the similarity threshold Th1.
[0023] Further preferably, the cosine similarity algorithm is used in X2 to obtain the similarity between Tn and T0.
[0024] As a preferred technical solution, through the similarity between Tn and T0 of samples of different categories, machine learning is used to obtain a comprehensive similarity threshold Th1 (general) applicable to all categories of samples.
[0025] Preferably, the feature value threshold Th2 = the feature value of the original sample image in the sample library × 80%.
[0026] Preferably, the feature quantity threshold value Th2 is obtained by machine learning. Machine learning is a commonly used method in data processing. In the present invention, the feature quantity threshold value Th2 is obtained by machine learning by selecting samples of different feature quantities, establishing training sets and test sets, and then inputting them into the model for machine learning, and continuously adjusting the model parameters according to the judgment results, and finally obtaining a feature quantity threshold value judgment model that meets the requirements.
[0027] The present invention constructs a two-layer screening logic, which can realize efficient screening of working condition pictures through the similarity threshold Th1 and the feature threshold Th2, and directly update the pictures that meet the sample picture quality to the sample library, thereby eliminating the collection work of the operation and maintenance personnel, which not only reduces the workload of the operation and maintenance personnel, but also effectively avoids the backlog of update tasks. At the same time, through wheel PK, the best working condition pictures are screened out as sample pictures of the sample library. DETAILED DESCRIPTION
[0028] In order to better understand the present invention, the present invention is further described below in conjunction with specific embodiments.
[0029] Example 1
[0030] In this embodiment, a method for screening collected pictures under working conditions is disclosed, comprising the following steps:
[0031] S1: Search all recognition tasks for the sample images to be replaced and sort them;
[0032] S2: Sequentially extract the features of the working condition pictures corresponding to the pictures to be replaced taken in the recognition task, and calculate the similarity between the working condition pictures taken under the working condition and the sample pictures in the sample library corresponding to the pictures to be replaced, and compare the similarity results with the similarity threshold Th1, and process them as follows;
[0033] 2-1: If the similarity is greater than or equal to the set similarity threshold Th1, further count the feature quantities in the working condition picture and compare the feature quantities with the feature quantity threshold Th2;
[0034] a. If the feature quantity is greater than or equal to the feature quantity threshold Th2, the working condition picture is used to replace the original sample picture in the sample library as a new sample picture;
[0035] b. If the feature value is less than the feature value threshold Th2, the working condition picture is discarded;
[0036] 2-2: If the similarity is less than the set similarity threshold Th1, the working condition picture is pushed to the operation and maintenance personnel to request manual intervention;
[0037] a. If it is determined that the low similarity of the working condition picture is due to significant changes in the packaging, then confirm that the working condition picture will replace the original sample picture in the sample library as the new sample picture;
[0038] b. If it is determined that the change is not caused by a significant change in the packaging, the sample images are collected manually and updated into the sample library as new sample images;
[0039] S3: follow the method in S2 and try all the working condition pictures in the sequence in S1;
[0040] S4: Obtain the updated sample library.
[0041] Further preferably, the similarity threshold Th1 is obtained in the following manner:
[0042] X1: Search for the recognition tasks that contain the sample images to be replaced in all recognition tasks, and respectively establish the sample feature distribution curves Tn (n=1, 2, 3, ... n is an integer) of the images taken under various working conditions of the images to be replaced and the sample feature distribution curves T0 of the sample images originally preset in the system;
[0043] X2: Calculate the similarity between Tn and T0;
[0044] X3: Take the average of the similarity values obtained in X2 as the similarity threshold Th1.
[0045] Further preferably, the cosine similarity algorithm is used in X2 to obtain the similarity between Tn and T0.
[0046] As a preferred technical solution, through the similarity between Tn and T0 of samples of different categories, machine learning is used to obtain a comprehensive similarity threshold Th1 (general) applicable to all categories of samples.
[0047] Preferably, the feature value threshold Th2 = the feature value of the original sample image in the sample library × 80%.
[0048] Specifically, in this embodiment, we take the sample image to be replaced as the A packaging surface image as an example to specifically illustrate the method disclosed in the present invention for finding the A packaging surface image under the optimal working condition as the sample image.
[0049] First, collect 100 working condition pictures taken by the recognition station of the replaced A packaging surface.
[0050] Then, we build a sample feature distribution curve diagram of the original sample image and the 100 images.
[0051] Finally, the cosine similarity algorithm is used to obtain the similarity between each working condition picture and the original sample corresponding to the A surface; and the similarity threshold Th1 is determined.
[0052] After obtaining the similarity threshold Th1, the first operating condition picture is further judged according to the method in S2 above; after S2, the first operating condition picture does not meet the requirement of the feature value threshold Th2 and is therefore discarded.
[0053] Continue to judge the second working condition picture in the manner of S2. After S2, the second working condition picture satisfies the requirements of Th1 and Th2 at the same time, and the second working condition picture is replaced with the sample picture in the sample library.
[0054] The third working condition picture is judged in the same manner as in S2, and the sample picture used for comparison is the replacement picture from the second working condition picture mentioned above. After comparison, the third working condition picture does not meet the requirements of Th2, and is therefore discarded.
[0055] The fourth working condition picture is judged in the same manner as in S2. At this time, the sample picture used for comparison is the replacement picture from the second working condition picture. After comparison, the fourth working condition picture satisfies the requirements of both Th1 and Th2, and the fourth working condition picture is replaced with the sample picture in the sample library.
[0056] According to the above method, until all 100 working condition pictures of the replaced A packaging surface taken by the recognition station under the working condition are judged, the optimal sample library update sample pictures are obtained.
[0057] 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 method for screening collected pictures under working conditions, characterized in that: The following steps are involved: S1: Search all recognition tasks for the sample images to be replaced and sort them; S2: Sequentially extract the features of the working condition pictures corresponding to the pictures to be replaced taken in the recognition task, and calculate the similarity between the working condition pictures taken under the working condition and the sample pictures in the sample library corresponding to the pictures to be replaced, and compare the similarity results with the similarity threshold Th1, and process them as follows; 2-1: If the similarity is greater than or equal to the set similarity threshold Th1, further count the feature quantities in the working condition picture and compare the feature quantities with the feature quantity threshold Th2; a. If the feature quantity is greater than or equal to the feature quantity threshold Th2, the working condition picture is used to replace the original sample picture in the sample library as a new sample picture; b. If the feature value is less than the feature value threshold Th2, the working condition picture is discarded; 2-2: If the similarity is less than the set similarity threshold Th1, the working condition picture is pushed to the operation and maintenance personnel to request manual intervention; a. If it is determined that the low similarity of the working condition picture is due to significant changes in the packaging, then confirm that the working condition picture will replace the original sample picture in the sample library as the new sample picture; b. If it is determined that the change is not caused by a significant change in the packaging, the sample images are collected manually and updated into the sample library as new sample images; S3: follow the method in S2 and try all the working condition pictures in the sequence in S1; S4: Obtain the updated sample library.
2. The method for screening collected pictures under working conditions according to claim 1, characterized in that: The similarity threshold Th1 is obtained in the following way: X1: Search for the recognition tasks that contain the sample images to be replaced in all recognition tasks, and respectively establish the sample feature distribution curves Tn (n=1, 2, 3, ... n is an integer) of the images taken under various working conditions of the images to be replaced and the sample feature distribution curves T0 of the sample images originally preset in the system; X2: Calculate the similarity between Tn and T0; X3: Take the average of the similarity values obtained in X2 as the similarity threshold Th1.
3. The method for screening collected pictures under working conditions according to claim 2, characterized in that: The cosine similarity algorithm is used in X2 to obtain the similarity between Tn and T0.
4. The method for screening collected pictures under working conditions according to claim 2 or 3, characterized in that: Through the similarity between Tn and T0 of samples of different categories, machine learning is used to obtain a comprehensive similarity threshold Th1 (general) applicable to all categories of samples.
5. The method for screening pictures collected under working conditions according to claim 1, characterized in that: Feature threshold Th2 = feature of the original sample image in the sample library × 80%.
6. The method for screening collected pictures under working conditions according to claim 1, characterized in that: The feature value threshold Th2 is obtained through machine learning.
Citation Information
Patent Citations
Integrated circuit image via identification device based on machine learning
CN107169528A
Deep learning-based parasite egg identification method
CN108805101A