Hospital pharmacy dispensing pure visual checking method

By combining image recognition and information comparison technologies with automatic comparison of drug photos from multiple angles, the accuracy and safety issues of drug dispensing verification in hospital pharmacies have been resolved. This has enabled fully automated drug verification, reduced the risk of human error, and provided full data traceability.

CN122157272APending Publication Date: 2026-06-05NANJING VISIONRIS TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING VISIONRIS TECHNOLOGY CO LTD
Filing Date
2026-04-29
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

The existing methods for verifying medication dispensing in hospital pharmacies rely on manual operation or auxiliary tools, which pose risks of mis-dispensing, omissions, and dosage errors. They cannot achieve fully automated and intelligent verification, especially during peak periods when processing capacity is insufficient and it is difficult to distinguish between similar medications.

Method used

By employing image recognition and information comparison technologies, multi-angle photos of medicines are acquired through camera equipment, the location of medicines is identified using the YOLO object detection model, and visual transformation and optical character recognition are combined to achieve automatic comparison and verification of medicine names.

Benefits of technology

This ensures the accuracy and safety of drug dispensing, reduces the risk of human error, provides full-process traceability, and improves the automation level of drug verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157272A_ABST
    Figure CN122157272A_ABST
Patent Text Reader

Abstract

The application discloses a hospital pharmacy dispensing pure visual checking method, and belongs to the technical field of hospital medicine dispensing checking, and comprises the following steps: connecting two-dimensional code information with a hospital information system to obtain a medicine list; capturing a transparent basket containing prescribed medicines from a vertical top view angle and two side view angles; identifying the positions of the medicines through a YOLO object detection model and cutting out the area corresponding to each medicine to obtain a detection frame picture; grouping and matching to obtain a picture combination containing three pictures; performing visual transformation recognition to obtain a visual transformation recognition result, and performing optical character recognition on the picture combination to obtain an optical character recognition result; and comparing all obtained final medicine name recognition results with the medicine list to output a checking result. The application can ensure the accuracy and safety of medicine dispensing by combining image recognition and information comparison technology, and reduce the error risk caused by manual checking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a purely visual verification method for dispensing medications in a hospital pharmacy, belonging to the field of hospital medication dispensing verification technology. Background Technology

[0002] In current technologies, medication verification in hospital pharmacies mainly relies on manual operation or auxiliary tools, such as barcode scanning, PDA verification, and smart medicine cabinets. While these methods offer some improvements, they also have significant limitations.

[0003] Limitations of manual verification: Traditional double or single-person verification relies on the pharmacist's experience and attention, and is susceptible to fatigue, emotional fluctuations, and noisy environments, easily leading to mis-dispensing, omissions, or dosage errors. According to industry data, the median error rate for manual dispensing is as high as 0.51‰, reaching 5.0% in single-person mode. For example, when processing thousands of prescriptions during peak periods, labor costs surge (requiring an increase of 60%-80% in pharmacists), making execution difficult and unable to guarantee 100% accuracy. Furthermore, there are visual blind spots in distinguishing similar drugs (such as those with similar appearance, names, and specifications), which can easily lead to serious consequences such as drug poisoning or medication risks. These problems result in patient health damage, medical disputes, and economic losses for hospitals.

[0004] Limitations of auxiliary tools: Barcode scanning relies on print quality and cannot handle barcode-free or bulk injections; while PDAs and smart medicine cabinets improve information acquisition efficiency, verification decisions are still made manually, failing to achieve full-process automation. Existing equipment is mostly complex in mechanical structure, heavy, and has a high failure rate, making it difficult to adapt to 24 / 7 continuous operation, and its recognition speed is slow (average 60 seconds / prescription), unable to handle peak concurrency.

[0005] In summary, existing technologies cannot achieve fully automated and intelligent verification of medicines from dispensing to distribution, and there is a risk of errors caused by manual verification. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a purely visual verification method for dispensing medicines in hospital pharmacies. This method can ensure the accuracy and safety of medicine dispensing by combining image recognition and information comparison technologies, and reduce the risk of errors caused by manual verification.

[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0008] A purely visual verification method for dispensing medications in a hospital pharmacy includes the following steps:

[0009] Obtain the QR code information of the patient's prescription and connect the QR code information with the hospital's information system to obtain the list of drugs corresponding to the prescription;

[0010] The camera device is controlled to take pictures of the transparent basket containing prescription drugs from a top-down view and two side views, resulting in a top-down view photo and two side view photos.

[0011] The top view photo and two side view photos were used to identify the location of the drugs using the YOLO object detection model, and the area corresponding to each drug was cropped to obtain the detection box image.

[0012] The detection box images are grouped and matched, and the detection box images corresponding to the same drug in the three views are grouped into the same group to obtain an image combination containing three images;

[0013] Visual transformation recognition is performed on the image combination to obtain the visual transformation recognition result, and optical character recognition is performed on the image combination to obtain the optical character recognition result. If the optical character recognition result is deemed reliable, the optical character recognition result is used as the final drug name recognition result; otherwise, the visual transformation recognition result is used as the final drug name recognition result.

[0014] The final drug name recognition results are combined and compared with the drug list to output the verification results.

[0015] The process of grouping and matching the detection box images involves grouping single detection box images corresponding to the same drug location in the three viewpoints into the same group, resulting in an image combination containing three images, including:

[0016] First, normalized features are calculated for each detection box in the three views simultaneously:

[0017] The detection boxes corresponding to the intermediate viewpoint are sorted based on normalized features and then segmented by row.

[0018] By using the vertical position matching method, the detection box corresponding to each side view is assigned to the row containing the detection box corresponding to the top view that is closest in vertical position;

[0019] Using an inline matching cost function, we perform one-to-one matching between top-view ROIs and side-view ROIs within the same row and calculate the inline matching cost:

[0020] By using the Hungarian algorithm to solve the minimum weight matching problem in a bipartite graph, the corresponding solution with the minimum total matching cost within the row is obtained, thus achieving accurate matching of ROIs from the top and side views.

[0021] The formula for calculating normalized features is:

[0022] (1);

[0023] in: The coordinates of the top left corner of the detection box. The coordinates of the bottom right corner of the detection box. For the width of the detection frame, For the height of the detection frame, This is the normalized value of the x-coordinate of the center point of the detection box. This is the normalized value of the ordinate of the center point of the detection box. The normalized area of ​​the ROI. It is a very small positive number, used to avoid the denominator being 0.

[0024] During the line-by-line splitting process, if the following formula is satisfied, it is considered a new line:

[0025] (2);

[0026] in, From the top-down perspective The normalized vertical center of each ROI, From the top-down perspective -1 normalized vertical center of ROI, The row segmentation threshold;

[0027] The vertical position matching method uses the nearest_top_cy function, and the specific formula is as follows:

[0028] (3);

[0029] in, For the side-view ROI, The row number that the ROI from the side view is ultimately assigned to. The normalized longitudinal center of the ROI from the side view. From the top-down perspective The normalized vertical center of each ROI, To find the index with the smallest vertical distance among all positive ROIs, To retrieve the row number of the ROI located directly above it.

[0030] The specific formula for the inline matching cost function is as follows:

[0031] (4);

[0032] in, The first line of the line is from the top-down perspective. The ROI and the first row in the side view The matching cost of each ROI. From the top-down perspective The normalized vertical center of each ROI, For the side view The normalized vertical center of each ROI, From the top-down perspective The normalized horizontal center of each ROI. For the side view The normalized horizontal center of each ROI. From the top-down perspective The normalized area of ​​each ROI. For the side view The normalized area of ​​each ROI. To reduce the impact of scale differences, the logarithm of the area is taken. From the top-down perspective The ROIs are numbered in this row after being sorted by their horizontal coordinates. For the side view The ROIs are numbered in this row after being sorted by their horizontal coordinates. The weights for the lateral positional differences, As the weight of the area difference, The weights are the differences in left and right order.

[0033] The step of performing optical character recognition on the image combination to obtain the optical character recognition result includes: after performing optical character recognition on the image combination, matching the optical character recognition result with a pre-stored drug list database to obtain a drug name result with confidence level; if the confidence level reaches a preset value, the optical character recognition result is judged to be reliable.

[0034] The step of performing visual transformation recognition on the image combination to obtain the visual transformation recognition result includes:

[0035] The image combination is subjected to fusion feature recognition and single-view recognition by visual transformation model, and the fusion feature recognition result and three single-view recognition results are obtained. The fusion feature recognition result is used as a vote, and the three single-view recognition results are used as three votes respectively.

[0036] First, calculate the weighted score of each vote for a candidate drug, then sum the weighted scores of all votes for each candidate drug to obtain the total weighted score of the candidate drugs.

[0037] The candidate drug with the highest total weighted score among the candidate drugs is taken as the final drug name identification result.

[0038] The formula for calculating the total weighted score of candidate drugs is as follows:

[0039] (5);

[0040] in, For candidate drug categories Total weighted vote score, For candidate drug categories, To sum all votes cast for that category, For the first The category code predicted by the ticket For the first The confidence level of Zhang's vote For the first The weight corresponding to each vote.

[0041] The formula used to determine the candidate drug with the highest weighted score among the total votes for all candidate drugs as the final drug name identification result is as follows:

[0042] (6);

[0043] in, For the final winning drug category, To find the category with the highest total score among all candidate categories.

[0044] The beneficial effects of this invention are as follows: This invention provides a purely visual verification method for dispensing medication in a hospital pharmacy. It uses a YOLO object detection model to identify the location of medications from a top-view photograph and two side-view photographs, cropping out the corresponding area for each medication to obtain a detection box image. Furthermore, it performs visual transformation recognition on the image combination to obtain the visual transformation recognition result, and performs optical character recognition on the image combination to obtain the optical character recognition result. By combining image recognition and information comparison technologies, it ensures the accuracy and security of medication dispensing and reduces the risk of errors caused by manual verification. The entire process is fully traceable: all images, recognition results, and operation records from each verification are uploaded to the hospital's data server for storage, and the historical records of each verification can be viewed through a unified management interface, enabling full traceability. Attached Figure Description

[0045] Figure 1 This is a flowchart illustrating a purely visual verification method for dispensing medication in a hospital pharmacy, as described in this invention. Detailed Implementation

[0046] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to illustrate the technical solution of the present invention more clearly, and should not be used to limit the scope of protection of the present invention.

[0047] Example 1

[0048] like Figure 1 As shown, this invention discloses a purely visual verification method for dispensing medication in a hospital pharmacy, comprising the following steps:

[0049] Step 1: Obtain the QR code information of the patient's prescription and connect the QR code information with the hospital's information system to obtain the list of drugs corresponding to the prescription.

[0050] Step two: Control the camera equipment to take pictures of the transparent basket containing prescription drugs from a top-down view and two side views, and obtain a top-down view photo and two side view photos.

[0051] Step 3: Use the YOLO object detection model to identify the location of the drugs in the top view photo and the two side view photos, and then crop out the area corresponding to each drug to obtain the detection box image.

[0052] Step four: Group the detection box images and match them together. Group the detection box images that correspond to the same drug position in the three views into the same group to obtain an image combination containing three images.

[0053] Step 5: Perform visual transformation recognition on the image combination to obtain the visual transformation recognition result, and perform optical character recognition on the image combination to obtain the optical character recognition result. If the optical character recognition result is reliable, then the optical character recognition result is used as the final drug name recognition result; otherwise, the visual transformation recognition result is used as the final drug name recognition result.

[0054] Step 6: Combine all the final drug name recognition results and compare them with the drug list to output the verification results.

[0055] This invention can ensure the accuracy and safety of drug dispensing by combining image recognition and information comparison technologies, reducing the risk of errors caused by manual verification; the entire process is traceable with full data recording: all images, recognition results and operation records of each verification will be uploaded to the hospital's data server for storage, and the historical records of each verification can be viewed through a unified management interface, enabling full traceability.

[0056] Example 2

[0057] like Figure 1 As shown, this invention discloses a purely visual verification method for dispensing medication in a hospital pharmacy, comprising the following steps:

[0058] Step one: After the pharmacist places the medicine into a lightweight transparent basket, they first use a front-end barcode scanner to scan the patient's prescription QR code. The industrial control computer immediately reads the QR code information and connects with the hospital information system (hereinafter referred to as the HIS system) through the network to pre-retrieve the list of medicines (name, specifications, quantity) corresponding to the prescription as a benchmark for subsequent comparison.

[0059] Step two involves controlling the camera equipment to capture images of the transparent basket containing prescription drugs from a top-down view and two side views, obtaining a top-down view photo and two side view photos. This invention, based on a purely visual static architecture, achieves fully automated drug dispensing verification. The image acquisition device uses three recognition cameras to simultaneously capture multi-angle images (top-down view, left and right side views), combined with a soft lighting system (using a combination of lamp wick and flat panel lamp cover) to eliminate shadows and ensure no blind spots in the image. Subsequent images are then uploaded in real-time to the central GPU computing pool via an industrial control computer for AI inference, without any mechanical movement delay.

[0060] Step 3: The industrial control computer uploads the photos from the three perspectives to the GPU computing power pool. The top view photo and the two side view photos are used to identify the location of the drugs using the YOLO object detection model and the corresponding area of ​​each drug is cropped out to obtain the detection box (cropped drug rectangle) image.

[0061] Step four involves grouping and matching the detection box images. Detection box images corresponding to the same drug location in the three viewpoints are grouped together to obtain an image combination containing three images. This includes the following steps:

[0062] First, normalized features are calculated for each detection box in the three views simultaneously. The formula for calculating the normalized features is:

[0063] (1);

[0064] in: The coordinates of the top left corner of the detection box. The coordinates are the bottom right corner of the detection frame. The top left corner of the original medicine rectangle before cropping is (0, 0). Rightward / downward coordinates are positive. Therefore, all coordinate values ​​are positive. For the width of the detection frame, For the height of the detection frame, This is the normalized value of the x-coordinate of the center point of the detection box. This is the normalized value of the ordinate of the center point of the detection box. The normalized area of ​​the ROI. It is a very small positive number, used to avoid the denominator being 0.

[0065] The detection boxes corresponding to the intermediate viewpoint are sorted based on normalized features, specifically according to (c y c x Sort the rows (center point from left to right, top to bottom), then split them by row. During the row splitting process, if the following formula is satisfied, it is considered a new row:

[0066] (2);

[0067] in, From the top-down perspective The normalized vertical center of each ROI, From the top-down perspective -1 normalized vertical center of ROI, The above logic divides the column into multiple columns based on vertical parallel lines. If... Within the specified range, multiple medications will be listed in one column.

[0068] By using the vertical position matching method, the detection box corresponding to each side view is assigned to the row containing the detection box corresponding to the top view that is closest in vertical position.

[0069] The vertical position matching method uses the nearest_top_cy function, and the specific formula is as follows:

[0070] (3);

[0071] in, For the side-view ROI, The row number that the ROI from the side view is ultimately assigned to. The normalized longitudinal center of the ROI from the side view. From the top-down perspective The normalized vertical center of each ROI, To find the index with the smallest vertical distance among all positive ROIs, To retrieve the row number of the ROI located directly above it.

[0072] An intra-row matching cost function is used to perform one-to-one matching between top-view ROIs and side-view ROIs within the same row and calculate the intra-row matching cost. The specific formula for the intra-row matching cost function is as follows:

[0073] (4);

[0074] in, The first line of the line is from the top-down perspective. The ROI and the first row in the side view The matching cost of each ROI. From the top-down perspective The normalized vertical center of each ROI, For the side view The normalized vertical center of each ROI, From the top-down perspective The normalized horizontal center of each ROI. For the side view The normalized horizontal center of each ROI. From the top-down perspective The normalized area of ​​each ROI. For the side view The normalized area of ​​each ROI. To reduce the impact of scale differences, the logarithm of the area is taken. From the top-down perspective The ROIs are numbered in this row after being sorted by their horizontal coordinates. For the side view The ROIs are numbered in this row after being sorted by their horizontal coordinates. The weights for the lateral positional differences, As the weight of the area difference, The weights are the differences in left and right order.

[0075] By using the Hungarian algorithm to solve the minimum weight matching problem in a bipartite graph, the corresponding solution with the minimum total matching cost within the row is obtained, thus achieving accurate matching of ROIs from the top and side views.

[0076] Step 5: Perform visual transformation recognition on the image combination to obtain the visual transformation recognition result, and perform optical character recognition on the image combination to obtain the optical character recognition result. If the optical character recognition result is deemed reliable, it is used as the final drug name recognition result; otherwise, the visual transformation recognition result is used as the final drug name recognition result. Optical character recognition (OCR) and transformation model recognition are performed simultaneously. OCR has a veto power: if the OCR recognition is valid, the OCR result is directly adopted and the visual voting result is discarded; if the OCR has no result, the voting result is adopted for output.

[0077] If the confidence level in the optical character recognition result reaches the preset value, the optical character recognition result is considered reliable. The preset value can be set according to the actual situation, such as 90%, 95%, or other values.

[0078] The core principle of optical character recognition (OCR) is to achieve image-to-text conversion through an end-to-end process: locating the region of interest (ROI) through text detection, converting image features into character sequences through text recognition, and post-processing to correct and optimize the results. Specifically, after performing OCR on a combination of images, the results are matched against a pre-stored drug list database to obtain drug names with confidence levels. If the confidence level reaches a preset value, the OCR result is considered reliable.

[0079] Visual transformation recognition is performed on the image combination to obtain the visual transformation recognition result, as follows:

[0080] The image combination is fused using a visual transformation model (integrating overall features from three perspectives) and single-view recognition (independent features from each perspective). The fused feature recognition result and three single-view recognition results are obtained. The fused feature recognition result is used as one vote, and the three single-view recognition results are used as three votes respectively.

[0081] The four recognition results of the visual transformation model (one fusion result and three single-view results, including drug name and confidence score) are weighted and voted on (multi-view and fusion results are assigned weights separately) to give the most likely drug name and final confidence score for each group of images. Currently, there are three types of votes: top view, front and back side views, and fusion view. The current weighting rules are: top = 2.0, side = 1.5 (both sides have the same weight), and fusion = 1.4; the weights can be adjusted in actual operation.

[0082] First, calculate the weighted score of each vote for a candidate drug. Then, sum the weighted scores of all votes for each candidate drug to obtain the total weighted score of the candidate drugs.

[0083] The candidate drug with the highest total weighted score among the candidate drugs is taken as the final drug name identification result.

[0084] The formula for calculating the total weighted score of candidate drugs is as follows:

[0085] (5);

[0086] in, For candidate drug categories Total weighted vote score, For candidate drug categories, To sum all votes cast for that category, For the first The category code predicted by the ticket For the first The confidence level of Zhang's vote For the first The weight corresponding to each vote.

[0087] The formula used to determine the candidate drug with the highest weighted score among the total votes for all candidate drugs as the final drug name identification result is as follows:

[0088] (6);

[0089] in, For the final winning drug category, To find the category with the highest total score among all candidate categories.

[0090] Step Six: Combine all the final drug name recognition results and compare them with the drug list to output the verification results. The final drug name recognition results, along with the traceability code information uploaded by the barcode scanner, are compared in real time with the prescription data pre-fetched by the HIS system. The verification results are displayed on the screen (green boxes indicate correct results, red boxes highlight abnormal results with an audio alarm). The comparison process is as follows: a. Compare the drugs and quantities returned by the model with the prescription drugs and quantities being verified one by one; b. If both the drug code and quantity match, it is considered a success; if the quantity exceeds or is missing, and the missing quantity is a non-prescription drug, it is considered an identification anomaly; c. Summarize the identification results, group them, and then return them for display.

[0091] When discrepancies are found during verification, pharmacists can choose from several options: a. Directly re-verify, allowing the machine to re-verify the medication for correctness; b. After manually verifying that the medication is correct, provide the pharmacist to complete the verification process directly and record it; c. If the pharmacist confirms the medication is incorrect, replace the medication and then re-verify.

[0092] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0093] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0094] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.

[0095] The above description is only a preferred embodiment 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 should also be considered within the scope of protection of the present invention.

Claims

1. A purely visual verification method for dispensing medication in a hospital pharmacy, characterized in that: Includes the following steps: Obtain the QR code information of the patient's prescription and connect the QR code information with the hospital's information system to obtain the list of drugs corresponding to the prescription; The camera equipment is controlled to take pictures of the transparent basket containing prescription drugs from a top-down view and two side views, resulting in a top-down view photo and two side view photos. The top view photo and two side view photos are used to identify the location of drugs using the YOLO object detection model, and the area corresponding to each drug is cropped out to obtain the detection box image. The detection box images are grouped and matched, and the detection box images corresponding to the same drug in the three views are grouped into the same group to obtain an image combination containing three images; Visual transformation recognition is performed on the image combination to obtain the visual transformation recognition result, and optical character recognition is performed on the image combination to obtain the optical character recognition result. If the optical character recognition result is deemed reliable, the optical character recognition result is used as the final drug name recognition result; otherwise, the visual transformation recognition result is used as the final drug name recognition result. The final drug name recognition results are combined and compared with the drug list to output the verification results.

2. The purely visual verification method for dispensing medication in a hospital pharmacy according to claim 1, characterized in that: The process of grouping and matching the detection box images involves grouping single detection box images corresponding to the same drug location in the three viewpoints into the same group, resulting in an image combination containing three images, including: First, normalized features are calculated for each detection box in the three views simultaneously: The detection boxes corresponding to the intermediate viewpoint are sorted based on normalized features and then segmented by row. By using the vertical position matching method, the detection box corresponding to each side view is assigned to the row containing the detection box corresponding to the top view that is closest in vertical position; Using an inline matching cost function, we perform one-to-one matching between top-view ROIs and side-view ROIs within the same row and calculate the inline matching cost: By using the Hungarian algorithm to solve the minimum weight matching problem in a bipartite graph, the corresponding solution with the minimum total matching cost within the row is obtained, thus achieving accurate matching of ROIs from the top and side views.

3. The purely visual verification method for dispensing medication in a hospital pharmacy according to claim 2, characterized in that: The formula for calculating normalized features is: (1); in: The coordinates of the top left corner of the detection box. The coordinates of the bottom right corner of the detection box. For the detection frame width, For the height of the detection frame, This is the normalized value of the x-coordinate of the center point of the detection box. This is the normalized value of the ordinate of the center point of the detection box. The normalized area of ​​the ROI. It is a very small positive number, used to avoid the denominator being 0.

4. The purely visual verification method for dispensing medication in a hospital pharmacy according to claim 2, characterized in that: During the line-by-line splitting process, if the following formula is satisfied, it is considered a new line: (2); in, From the top-down perspective The normalized vertical center of each ROI, From the top-down perspective -1 normalized vertical center of ROI, The row segmentation threshold.

5. The purely visual verification method for dispensing medication in a hospital pharmacy according to claim 2, characterized in that: The vertical position matching method uses the nearest_top_cy function, and the specific formula is as follows: (3); in, For the side-view ROI, The row number that the ROI from the side view is ultimately assigned to. The normalized longitudinal center of the ROI from the side view. From the top-down perspective The normalized vertical center of each ROI, To find the index with the smallest vertical distance among all positive ROIs, To retrieve the row number of the ROI located directly above it.

6. The purely visual verification method for dispensing medication in a hospital pharmacy according to claim 2, characterized in that: The specific formula for the inline matching cost function is as follows: (4); in, The first line of the line is from the top-down perspective. The ROI and the first row in the side view The matching cost of each ROI. From the top-down perspective The normalized vertical center of each ROI, For the side view The normalized vertical center of each ROI, From the top-down perspective The normalized horizontal center of each ROI. For the side view Normalized horizontal center of each ROI From the top-down perspective The normalized area of ​​each ROI. For the side view Normalized area of ​​each ROI To reduce the impact of scale differences, the logarithm of the area is taken. From the top-down perspective The ROIs are numbered in this row after being sorted by their horizontal coordinates. For the side view The ROIs are numbered in this row after being sorted by their horizontal coordinates. The weights for the lateral positional differences, As the weight of the area difference, The weights are the differences in left and right order.

7. The purely visual verification method for dispensing medication in a hospital pharmacy according to claim 1, characterized in that: The step of performing optical character recognition on the image combination to obtain the optical character recognition result includes: after performing optical character recognition on the image combination, matching the optical character recognition result with a pre-stored drug list database to obtain a drug name result with confidence level.

8. The purely visual verification method for dispensing medication in a hospital pharmacy according to claim 1, characterized in that: The step of performing visual transformation recognition on the image combination to obtain the visual transformation recognition result includes: The image combination is subjected to fusion feature recognition and single-view recognition by visual transformation model, and the fusion feature recognition result and three single-view recognition results are obtained. The fusion feature recognition result is used as a vote, and the three single-view recognition results are used as three votes respectively. First, calculate the weighted score of each vote for a candidate drug, then sum the weighted scores of all votes for each candidate drug to obtain the total weighted score of the candidate drugs. The candidate drug with the highest total weighted score among the candidate drugs is taken as the final drug name identification result.

9. The purely visual verification method for dispensing medication in a hospital pharmacy according to claim 8, characterized in that: The formula for calculating the total weighted score of candidate drugs is as follows: (5); in, For candidate drug categories Total weighted vote score, For candidate drug categories, To sum all votes cast for that category, For the first The category code predicted by the ticket For the first The confidence level of Zhang's vote. For the first The weight corresponding to each vote.

10. The purely visual verification method for dispensing medication in a hospital pharmacy according to claim 8, characterized in that: The formula used to determine the candidate drug with the highest weighted score among the total votes for all candidate drugs as the final drug name identification result is as follows: (6); in, For the final winning drug category, To find the category with the highest total score among all candidate categories.