CN-115761049-B - Picture automatic labeling method, device, equipment and storage medium
Abstract
The application discloses an automatic picture labeling method, device, equipment and storage medium, wherein the method comprises the steps of labeling an original screenshot, and storing labeling information and picture resolution of the original screenshot, wherein the labeling information comprises labeling coordinate positions; the method comprises the steps of identifying text information of an original screenshot, wherein the text information comprises text content and text coordinate positions, obtaining picture resolution of a new screenshot and identifying the text content of the new screenshot to obtain the text information of the new screenshot, calculating a scaling according to the picture resolution of the original screenshot and the new screenshot, obtaining the number of the text content corresponding to the labeling coordinate positions in the original screenshot in the new screenshot by comparing the text content corresponding to the labeling coordinate positions in the original screenshot with the text content in the new screenshot, obtaining labeling information of the new screenshot according to the number of the text content and the scaling, and labeling the new screenshot according to the labeling information of the new screenshot, so that the technical problem of low labeling efficiency of manually labeling pictures in the prior art is solved.
Inventors
- HE GUODONG
- PENG JINCHANG
Assignees
- 阳普医疗科技股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20221123
Claims (7)
- 1. An automatic picture labeling method is characterized by comprising the following steps: labeling the original screenshot, and storing labeling information and picture resolution of the original screenshot, wherein the labeling information comprises labeling coordinate positions; Identifying text information of the original screenshot labels, wherein the text information comprises text content and text coordinate positions; acquiring the picture resolution of a new screenshot and identifying the text content of the new screenshot to obtain the text information of the new screenshot; calculating a scaling ratio according to the picture resolutions of the original screenshot and the new screenshot, and obtaining the existence number of the text content corresponding to the labeling coordinate position in the original screenshot in the new screenshot by comparing the text content corresponding to the labeling coordinate position in the original screenshot with the text content in the new screenshot; Acquiring the annotation information of the new screenshot according to the existing number and the scaling, and annotating the new screenshot according to the annotation information of the new screenshot; the obtaining the annotation information of the new screenshot according to the existing number and the scaling comprises the following steps: When the existing number is smaller than a preset number threshold, calculating the labeling coordinate position of the new screenshot according to the labeling coordinate position of the original screenshot and the scaling to obtain labeling information of the new screenshot; When the existing number is larger than or equal to a preset number threshold, calculating text coordinate positions corresponding to the labeling coordinate positions in the original screenshot and text reference coordinates of the text content in the new screenshot according to the scaling, selecting text coordinate positions closest to the text reference coordinates of the new screenshot from text information in which the new screenshot exists to obtain initial text coordinate positions of the new screenshot, calculating coordinate offset after scaling according to the scaling and coordinate offset between the labeling coordinate positions of the original screenshot and the corresponding text coordinate positions, and adding the corresponding coordinate offset after scaling on the basis of the initial text coordinate positions of the new screenshot to obtain labeling information of the new screenshot.
- 2. The automatic picture labeling method according to claim 1, wherein the identifying the text information of the original screenshot label comprises: Identifying all text contents of the labeling coordinate positions in the original screenshot to obtain text information of the original screenshot labeling; and selecting the text content with the largest area in the text information as the text content corresponding to the labeling coordinate position of the original screenshot.
- 3. The automatic picture labeling method according to claim 2, wherein the selecting the text content with the largest area in the text information as the text content corresponding to the labeling coordinate position of the original screenshot includes: Converting the text coordinate position of the text information into a coordinate of the same type as the labeling coordinate position to obtain a new text coordinate position; calculating a new text area according to the new text coordinates, screening out the new text area smaller than a preset area threshold value, and obtaining a new text area result set; and selecting the text content corresponding to the maximum new text area from the new text area result set as the text content corresponding to the labeling coordinate position of the original screenshot.
- 4. The automatic picture marking method according to claim 1, wherein the marking information further includes a marking text description and a marking graphic type.
- 5. An automatic picture marking device, comprising: the information storage unit is used for marking the original screenshot and storing marking information and picture resolution of the original screenshot, wherein the marking information comprises marking coordinate positions; The text identification unit is used for identifying text information of the original screenshot labels, and the text information comprises text content and text coordinate positions; the information acquisition unit is used for acquiring the picture resolution of the new screenshot and identifying the text content of the new screenshot to obtain the text information of the new screenshot; the calculation unit is used for calculating the scaling according to the picture resolutions of the original screenshot and the new screenshot, and obtaining the existence number of the text content corresponding to the labeling coordinate position in the original screenshot in the new screenshot by comparing the text content corresponding to the labeling coordinate position in the original screenshot with the text content in the new screenshot; The labeling unit is used for acquiring labeling information of the new screenshot according to the existing number and the scaling, and labeling the new screenshot according to the labeling information of the new screenshot; the labeling unit is specifically configured to: When the existing number is smaller than a preset number threshold, calculating the labeling coordinate position of the new screenshot according to the labeling coordinate position of the original screenshot and the scaling to obtain labeling information of the new screenshot; When the existing number is larger than or equal to a preset number threshold, calculating text coordinate positions corresponding to the labeling coordinate positions in the original screenshot and text reference coordinates of the text content in the new screenshot according to the scaling, selecting text coordinate positions closest to the text reference coordinates of the new screenshot from text information in which the new screenshot exists, and obtaining initial text coordinate positions of the new screenshot; and labeling the new screenshot according to the labeling information of the new screenshot.
- 6. An automatic picture marking device is characterized by comprising a processor and a memory; the memory is used for storing program codes and transmitting the program codes to the processor; The processor is configured to perform the automatic picture marking method according to any one of claims 1-4 according to instructions in the program code.
- 7. A computer readable storage medium for storing program code which, when executed by a processor, implements the method for automatic labeling of pictures of any of claims 1-4.
Description
Picture automatic labeling method, device, equipment and storage medium Technical Field The present application relates to the field of image processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for automatically labeling a picture. Background At present, when a medical institution participates in the application level rating of an electronic medical record system, two system function verification materials (hereinafter referred to as verification materials) are required to be submitted, the verification materials are specifically two Word documents, document contents comprise index contents, index specific implementation modes, index verification screenshot and the like, each picture of the index verification screenshot requires picture marking information, according to previous experience, the two verification materials generally comprise more than 500 pictures, even thousands of pictures, the verification screenshot of the two verification materials is generally finished by manually carrying out screenshot by means of a third-party screenshot tool, relevant marking information is manually added, and finally the two verification screenshot of the verification materials is finished. Because the preparation of the verification material needs to last for a plurality of months, and factors such as the verification screenshot which is intercepted and has errors possibly caused by the error understanding of indexes are added, repeated checking and modification of the pictures of the verification screenshot are needed, and the specific operation is that the new annotation information is added in the new screenshot by referring to the annotation information of the original screenshot. The repeated checking and modification of the evidence screenshot are a large number of repeated labeling works, the problem of the evidence screenshot labeling multiplexing of the evidence material is solved in the prior art, labeling information is mainly added manually, a large amount of labor cost and time cost are required to be consumed, and the labeling efficiency is low. Disclosure of Invention The application provides an automatic picture marking method, device, equipment and storage medium, which are used for solving the technical problem of low marking efficiency in the prior art that pictures are marked manually. In view of the above, the first aspect of the present application provides an automatic picture labeling method, which includes: labeling the original screenshot, and storing labeling information and picture resolution of the original screenshot, wherein the labeling information comprises labeling coordinate positions; Identifying text information of the original screenshot labels, wherein the text information comprises text content and text coordinate positions; acquiring the picture resolution of a new screenshot and identifying the text content of the new screenshot to obtain the text information of the new screenshot; calculating a scaling ratio according to the picture resolutions of the original screenshot and the new screenshot, and obtaining the existence number of the text content corresponding to the labeling coordinate position in the original screenshot in the new screenshot by comparing the text content corresponding to the labeling coordinate position in the original screenshot with the text content in the new screenshot; and acquiring the annotation information of the new screenshot according to the existing number and the scaling, and annotating the new screenshot according to the annotation information of the new screenshot. Optionally, the identifying the text information of the original screenshot label includes: Identifying all text contents of the labeling coordinate positions in the original screenshot to obtain text information of the original screenshot labeling; and selecting the text content with the largest area in the text information as the text content corresponding to the labeling coordinate position of the original screenshot. Optionally, the selecting the text content with the largest area in the text information as the text content corresponding to the labeling coordinate position of the original screenshot includes: Converting the text coordinate position of the text information into a coordinate of the same type as the labeling coordinate position to obtain a new text coordinate position; calculating a new text area according to the new text coordinates, screening out the new text area smaller than a preset area threshold value, and obtaining a new text area result set; and selecting the text content corresponding to the maximum new text area from the new text area result set as the text content corresponding to the labeling coordinate position of the original screenshot. Optionally, the obtaining the labeling information of the new screenshot according to the existing number and the scaling includes: When the existing number is