CN116012493B - Image labeling method, device, storage medium and computer equipment - Google Patents

Image labeling method, device, storage medium and computer equipment Download PDF

Info

Publication number
CN116012493B
CN116012493B CN202211726897.7A CN202211726897A CN116012493B CN 116012493 B CN116012493 B CN 116012493B CN 202211726897 A CN202211726897 A CN 202211726897A CN 116012493 B CN116012493 B CN 116012493B
Authority
CN
China
Prior art keywords
image
decomposed
labeling
marked
original image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211726897.7A
Other languages
Chinese (zh)
Other versions
CN116012493A (en
Inventor
卞晓瑜
肖鸣林
黄�俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yida Technology Shanghai Co ltd
Original Assignee
Yida Technology Shanghai Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yida Technology Shanghai Co ltd filed Critical Yida Technology Shanghai Co ltd
Priority to CN202211726897.7A priority Critical patent/CN116012493B/en
Publication of CN116012493A publication Critical patent/CN116012493A/en
Application granted granted Critical
Publication of CN116012493B publication Critical patent/CN116012493B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

According to the image labeling method, device, storage medium and computer equipment, the original image to be labeled and the corresponding template image can be acquired firstly, then the template image is mapped into the original image to obtain each character to be labeled, and each character to be labeled in the original image is cut into a plurality of decomposition images.

Description

Image labeling method, device, storage medium and computer equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to an image labeling method, an image labeling device, a storage medium, and a computer device.
Background
Along with the arrival of informatization and digitalization, more and more realistic scenes have image processing demands, for example, a large number of plate-type documents and pictures in some scenes need to be subjected to character recognition, the internal content is intelligently recognized and extracted for use, the current image processing generally adopts an OCR picture recognition technology, the OCR picture recognition technology consists of a character detection positioning algorithm and a character recognition algorithm, character image information on paper is obtained through the character detection positioning algorithm, and then the character image information is converted into a usable computer input technology through the character recognition algorithm.
However, in the OCR picture recognition technology, a whole picture is required to be displayed for marking the position and attribute of the text, and text recognition marks the content of the text on the basis of positioning, and due to the popularization of the current mobile shooting micro device, common important licenses such as identity cards, drivers' licenses, business licenses, notes and the like are caused, and in the image marking process, the whole picture is easily stolen and transmitted by a marking person for image marking, so that great security and privacy challenges exist, and the risk of information disclosure is easily caused only by marking the whole picture.
Disclosure of Invention
The application aims to at least solve one of the technical defects, in particular to the technical defects that in the image marking process in the prior art, the whole image is displayed and easily taken by marking personnel for image marking and transmitted, and the risk of information disclosure is easily caused due to great security and privacy challenges.
The application provides an image labeling method, which comprises the following steps:
Acquiring an original image to be annotated and a template image corresponding to the original image, wherein the template image comprises a plurality of positions and attribute information corresponding to annotated characters;
acquiring a plurality of characters to be marked of the original image and the position and attribute information of each character to be marked based on the position and attribute information corresponding to each marking character in the template image;
Cutting each word to be marked in the original image based on the position of each word to be marked to obtain a plurality of decomposition images, and randomly distributing each decomposition image and attribute information corresponding to the word to be marked in each decomposition image to marking personnel;
Receiving labeling results of labeling each decomposed image according to the attribute information of each decomposed image by a labeling person, and storing the labeling results in an image data set;
And obtaining a plurality of decomposition images corresponding to each character to be annotated in the original image from the image data set, and merging the decomposition images into the original image to obtain the annotation image.
Optionally, the acquiring a template image corresponding to the original image includes:
extracting image features of the original image, and respectively carrying out feature matching on the image features and each template image in a template image set to obtain a template image corresponding to the original image;
The template images are stored in a plurality of template images which contain the position and attribute information of the marked characters in advance.
Optionally, before the step of obtaining the plurality of characters to be annotated and the position and attribute information of each character to be annotated of the original image based on the position and attribute information corresponding to each annotation character in the template image, the method further includes:
and carrying out blurring processing on the original image to obtain a preprocessed image.
Optionally, the obtaining, based on the position and attribute information corresponding to each labeling word in the template image, the plurality of words to be labeled in the original image and the position and attribute information of each word to be labeled includes:
Comparing the preprocessing image with the template image based on the position and attribute information corresponding to each marked word in the template image to obtain word parameters of the preprocessing image, wherein the word parameters comprise the position and attribute information of each word to be marked in the preprocessing image;
And mapping the original image according to the character parameters to obtain a plurality of characters to be marked in the original image and position and attribute information of each character to be marked.
Optionally, the cutting each word to be marked in the original image based on the position of each word to be marked to obtain a plurality of decomposed images includes:
Determining four vertex coordinates of each character to be marked in the original image based on the position of the character to be marked;
Connecting the vertex coordinates to obtain a rectangular area corresponding to the text to be marked;
and cutting the rectangular area in the original image to obtain a decomposed image containing the characters to be marked.
Optionally, the receiving the labeling result of labeling each decomposed image by the labeling personnel according to the attribute information of each decomposed image, and storing the labeling result in an image data set, including:
receiving a labeling result obtained by labeling each decomposed image according to the attribute information of each decomposed image by a labeling person;
And adding corresponding identification marks to each marked decomposed image, and storing the identification marks in an image data set, wherein the identification marks comprise association information between any decomposed image and an original image where the decomposed image is positioned.
Optionally, the obtaining a plurality of decomposed images corresponding to each text to be annotated in the original image from the image dataset, and merging the decomposed images into the original image to obtain an annotated image includes:
acquiring the identity of the original image, and searching in the image dataset according to the identity to obtain a plurality of decomposed images corresponding to the identity;
And merging each decomposition image corresponding to the identity mark into the original image to obtain a labeling image.
The application also provides an image labeling device, which comprises:
The image acquisition module is used for acquiring an original image to be annotated and a template image corresponding to the original image, wherein the template image comprises a plurality of positions and attribute information corresponding to the annotated characters;
The image mapping module is used for acquiring a plurality of characters to be marked corresponding to the original image and the position and attribute information of each character to be marked based on the position and attribute information corresponding to each marked character in the template image;
The image cutting module is used for cutting each word to be marked in the original image based on the position of each word to be marked to obtain a plurality of decomposed images, and randomly distributing each decomposed image and attribute information corresponding to the word to be marked in each decomposed image to a marking person;
the image labeling module is used for receiving labeling results obtained by labeling each decomposed image according to the attribute information of each decomposed image by a labeling person and storing the labeling results in an image data set;
And the image merging module is used for acquiring a plurality of decomposed images corresponding to each character to be annotated in the original image from the image data set, and merging the decomposed images into the original image to obtain an annotated image.
The present application also provides a storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the image annotation method according to any of the above embodiments.
The present application also provides a computer device comprising: one or more processors, and memory;
The memory has stored therein computer readable instructions which, when executed by the one or more processors, perform the steps of the image annotation method according to any of the above embodiments.
From the above technical solutions, the embodiment of the present application has the following advantages:
The image labeling method, the device, the storage medium and the computer equipment provided by the application can acquire the original image to be labeled and the template image corresponding to the original image before labeling the original image, so that the corresponding characters to be labeled and the position and attribute information thereof in the original image are obtained by mapping the positions corresponding to the labeling characters in the template image and the attribute information in the original image, then the characters to be labeled in the original image can be cut according to the position of each character to be labeled to acquire a plurality of decomposed images, only partial areas of the image can be displayed when the characters of the original image are labeled, the risk of data information leakage of the whole image is avoided, after the plurality of decomposed images are acquired, each decomposed image and the corresponding attribute are randomly distributed to a label person, the decomposed image in the same image is ensured not to be continuously labeled, the joint information of the whole image is not to be acquired, finally the label person can store the labeling result of each decomposed image in the original image according to the corresponding attribute information, the unified label can be stored in the image data, the decomposed image can be obtained when the whole image is labeled, and the original image is labeled in the unified, and the original image can be labeled, and the label image can be obtained. The method and the device map the position and attribute information of each character to be marked in the original image by using the template image, cut and generate the decomposed image, and combine the decomposed image into the large image after marking the decomposed image, and finish image marking in the whole course without the whole original image, thereby improving the safety and the privacy data protection capability of the image marking process.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained from these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a schematic flow chart of an image labeling method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an image labeling device according to an embodiment of the present application;
fig. 3 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Along with the arrival of informatization and digitalization, more and more realistic scenes have image processing demands, for example, a large number of plate-type documents and pictures in some scenes need to be subjected to character recognition, the internal content is intelligently recognized and extracted for use, the current image processing generally adopts an OCR picture recognition technology, the OCR picture recognition technology consists of a character detection positioning algorithm and a character recognition algorithm, character image information on paper is obtained through the character detection positioning algorithm, and then the character image information is converted into a usable computer input technology through the character recognition algorithm.
However, in the OCR picture recognition technology, a whole picture is required to be displayed for marking the position and attribute of the text, and text recognition marks the content of the text on the basis of positioning, and due to the popularization of the current mobile shooting micro device, common important licenses such as identity cards, drivers' licenses, business licenses, notes and the like are caused, and in the image marking process, the whole picture is easily stolen and transmitted by a marking person for image marking, so that great security and privacy challenges exist, and the risk of information disclosure is easily caused only by marking the whole picture.
Based on the above, the application provides the following technical scheme, and the specific scheme is as follows:
In one embodiment, as shown in fig. 1, fig. 1 is a schematic flow chart of an image labeling method according to an embodiment of the present application; the application provides an image labeling method, which specifically comprises the following steps:
s110: and acquiring an original image to be annotated and a template image corresponding to the original image.
In the step, when a user needs to send the personal certificate image to the background of the labeling system to make labeling personnel carry out image labeling, the certificate image to be labeled can be uploaded to an interactive interface of the labeling system in the form of an original image, and when the system receives the original image uploaded by the user, a template image corresponding to the certificate type of the original image can be obtained from the system according to the original image.
The original images can be of various types, such as identity cards, drivers' licenses, business licenses and passports, and also can be of value-added tax general invoices, taxi tickets and the like, for each type of original image, template images of corresponding types are stored in the system in advance, and each template image is preprocessed before being stored, so that information leakage on the template images is prevented.
It can be understood that labeling the original image specifically refers to labeling each word to be labeled in the original image with an attribute, and each labeled word in the template image has been labeled with position and attribute information in advance in the template image, so as to map the related information of each labeled word to each word to be labeled in the original image, where the type of the word to be labeled may be chinese, english or numerical, and is not limited herein.
For example, when a user uploads the front side of an id card as an original image to the labeling system, the system obtains a corresponding template image according to the type of the original image, where the template image is the front side of the id card as well as the original image, and the position and attribute of each labeled text are displayed on the template image, which are "key of the issuing machine", "value of the issuing authority", "valid period key" and "valid period limit value", respectively.
S120: and acquiring a plurality of characters to be marked of the original image and the position and attribute information of each character to be marked based on the position and attribute information corresponding to each marked character in the template image.
In this step, after the original image to be annotated and the template image corresponding to the original image are obtained in step S110, the original image may be mapped according to the position and attribute information of each annotated word in the template image, so as to obtain a plurality of words to be annotated in the original image and the position and attribute information of each word to be annotated.
Specifically, in the process of acquiring a plurality of characters to be marked and the position and attribute information of each character to be marked of an original image, the original image can be processed, the image size is adjusted to be consistent with that of a template image, and the original image and the template image are overlapped through comparison so as to map the information of each character to be marked on the template image to the original image, thereby obtaining the plurality of characters to be marked of the original image and the position and attribute information of each character to be marked.
When the size of the original image is adjusted to be consistent with that of the template image, the edge part of the original image except the certificate can be cut, only the certificate part is reserved, and in the size adjustment process, the methods of angle rotation, amplification, shrinkage, proportion adjustment and the like can be adopted, so that position deviation in the information mapping process is avoided, and the subsequent processing is facilitated.
S130: based on the position of each word to be marked, cutting each word to be marked in the original image to obtain a plurality of decomposition images, and randomly distributing each decomposition image and attribute information corresponding to the word to be marked in each decomposition image to a marking person.
In this step, after obtaining the plurality of characters to be marked and the position and attribute information of each character to be marked in the original image in step S120, each character to be marked may be cut in the original image according to the position of each character to be marked, so as to obtain a plurality of decomposed images, where each decomposed image includes one character to be marked.
Specifically, in the process of cutting an original image, a plurality of pixel position points of each character to be marked can be obtained first, the pixel position points are connected along to obtain a pixel area covering the corresponding character to be marked, and then the pixel area can be cut out, so that a plurality of decomposed images formed by any character to be marked are obtained.
Further, after all the decomposed images are acquired, all the decomposed images are required to be sent to a background of a labeling system, labeling personnel perform attribute labeling on characters to be labeled of each decomposed image, before each decomposed image and corresponding attribute information are distributed to labeling personnel for labeling, each decomposed image can be scattered and then distributed to each labeling personnel at random, the fact that the same labeling personnel cannot label the decomposed images in the same original image continuously is guaranteed, and therefore joint information of the whole original image cannot be acquired.
For example, the background of the labeling system receives two decomposed images cut by the original images, namely A1, A2, A3, B1, B2 and B3, and can break up six decomposed images and randomly distribute the images to three labeling staff C1, C2 and C3, and at this time, the labeling staff C1 labels the decomposed images A1 and B2, the labeling staff C2 labels the decomposed images A3 and B3, and the labeling staff C3 labels the decomposed images A2 and B1.
It can be understood that when the original images processed by the labeling system are more, and the decomposed images to be cut in the original images are more, the data can be more scattered when the decomposed images are randomly distributed to labeling personnel for labeling, and the probability that the same original image continuously appears on the hands of the same labeling personnel is lower, so that the safety of the data is improved.
S140: and receiving the labeling result of labeling each decomposed image by a labeling person according to the attribute information of each decomposed image, and storing the labeling result in an image data set.
In this step, after each decomposition image and attribute information corresponding to the text to be annotated in each decomposition image are randomly distributed to the annotators in step S130, the annotators can annotate the decomposition images according to the distributed decomposition images and the corresponding attribute information, and after the annotation is finished, the annotated decomposition images can be returned to the background of the annotation system, so that the annotation system stores the annotated decomposition images in the image dataset.
Further, when labeling the decomposed image, the labeling personnel can adopt an OCR algorithm, the core of the OCR algorithm mainly comprises a character detection algorithm and a character recognition algorithm, the whole decomposed image is scanned through the character detection algorithm so as to lock the position of the character to be labeled in the decomposed image, the outline of the character to be labeled is depicted, and then the character to be labeled can be recognized through the character recognition algorithm so as to label the recognized character content and the corresponding attribute by the labeling personnel.
It can be understood that the image dataset stores segmented images already marked in different original images, and each decomposed image from the same original image has an association, so that when the marked image corresponding to the original image is obtained, the corresponding decomposed image can be directly inquired from the image dataset for application, further, in order to prevent the system pressure caused by data accumulation in the image dataset, and meanwhile, in order to protect the information security of the original image in the history, the marking system can clean the image data in the image dataset at regular time.
S150: and obtaining a plurality of decomposition images corresponding to each character to be annotated in the original image from the image data set, and merging the decomposition images into the original image to obtain the annotated image.
In this step, after the labeling result of the decomposed image is stored in the image dataset through step S140, when the user needs to obtain the labeled image of the original image, the user can directly search in the image dataset according to the association information of the original image and the decomposed image, so as to obtain a plurality of corresponding decomposed images, and the decomposed images obtained by searching are combined into the original image, so that the corresponding labeled image can be obtained.
It can be understood that no matter the user or the labeling person can browse the decomposed images in the image data set so as to meet the privacy protection requirement of the user, the data are protected, and in the process of dividing the original image into a plurality of decomposed images, each decomposed image still retains the associated information with the original image, so that when the user needs to acquire the labeled image, the labeling system can search the corresponding decomposed image in the image data set according to the associated information, and the synthesis efficiency of the labeled image is improved.
In the above embodiment, before the original image is annotated, the original image to be annotated and the template image corresponding to the original image may be obtained first, so that the corresponding text to be annotated and the position and attribute information thereof in the original image are mapped according to the positions corresponding to the plurality of annotated characters in the template image, so as to obtain the corresponding text to be annotated and the position and attribute information thereof in the original image, then each text to be annotated in the original image according to the position of each text to be annotated may be cut, so as to obtain a plurality of decomposed images, so that only a partial region of the image may be displayed when the original image is annotated, the risk of data information leakage in the whole image may be avoided, after the plurality of decomposed images are obtained, each decomposed image and the corresponding attribute may be randomly distributed to a annotator, so that the same person may not continuously annotate the decomposed image in the same image, so that the joint information of the whole image may not be obtained, and finally after the annotator each decomposed image is annotated according to the corresponding attribute information, the unified image may be stored in the original image, so that the whole decomposed image may be obtained when the whole image is annotated, and the corresponding to the original image is annotated, and the unified image may be obtained. The method and the device map the position and attribute information of each character to be marked in the original image by using the template image, cut and generate the decomposed image, and combine the decomposed image into the large image after marking the decomposed image, and finish image marking in the whole course without the whole original image, thereby improving the safety and the privacy data protection capability of the image marking process.
In one embodiment, the acquiring the template image corresponding to the original image in step S110 may include:
S111: extracting image features of an original image, and respectively carrying out feature matching on the image features and each template image in a template image set to obtain a template image corresponding to the original image.
The template images are stored in advance, and the template images comprise the positions and attribute information of the marked characters.
In this embodiment, after the labeling system receives the original image to be labeled uploaded by the user, the image features of the original image may be extracted, and then the image features are respectively matched with each template image in the template image set to obtain a template image successfully matched in the template image set, and the template image is used as the template image corresponding to the original image.
In order to protect data information in an original image and quickly lock attributes of characters to be marked in the original image, a plurality of template images containing positions and attribute information of the marked characters can be stored in a template image set in advance, and the attributes of the marked characters in each template image can be marked in advance through an OCR algorithm so as to be used as a reference template in the marking process of the original image.
Specifically, when the image features of the original image are extracted, the outline of the image features in the original image can be identified through an algorithm, the image features are extracted immediately, the image features have unique characteristics of the original image and are used for distinguishing the image features of other types of original images, and after the image features of the original image are extracted, the image features can be respectively matched with each template image in the template image set, so that the template image corresponding to the original image is obtained.
For example, the image features of the application can be the literal names in the original image, such as in the front of the identity card, the resident identity card in the image is extracted through an algorithm and used as the image features to perform feature matching in the template image set; but also logo graphics in the original image, such as logo graphics in the front of the identification card.
In one embodiment, the method may further comprise:
S160: and carrying out blurring processing on the original image to obtain a preprocessed image.
In this embodiment, before acquiring a plurality of characters to be marked and position and attribute information of each character to be marked of an original image, the original image may be subjected to fuzzy processing to obtain a preprocessed image, so that a subsequent process of acquiring the characters to be marked of the original image according to a template image may be performed in the preprocessed image, thereby preventing data leakage.
In the process of blurring the original image, mosaic processing, blurring processing or pixelation processing may be used to blur the image without affecting the overall composition of the original image, so as to hide specific information of the text to be marked in the original image, and the image blurring degree may be set in the marking system according to the importance degree and composition of the original image.
When the original image is subjected to the blurring process, the image size of the original image can be adjusted, the edge part except the certificate in the original image can be cut, only the certificate part is reserved, the size of the original image is adjusted by adopting methods of angle rotation, amplification, shrinkage, proportion adjustment and the like according to the proportion of the template image, and the original image is subjected to the blurring process after the adjustment is finished, so that a preprocessed image is obtained.
In one embodiment, the step S120 of obtaining the plurality of characters to be annotated and the position and attribute information of each character to be annotated of the original image based on the position and attribute information corresponding to each annotation character in the template image may include:
S121: and comparing the preprocessed image with the template image based on the position and attribute information corresponding to each marked word in the template image to obtain word parameters of the preprocessed image, wherein the word parameters comprise the position and attribute information of each word to be marked in the preprocessed image.
S122: and mapping the original image according to the character parameters to obtain a plurality of characters to be marked in the original image and the position and attribute information of each character to be marked.
In this embodiment, after the pre-processing image and the template image are obtained, the pre-processing image and the template image may be compared, and the position and attribute information corresponding to each labeling word in the template image may be mapped to the pre-processing image, so as to obtain the word parameters of the pre-processing image, and then the word parameters of the pre-processing image may be mapped to the original image, so as to finally obtain a plurality of words to be labeled in the original image, and the position and attribute information of each word to be labeled.
Specifically, in the process of comparing the preprocessed image with the template image, the preprocessed image and the template image can be subjected to superposition comparison, then the pixel positions of each marked word in the template image are obtained, and each pixel position is projected onto the preprocessed image, so that the positions of each word to be marked in the preprocessed image are obtained, and meanwhile, the corresponding attribute information on each position is obtained.
Further, after the positions of the characters to be marked in the preprocessed image are obtained, the preprocessed image and the corresponding template image can be distributed to the marking personnel, so that the marking personnel marks the attributes on the positions corresponding to the characters to be marked in the preprocessed image according to the positions and the attribute information of each character to be marked in the template image, the attribute information of each character to be marked in the preprocessed image is obtained, and the marking personnel can prevent the data information of the original image from leaking by the attribute marking method in the preprocessed image.
In one embodiment, based on the position of each text to be annotated, in step S130, each text to be annotated is cut in the original image, so as to obtain a plurality of decomposed images, which may include:
S131: and determining four vertex coordinates of each character to be marked in the original image based on the position of the character to be marked.
S132: and connecting the vertex coordinates to obtain a rectangular area corresponding to the text to be marked.
S133: and cutting the rectangular area in the original image to obtain a decomposed image containing the characters to be marked.
In this embodiment, after determining the position of each word to be annotated in the original image, four vertex coordinates corresponding to each word to be annotated in the original image may be obtained, then the four vertex coordinates of each word to be annotated may be connected to obtain a rectangular area corresponding to each word to be annotated, and finally each rectangular area may be cut in the original image, so as to obtain a plurality of decomposed images.
Specifically, when four vertex coordinates corresponding to each text to be marked in the original image are obtained, a rectangular coordinate system can be constructed by taking the lower left corner of the original image as an origin, taking the lower side edge line as an X axis and taking the left side edge line as a Y axis, and the four vertices are converted into vertex coordinates through the projection of the position of each text to be marked in the rectangular coordinate system so as to cut a rectangular area formed by connecting the four vertex coordinates.
For example, after determining the position of the "issuer key" in the front side of the identification card, the labeling system needs to perform cutting to obtain the decomposed image, at this time, a rectangular coordinate system may be constructed on the identification card image, and the position of the "issuer key" is projected into the rectangular coordinate system to obtain four vertex coordinates (X1, Y1), (X2, Y1), (X1, Y2), (X2, Y2), and then the four vertex coordinates may be connected to expand to obtain a rectangular area, and cutting is performed along four sides of the rectangular area, so as to obtain the decomposed image corresponding to the "issuer key".
In one embodiment, in step S140, receiving a labeling result obtained by labeling each decomposed image according to attribute information of each decomposed image by a labeling person, and storing the labeling result in an image data set, may include:
S141: and receiving the labeling result of labeling each decomposed image by a labeling person according to the attribute information of each decomposed image.
S142: and adding corresponding identification marks to each marked decomposed image, and storing the identification marks in an image data set, wherein the identification marks comprise association information between any decomposed image and an original image where the decomposed image is positioned.
In this embodiment, after receiving the labeling result obtained by labeling each decomposed image according to the attribute information of each decomposed image, the labeling personnel may add an identity to each labeled decomposed image according to the corresponding relationship between each decomposed image and the original image, and store the identity in the image dataset.
It can be understood that the image data set stores a plurality of decomposed images of different original images, so after the labeling of the decomposed images is finished, an identity mark needs to be added to the decomposed images and then stored in the image data set, so that the labeled images can be quickly searched when the labeled images are obtained, the synthesis rate of the labeled images is improved, and the identity mark comprises the association information between any decomposed image and the original image where the decomposed image is positioned.
In one embodiment, in step S150, obtaining a plurality of resolved images corresponding to each text to be annotated in the original image from the image dataset, and merging the resolved images into the original image to obtain the annotated image may include:
S151: the identification of the original image is obtained, and searching is carried out in the image data set according to the identification, so that a plurality of decomposition images corresponding to the identification are obtained.
S152: and merging each decomposition image corresponding to the identity mark into the original image to obtain the labeling image.
In this step, when the labeling system returns the labeling result of the original image uploaded by the user, the identity of the original image may be first obtained, and the identity may be input into the image dataset for searching, so as to obtain multiple identities corresponding to the identity in the image dataset and a resolved image where each identity is located, and then the obtained multiple resolved images may be combined into the original image to obtain the labeling image.
It can be understood that the identity of the original image is randomly generated when the user uploads the identity to the labeling system, and the identity can be a character or a serial number, which is not limited herein, and is used for representing the identity information of the original image.
The image labeling device provided by the embodiment of the application is described below, and the image labeling device described below and the image labeling method described above can be referred to correspondingly.
In one embodiment, as shown in fig. 2, fig. 2 is a schematic structural diagram of an image labeling device provided by the present application; the application also provides an image labeling device, which comprises an image acquisition module 210, an image mapping module 220, an image cutting module 230, an image labeling module 240 and an image merging module 250, and specifically comprises the following steps:
the image acquisition module 210 is configured to acquire an original image to be annotated and a template image corresponding to the original image.
The image mapping module 220 is configured to obtain a plurality of characters to be annotated corresponding to the original image and the position and attribute information of each character to be annotated based on the position and attribute information corresponding to each annotation character in the template image.
The image cutting module 230 is configured to cut each word to be marked in the original image based on the position of each word to be marked, obtain a plurality of decomposed images, and randomly distribute each decomposed image and attribute information corresponding to the word to be marked in each decomposed image to the marking personnel.
The image labeling module 240 is configured to receive labeling results obtained by labeling each of the decomposed images according to the attribute information of each of the decomposed images by a labeling person, and store the labeling results in the image dataset.
The image merging module 250 is configured to obtain a plurality of decomposed images corresponding to each text to be annotated in the original image from the image dataset, and merge the decomposed images into the original image to obtain the annotated image.
In the above embodiment, before the original image is annotated, the original image to be annotated and the template image corresponding to the original image may be obtained first, so that the corresponding text to be annotated and the position and attribute information thereof in the original image are mapped according to the positions corresponding to the plurality of annotated characters in the template image, so as to obtain the corresponding text to be annotated and the position and attribute information thereof in the original image, then each text to be annotated in the original image according to the position of each text to be annotated may be cut, so as to obtain a plurality of decomposed images, so that only a partial region of the image may be displayed when the original image is annotated, the risk of data information leakage in the whole image may be avoided, after the plurality of decomposed images are obtained, each decomposed image and the corresponding attribute may be randomly distributed to a annotator, so that the same person may not continuously annotate the decomposed image in the same image, so that the joint information of the whole image may not be obtained, and finally after the annotator each decomposed image is annotated according to the corresponding attribute information, the unified image may be stored in the original image, so that the whole decomposed image may be obtained when the whole image is annotated, and the corresponding to the original image is annotated, and the unified image may be obtained. The method and the device map the position and attribute information of each character to be marked in the original image by using the template image, cut and generate the decomposed image, and combine the decomposed image into the large image after marking the decomposed image, and finish image marking in the whole course without the whole original image, thereby improving the safety and the privacy data protection capability of the image marking process.
In one embodiment, the image acquisition module 210 may include:
The image matching sub-module is used for extracting image features of the original image, and respectively matching the image features with each template image in the template image set to obtain a template image corresponding to the original image;
The template images are stored in advance, and the template images comprise the positions and attribute information of the marked characters.
In one embodiment, the apparatus may further include:
and the image processing module is used for carrying out fuzzy processing on the original image to obtain a preprocessed image.
In one embodiment, the image mapping module 220 may include:
The image comparison sub-module is used for comparing the preprocessed image with the template image based on the position and attribute information corresponding to each marked word in the template image to obtain word parameters of the preprocessed image, wherein the word parameters comprise the position and attribute information of each word to be marked in the preprocessed image.
And the image mapping sub-module is used for carrying out mapping processing on the original image according to the character parameters to obtain a plurality of characters to be marked in the original image and the position and attribute information of each character to be marked.
In one embodiment, the image cutting module 230 may include:
The coordinate determination submodule is used for determining four vertex coordinates of each character to be marked in the original image based on the position of the character to be marked.
And the region acquisition sub-module is used for connecting the vertex coordinates to obtain a rectangular region corresponding to the text to be marked.
And the region cutting sub-module is used for cutting the rectangular region in the original image to obtain a decomposed image containing the characters to be marked.
In one embodiment, the image annotation module 240 may include:
The image labeling sub-module is used for receiving labeling results obtained by labeling each decomposed image according to the attribute information of each decomposed image by a labeling person.
The image storage sub-module is used for adding corresponding identification marks to each marked decomposed image and storing the identification marks in an image data set, wherein the identification marks comprise association information between any decomposed image and an original image where the decomposed image is located.
In one embodiment, the image merging module 250 may include:
The image retrieval sub-module is used for acquiring the identity of the original image and retrieving the image data set according to the identity to obtain a plurality of decomposed images corresponding to the identity.
And the image merging sub-module is used for merging each decomposition image corresponding to the identity mark into the original image to obtain the marked image.
In one embodiment, the present application also provides a storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the image annotation method according to any of the above embodiments.
In one embodiment, the present application also provides a computer device having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the image annotation method according to any of the above embodiments.
Schematically, as shown in fig. 3, fig. 3 is a schematic internal structure of a computer device according to an embodiment of the present application, and the computer device 300 may be provided as a server. Referring to FIG. 3, a computer device 300 includes a processing component 302 that further includes one or more processors, and memory resources represented by memory 301, for storing instructions, such as applications, executable by the processing component 302. The application program stored in the memory 301 may include one or more modules each corresponding to a set of instructions. Further, the processing component 302 is configured to execute instructions to perform the image annotation method of any of the embodiments described above.
The computer device 300 may also include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input output (I/O) interface 305. The computer device 300 may operate based on an operating system stored in the memory 301, such as Windows Server TM, mac OS XTM, unix, linux, free BSDTM, or the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 3 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and may be combined according to needs, and the same similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A method of image annotation, the method comprising:
Acquiring an original image to be annotated and a template image corresponding to the original image, wherein the template image comprises a plurality of positions and attribute information corresponding to annotated characters;
acquiring a plurality of characters to be marked of the original image and the position and attribute information of each character to be marked based on the position and attribute information corresponding to each marking character in the template image;
Cutting each word to be marked in the original image based on the position of each word to be marked to obtain a plurality of decomposition images, and randomly distributing each decomposition image and attribute information corresponding to the word to be marked in each decomposition image to marking personnel;
Receiving labeling results of labeling each decomposed image according to the attribute information of each decomposed image by a labeling person, and storing the labeling results in an image data set;
obtaining a plurality of decomposition images corresponding to each character to be annotated in the original image from the image data set, and merging the decomposition images into the original image to obtain an annotation image;
the receiving the labeling results of labeling each decomposed image according to the attribute information of each decomposed image by the labeling personnel, and storing the labeling results in an image data set, wherein the receiving the labeling results comprise the following steps:
receiving a labeling result obtained by labeling each decomposed image according to the attribute information of each decomposed image by a labeling person;
And adding corresponding identification marks to each marked decomposed image, and storing the identification marks in an image data set, wherein the identification marks comprise association information between any decomposed image and an original image where the decomposed image is positioned.
2. The image labeling method of claim 1, wherein obtaining a template image corresponding to the original image comprises:
extracting image features of the original image, and respectively carrying out feature matching on the image features and each template image in a template image set to obtain a template image corresponding to the original image;
The template images are stored in a plurality of template images which contain the position and attribute information of the marked characters in advance.
3. The image labeling method according to claim 1, further comprising, before the step of acquiring the plurality of words to be labeled of the original image and the position and attribute information of each word to be labeled based on the position and attribute information corresponding to each word to be labeled in the template image:
and carrying out blurring processing on the original image to obtain a preprocessed image.
4. The method for labeling an image according to claim 3, wherein the obtaining a plurality of characters to be labeled in the original image and the position and attribute information of each character to be labeled based on the position and attribute information corresponding to each character to be labeled in the template image comprises:
Comparing the preprocessing image with the template image based on the position and attribute information corresponding to each marked word in the template image to obtain word parameters of the preprocessing image, wherein the word parameters comprise the position and attribute information of each word to be marked in the preprocessing image;
And mapping the original image according to the character parameters to obtain a plurality of characters to be marked in the original image and position and attribute information of each character to be marked.
5. The method for labeling images according to claim 1, wherein the step of cutting each text to be labeled in the original image based on the position of each text to be labeled to obtain a plurality of decomposed images comprises:
Determining four vertex coordinates of each character to be marked in the original image based on the position of the character to be marked;
Connecting the vertex coordinates to obtain a rectangular area corresponding to the text to be marked;
and cutting the rectangular area in the original image to obtain a decomposed image containing the characters to be marked.
6. The method for labeling an image according to claim 1, wherein the obtaining a plurality of decomposed images corresponding to each text to be labeled in the original image from the image dataset and merging the decomposed images into the original image to obtain a labeled image includes:
acquiring the identity of the original image, and searching in the image dataset according to the identity to obtain a plurality of decomposed images corresponding to the identity;
And merging each decomposition image corresponding to the identity mark into the original image to obtain a labeling image.
7. An image marking apparatus, comprising:
The image acquisition module is used for acquiring an original image to be annotated and a template image corresponding to the original image, wherein the template image comprises a plurality of positions and attribute information corresponding to the annotated characters;
The image mapping module is used for acquiring a plurality of characters to be marked corresponding to the original image and the position and attribute information of each character to be marked based on the position and attribute information corresponding to each marked character in the template image;
The image cutting module is used for cutting each word to be marked in the original image based on the position of each word to be marked to obtain a plurality of decomposed images, and randomly distributing each decomposed image and attribute information corresponding to the word to be marked in each decomposed image to a marking person;
the image labeling module is used for receiving labeling results obtained by labeling each decomposed image according to the attribute information of each decomposed image by a labeling person and storing the labeling results in an image data set;
the image merging module is used for acquiring a plurality of decomposed images corresponding to each character to be annotated in the original image from the image data set, and merging the decomposed images into the original image to obtain an annotated image;
Wherein, the image annotation module includes:
receiving a labeling result obtained by labeling each decomposed image according to the attribute information of each decomposed image by a labeling person;
And adding corresponding identification marks to each marked decomposed image, and storing the identification marks in an image data set, wherein the identification marks comprise association information between any decomposed image and an original image where the decomposed image is positioned.
8. A storage medium, characterized by: the storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the image annotation method according to any of claims 1 to 6.
9. A computer device, comprising: one or more processors, and memory;
Stored in the memory are computer readable instructions which, when executed by the one or more processors, perform the steps of the image annotation method according to any of claims 1 to 6.
CN202211726897.7A 2022-12-30 2022-12-30 Image labeling method, device, storage medium and computer equipment Active CN116012493B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211726897.7A CN116012493B (en) 2022-12-30 2022-12-30 Image labeling method, device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211726897.7A CN116012493B (en) 2022-12-30 2022-12-30 Image labeling method, device, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN116012493A CN116012493A (en) 2023-04-25
CN116012493B true CN116012493B (en) 2024-05-24

Family

ID=86036856

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211726897.7A Active CN116012493B (en) 2022-12-30 2022-12-30 Image labeling method, device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN116012493B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117670884A (en) * 2024-01-31 2024-03-08 深圳中科精工科技有限公司 Image labeling method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111325092A (en) * 2019-12-26 2020-06-23 湖南星汉数智科技有限公司 Bullet train ticket identification method and device, computer device and computer readable storage medium
CN111402120A (en) * 2020-03-19 2020-07-10 北京远鉴信息技术有限公司 Method and device for processing annotated image
WO2021057138A1 (en) * 2019-09-27 2021-04-01 支付宝(杭州)信息技术有限公司 Certificate recognition method and apparatus
WO2021184578A1 (en) * 2020-03-17 2021-09-23 平安科技(深圳)有限公司 Ocr-based target field recognition method and apparatus, electronic device, and storage medium
CN113592981A (en) * 2021-07-01 2021-11-02 北京百度网讯科技有限公司 Picture labeling method and device, electronic equipment and storage medium
CN113591580A (en) * 2021-06-30 2021-11-02 北京百度网讯科技有限公司 Image annotation method and device, electronic equipment and storage medium
CN114943695A (en) * 2022-05-11 2022-08-26 郑州市中心医院 Medical sequence image anomaly detection method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021057138A1 (en) * 2019-09-27 2021-04-01 支付宝(杭州)信息技术有限公司 Certificate recognition method and apparatus
CN111325092A (en) * 2019-12-26 2020-06-23 湖南星汉数智科技有限公司 Bullet train ticket identification method and device, computer device and computer readable storage medium
WO2021184578A1 (en) * 2020-03-17 2021-09-23 平安科技(深圳)有限公司 Ocr-based target field recognition method and apparatus, electronic device, and storage medium
CN111402120A (en) * 2020-03-19 2020-07-10 北京远鉴信息技术有限公司 Method and device for processing annotated image
CN113591580A (en) * 2021-06-30 2021-11-02 北京百度网讯科技有限公司 Image annotation method and device, electronic equipment and storage medium
CN113592981A (en) * 2021-07-01 2021-11-02 北京百度网讯科技有限公司 Picture labeling method and device, electronic equipment and storage medium
CN114943695A (en) * 2022-05-11 2022-08-26 郑州市中心医院 Medical sequence image anomaly detection method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN116012493A (en) 2023-04-25

Similar Documents

Publication Publication Date Title
US8645359B2 (en) Providing associations between objects and individuals associated with relevant media items
US7130466B2 (en) System and method for compiling images from a database and comparing the compiled images with known images
US9286392B2 (en) Enhanced search engine
CN110442744A (en) Extract method, apparatus, electronic equipment and the readable medium of target information in image
CN111209411B (en) Document analysis method and device
EP2106599A2 (en) Feature matching method
CN108805787A (en) A kind of method and apparatus that paper document distorts Jianzhen
Iwamura et al. Recognition of multiple characters in a scene image using arrangement of local features
CN116012493B (en) Image labeling method, device, storage medium and computer equipment
JP6882362B2 (en) Systems and methods for identifying images, including identification documents
CN112801099A (en) Image processing method, device, terminal equipment and medium
US20130050765A1 (en) Method and apparatus for document authentication using image comparison on a block-by-block basis
CN112418206B (en) Picture classification method based on position detection model and related equipment thereof
CN114529933A (en) Contract data difference comparison method, device, equipment and medium
CN113936764A (en) Method and system for desensitizing sensitive information in medical report sheet photo
US8539591B2 (en) Document management system, management device, recording medium storing document management program, document management method and data signal
CN112434506A (en) Electronic protocol signing processing method, device, computer equipment and medium
JP5353325B2 (en) Document data generation apparatus and document data generation method
CN115690819A (en) Big data-based identification method and system
CN111047269A (en) Document approval and circulation method of workflow and electronic equipment
CN112989820B (en) Legal document positioning method, device, equipment and storage medium
JP2014186659A (en) Image collation device, image collation method, and image collation program
CN114359918A (en) Bill information extraction method and device and computer equipment
Yamashita et al. A document recognition system and its applications
Chiang et al. From map images to geographic names

Legal Events

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