Image labeling method and device, electronic equipment and storage medium
By acquiring a dual-spectral image of the target object and utilizing the hidden infrared marker at the center of the transparent label paper, the image label and label coordinates are automatically identified, solving the problems of low efficiency and high cost of manual labeling and realizing automated image annotation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-10
AI Technical Summary
Current image annotation techniques require manual labeling, which is inefficient and costly.
By acquiring a dual-spectral image of the target object and utilizing the hidden infrared marker at the center of the transparent label paper, the image label and label coordinates are automatically identified, enabling automatic labeling of natural light images.
It improves image annotation efficiency and reduces labor costs.
Smart Images

Figure CN121640466A_ABST
Abstract
Description
Technical Field
[0001] This application relates to image processing technology, and more particularly to an image annotation method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of artificial intelligence technology, intelligent models for image recognition are being used more and more widely. In order to improve the accuracy of the model, a large number of labeled sample images are usually needed to train the model. Therefore, image annotation is an important preliminary task.
[0003] In existing technologies, it is generally necessary to manually label a large number of sample images one by one. However, manual labeling is inefficient and costly. Summary of the Invention
[0004] This application provides an image annotation method, apparatus, electronic device, and storage medium to improve image annotation efficiency and reduce labor costs.
[0005] In a first aspect, embodiments of this application provide an image annotation method, which includes:
[0006] Acquire a dual-spectral image of the target object with a transparent label pasted on the area to be labeled; the transparent label has a hidden infrared marker at the center; the dual-spectral image includes a natural light image and an infrared light image;
[0007] Infrared markers in infrared images are identified to obtain image labels and label coordinates;
[0008] The natural light image is labeled based on the image label and label coordinates to obtain a labeled image.
[0009] Secondly, embodiments of this application also provide an image annotation apparatus, which includes:
[0010] The dual-spectral image acquisition module is used to acquire a dual-spectral image of a target object with a transparent label pasted on the area to be labeled; the transparent label has a hidden infrared mark in the center; the dual-spectral image includes a natural light image and an infrared light image;
[0011] The infrared image recognition module is used to identify infrared markers in infrared images and obtain image labels and label coordinates.
[0012] The natural light image labeling module is used to label natural light images based on image labels and label coordinates, resulting in labeled images.
[0013] Thirdly, embodiments of this application also provide an electronic device, which includes:
[0014] One or more processors;
[0015] Storage device for storing one or more programs;
[0016] When one or more programs are executed by one or more processors, the one or more processors implement any of the image annotation methods provided in the embodiments of this application.
[0017] Fourthly, embodiments of this application also provide a storage medium including computer-executable instructions, which, when executed by a computer processor, are used to perform any of the image annotation methods provided in embodiments of this application.
[0018] Fifthly, embodiments of this application also provide a computer program product including a computer program, which, when executed by a processor, is used to perform any of the image annotation methods provided in embodiments of this application.
[0019] This application acquires a dual-spectral image of a target object with a transparent label pasted on its area. The transparent label contains a hidden infrared marker at its center. The label's transparency does not affect image quality. Furthermore, because the label on the target object contains this hidden infrared marker, the image label and its coordinates can be automatically identified, providing a data foundation for subsequent automatic identification. The dual-spectral image includes a natural light image and an infrared light image. The infrared marker in the infrared light image is identified to obtain the image label and its coordinates. Automatic identification of the image label and its coordinates eliminates the need for manual annotation, reducing labor costs. Based on the image label and its coordinates, the natural light image is annotated to obtain a labeled image, achieving automatic annotation of the natural light image and improving image annotation efficiency. Therefore, the technical solution of this application solves the problems of low efficiency and high labor costs associated with manual annotation, achieving the effect of improving image annotation efficiency and reducing labor costs. Attached Figure Description
[0020] Figure 1 This is a flowchart of an image annotation method according to Embodiment 1 of this application;
[0021] Figure 2 This is a flowchart of an image annotation method according to Embodiment 2 of this application;
[0022] Figure 3 This is a schematic diagram of the structure of an image annotation device according to Embodiment 3 of this application;
[0023] Figure 4 This is a schematic diagram of the structure of an electronic device according to Embodiment 4 of this application. Detailed Implementation
[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first" and "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] Example 1
[0027] Figure 1 This is a flowchart of an image annotation method provided in Embodiment 1 of this application. This embodiment is applicable to the acquisition of labeled sample images. The method can be executed by an image annotation device, which can be implemented in software and / or hardware.
[0028] See Figure 1 The image annotation method shown includes the following steps:
[0029] S110. Obtain a dual-spectral image of the target object with a transparent label pasted on the area to be labeled; the transparent label has a hidden infrared mark in the center; the dual-spectral image includes a natural light image and an infrared light image.
[0030] Dual-spectral images can be image data acquired simultaneously using visible light and infrared imaging techniques. Dual-spectral images include natural light images and infrared light images. Natural light images can be images captured using natural light, and infrared light images can be images captured using infrared imaging techniques. Infrared tags can be image labels marked using infrared technology. In an optional embodiment, the dual-spectral image is captured using a dual-spectral camera device equipped with both natural light and infrared light capabilities.
[0031] Transparent labels can be made of transparent material and contain a hidden infrared identifier in the center. This identifier can be identified using infrared sensing technology. The transparent label can be pre-attached to the area of the target object to be marked, and then the target object can be photographed using a camera equipped with both natural light and infrared light to obtain a dual-spectrum image.
[0032] For example, in the field of Traditional Chinese Medicine, the area to be labeled can be an acupoint area, and the target object can be the hand. Professional medical staff can then attach transparent labels with hidden acupoint markings to the acupoint areas of the hand, and then a photographer can take pictures of the hand from multiple angles to obtain a bispectral image of the target object with the transparent label attached to the area to be labeled.
[0033] S120. Identify the infrared markers in the infrared light image to obtain the image label and label coordinates.
[0034] Image labels can be labels for the regions to be labeled, and can be determined by the user. For example, if the region to be labeled is an acupoint region, the image label can be the name of the acupoint. Label coordinates can be the coordinates of the center of the image label in the bispectral image.
[0035] For example, an infrared sensor is used to develop and read the infrared marker in an infrared light image. The infrared marker can be an encoded image identifier, which is then parsed to obtain an image label. For example, the infrared marker can be a QR code, a dot matrix code, or other encoding formats; this application does not specifically limit this. Since the infrared marker is located at the center of the transparent label paper, the label position can be quickly located using models such as YOLO (a technical term, a target detection algorithm), and the center point coordinates can be extracted as the label coordinates.
[0036] S130. Label the natural light image according to the image label and label coordinates to obtain a labeled image.
[0037] By associating image labels and label coordinates with natural light images, the natural light images can be labeled to obtain labeled images.
[0038] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data comply with the relevant laws, regulations and standards of the relevant regions.
[0039] The technical solution of this embodiment acquires a dual-spectral image of a target object with a transparent label pasted on its area to be labeled. The transparent label has a hidden infrared marker at its center. The label's transparency does not affect image quality. Since the label on the target object contains the hidden infrared marker, the image label and its coordinates can be automatically identified, providing a data foundation for subsequent automatic identification. The dual-spectral image includes a natural light image and an infrared light image. The infrared marker in the infrared light image is identified to obtain the image label and its coordinates. Automatic identification of the image label and its coordinates eliminates the need for manual annotation, reducing labor costs. Based on the image label and its coordinates, the natural light image is annotated to obtain a labeled image, achieving automatic annotation of the natural light image and improving image annotation efficiency. Therefore, the technical solution of this application solves the problems of low efficiency and high labor costs associated with manual labeling, achieving the effect of improving image labeling efficiency and reducing labor costs.
[0040] Example 2
[0041] Figure 2 This is a flowchart of an image annotation method provided in Embodiment 2 of this application. The technical solution of this embodiment is further refined based on the above technical solution.
[0042] Furthermore, the process of "identifying infrared markers in infrared light images to obtain image labels and label coordinates" is further refined to: "analyzing infrared markers in infrared light images to obtain image labels; identifying the coordinates of the center point of infrared markers in infrared light images to obtain label coordinates," in order to obtain image labels and label coordinates.
[0043] See Figure 2 An image annotation method is shown, including:
[0044] S210. Obtain a dual-spectral image of the target object with a transparent label pasted on the area to be labeled; the transparent label has a hidden infrared mark in the center; the dual-spectral image includes a natural light image and an infrared light image.
[0045] In an optional embodiment, before acquiring the bispectral image of the area to be labeled with the transparent label pasted on it, the method further includes: acquiring the image label input by the user; generating a label identifier for the image label; establishing a matching relationship between the image label and the label identifier, and storing it in a preset label library.
[0046] Image labels are input by the user and used to generate tag identifiers. Tag identifiers can be image identifiers such as QR codes or dot matrix codes. A preset image generation algorithm can be used to generate tag identifiers based on the image labels. A preset tag library stores the matching relationships between image labels and tag identifiers to facilitate subsequent identification of image labels based on the identified tag identifiers.
[0047] By acquiring image tags input by the user; generating tag identifiers for the image tags; establishing a matching relationship between image tags and tag identifiers and storing them in a preset tag library, the matching relationship between image tags and tag identifiers is stored in advance, which facilitates the determination of image tags after the tag identifiers are identified, and provides a data foundation for the automatic parsing of image tags.
[0048] In an optional embodiment, after generating tag identifiers for image tags, the method further includes:
[0049] The label is added to transparent label paper by infrared-activated ink to create a hidden infrared mark; the center point of the label coincides with the center point of the transparent label paper.
[0050] Infrared-excited ink is a special anti-counterfeiting material. Its core characteristic is that it generates visible light or absorbs / transmits infrared light after being excited by infrared light of a specific wavelength, thereby achieving information concealment or detection. Infrared-excited ink is compatible with rigid transparent materials such as glass, PMMA, PET, and PC, as well as plastic and metal composite surfaces such as ABS, PP, and nylon. Its application relies on screen printing (300-350 mesh screen) and strict process control, and it is particularly valuable in the fields of electronic filtering and anti-counterfeiting packaging. In actual printing, the substrate treatment and ink formulation need to be specifically optimized to ensure infrared transmittance and fluorescence excitation effects.
[0051] By using infrared-excited ink to add labels to transparent label paper, information can be hidden on the transparent label paper, ensuring image quality under natural light and enabling image marking. Infrared labels are labels printed using infrared-excited ink. To facilitate subsequent determination of label coordinates, the center point of the label coincides with the center point of the transparent label paper. The label coordinates can then be directly determined from the center of the label, eliminating the need for additional center point marking and reducing the initial printing workload of the infrared-excited ink.
[0052] S220. Analyze the infrared markers in the infrared light image to obtain the image label.
[0053] Infrared sensors can be used to develop infrared markers in infrared light images, and the developed infrared markers can be decoded to obtain image tags.
[0054] In one optional embodiment, parsing the infrared markers in the infrared light image to obtain image tags includes: identifying the infrared markers in the label paper using an infrared sensing model; decoding the infrared markers to obtain tag identifiers; and matching the tag identifiers based on a preset tag library to obtain image tags.
[0055] Infrared markings on the label paper are developed and identified using an infrared sensing model. The infrared markings are then decoded using a preset decoding algorithm to obtain the label identifier. The candidate label identifiers in a preset label library are traversed, and the candidate image labels corresponding to the candidate label identifiers are selected as image labels. The preset decoding algorithm can be pre-defined and forms a pair with the encoding algorithm used to generate the label identifiers for the image labels; this can be specified by the user, and this application does not impose specific limitations on it.
[0056] The infrared sensor model identifies infrared markings on the label paper; the infrared markings are decoded to obtain the label markings; based on a preset label library, the label markings are matched to obtain image labels. The image labels can be automatically parsed from the infrared markings and then directly added to natural light images without the need for manual annotation, thus reducing labor costs and improving annotation efficiency.
[0057] S230. Identify the coordinates of the center point of the infrared tag in the infrared light image to obtain the tag coordinates.
[0058] The target recognition model can identify the area of the infrared tag, thereby quickly locating the center point of the outer tag and determining its coordinates, i.e., the tag coordinates.
[0059] In one optional embodiment, identifying the coordinates of the center point of the infrared marker in the infrared light image to obtain the tag coordinates includes: determining the marker outline of the infrared marker through a target recognition model; and determining the coordinates of the center point of the marker outline to obtain the tag coordinates.
[0060] The marker outline, or the outline of the area where the infrared marker is located, is used to determine the tag coordinates. The target recognition model can be a deep learning model that can quickly segment the marker outline of the area where the infrared marker is located, and then determine the coordinates of the center point of the marker outline, using the coordinates of the center point as the tag coordinates. For example, the target recognition model can be a YOLO (a technical term for a target recognition model) model.
[0061] The target recognition model determines the outline of the infrared tag; the coordinates of the center point of the outline are then determined to obtain the tag coordinates. This allows for rapid acquisition of the tag coordinates while ensuring their accuracy, thus guaranteeing the accuracy of the tag.
[0062] S240. Label the natural light image according to the image label and label coordinates to obtain a labeled image.
[0063] The technical solution of this embodiment obtains image labels by parsing infrared markers in infrared light images; it obtains label coordinates by identifying the coordinates of the center point of the infrared markers in the infrared light images; and it automatically obtains image labels and label coordinates based on the infrared markers. Subsequently, it can be directly added to natural light images without manual annotation, reducing the manual cost of sample label annotation and improving annotation efficiency.
[0064] Example 3
[0065] Figure 3 The diagram shown is a structural schematic of an image annotation device according to Embodiment 3 of this application. This embodiment is applicable to the acquisition of labeled sample images and is configured in an image annotation device. The specific structure of the image annotation device is as follows:
[0066] The dual-spectral image acquisition module 310 is used to acquire a dual-spectral image of a target object with a transparent label pasted on the area to be labeled; the transparent label has a hidden infrared mark in the center; the dual-spectral image includes a natural light image and an infrared light image;
[0067] The infrared light image recognition module 320 is used to identify infrared markers in infrared light images to obtain image labels and label coordinates;
[0068] The natural light image labeling module 330 is used to label natural light images according to image labels and label coordinates to obtain labeled images.
[0069] The technical solution of this embodiment acquires a dual-spectral image of a target object with a transparent label pasted on its area to be labeled. The transparent label has a hidden infrared marker at its center. The label's transparency does not affect image quality. Since the label on the target object contains the hidden infrared marker, the image label and its coordinates can be automatically identified, providing a data foundation for subsequent automatic identification. The dual-spectral image includes a natural light image and an infrared light image. The infrared marker in the infrared light image is identified to obtain the image label and its coordinates. Automatic identification of the image label and its coordinates eliminates the need for manual annotation, reducing labor costs. Based on the image label and its coordinates, the natural light image is annotated to obtain a labeled image, achieving automatic annotation of the natural light image and improving image annotation efficiency. Therefore, the technical solution of this application solves the problems of low efficiency and high labor costs associated with manual labeling, achieving the effect of improving image labeling efficiency and reducing labor costs.
[0070] Optional, the infrared image recognition module 320 includes:
[0071] The image labeling unit is used to parse the infrared markers in the infrared light image to obtain the image label;
[0072] The tag coordinate acquisition unit is used to identify the coordinates of the center point of the infrared tag in the infrared light image and obtain the tag coordinates.
[0073] Optionally, the image labeling unit includes:
[0074] The infrared identification subunit is used to identify infrared markings on the label paper through an infrared sensing model.
[0075] The infrared tag decoding subunit is used to decode the infrared tag to obtain the tag identifier;
[0076] The label identification matching subunit is used to match label identifiers based on a preset label library to obtain image labels.
[0077] Optionally, the image annotation device also includes:
[0078] The image label acquisition module is used to acquire the image labels input by the user.
[0079] The label generation module is used to generate label identifiers for image labels;
[0080] The matching relationship storage module is used to establish the matching relationship between image tags and tag identifiers and store them in a preset tag library.
[0081] Optionally, the image annotation device also includes:
[0082] The infrared marking module is used to add label markings to transparent label paper by using infrared-activated ink to obtain hidden infrared markings, with the center point of the label markings coinciding with the center point of the transparent label paper.
[0083] Optionally, the label coordinates are obtained from the cells, including:
[0084] The identifier outline determination subunit is used to determine the identifier outline of the infrared identifier through the target recognition model;
[0085] The center point coordinate determination sub-unit is used to determine the coordinates of the center point of the identifier outline in order to obtain the label coordinates.
[0086] The image annotation apparatus provided in this application can execute the image annotation method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the image annotation method.
[0087] According to embodiments of the present invention, the present invention also provides an electronic device, a readable storage medium, and a computer program product.
[0088] Example 4
[0089] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of this application, as shown below. Figure 4 As shown, the electronic device includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of processors 410 in the electronic device can be one or more. Figure 4 Taking a processor 410 as an example; the processor 410, memory 420, input device 430, and output device 440 in the electronic device can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.
[0090] The memory 420, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the image annotation method in this embodiment (e.g., dual-spectrum image acquisition module 310, infrared light image recognition module 320, and natural light image labeling module 330). The processor 410 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 420, thereby implementing the image annotation method described above.
[0091] The memory 420 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 420 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 420 may further include memory remotely located relative to the processor 410, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0092] Input device 430 can be used to receive input character information and generate key signal inputs related to user settings and function control of the electronic device. Output device 440 may include display devices such as a display screen.
[0093] Example 5
[0094] Embodiment 5 of this application also provides a storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to perform an image annotation method. The method includes: acquiring a bispectral image of a target object with a transparent label pasted on its area to be labeled; the transparent label has a hidden infrared mark at its center; the bispectral image includes a natural light image and an infrared light image; identifying the infrared mark in the infrared light image to obtain an image label and label coordinates; and annotating the natural light image according to the image label and label coordinates to obtain a labeled image.
[0095] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the method operations described above, but can also perform related operations in the image annotation method provided in any embodiment of this application.
[0096] Based on the above description of the implementation methods, those skilled in the art can clearly understand that this application can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0097] It is worth noting that in the embodiments of the above image annotation device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of this application.
[0098] Note that the above are merely preferred embodiments and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the appended claims.
Claims
1. An image labeling method, characterized by, The method comprises the following steps: acquiring a dual-spectrum image of a target object to which a transparent label paper is attached in a region to be marked; the transparent label paper has a hidden infrared mark in the center; the dual-spectrum image comprises a natural light image and an infrared light image; identifying the infrared mark in the infrared light image to obtain an image label and label coordinates; labeling the natural light image according to the image label and the label coordinates to obtain a labeled image.
2. The method of claim 1, wherein, The step of identifying the infrared mark in the infrared light image to obtain an image label and label coordinates comprises the following steps: parsing the infrared mark in the label paper to obtain an image label; identifying the coordinates of the center point of the infrared mark to obtain label coordinates.
3. The method of claim 2, wherein, The step of parsing the infrared mark in the infrared light image to obtain an image label comprises the following steps: identifying the infrared mark in the label paper through an infrared sensing model; decoding the infrared mark to obtain a label mark; matching the label mark with a preset label library to obtain an image label.
4. The method of claim 3, wherein, Before the step of acquiring a dual-spectrum image of a target object to which a transparent label paper is attached in a region to be marked, the method further comprises the following steps: acquiring an image label input by a user; generating a label mark for the image label; establishing a matching relationship between the image label and the label mark and storing the matching relationship in a preset label library.
5. The method of claim 4, wherein, After the step of generating a label mark for the image label, the method further comprises the following step: adding the label mark to the transparent label paper through infrared ink to obtain a hidden infrared mark, wherein the center point of the label mark coincides with the center point of the transparent label paper.
6. The method of claim 3, wherein, The step of identifying the coordinates of the center point of the infrared mark to obtain label coordinates comprises the following steps: determining the mark contour of the infrared mark through a target recognition model; determining the coordinates of the center point of the mark contour to obtain label coordinates.
7. An image labeling apparatus characterized by comprising: The method comprises the following steps: a dual-spectrum image acquisition module, configured to acquire a dual-spectrum image of a target object to which a transparent label paper is attached in a region to be marked; the transparent label paper has a hidden infrared mark in the center; the dual-spectrum image comprises a natural light image and an infrared light image; an infrared light image identification module, configured to identify the infrared mark in the infrared light image to obtain an image label and label coordinates; a natural light image labeling module, configured to label the natural light image according to the image label and the label coordinates to obtain a labeled image.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the image labeling method according to any one of claims 1-6.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the image labeling method according to any one of claims 1-6.
10. A computer program product, characterised in that, The computer program product comprises a computer program which, when executed by a processor, implements the image labeling method according to any one of claims 1-6.