Image annotation methods, devices, electronic equipment, and storage media
By decoupling image uploading and annotation in an external distributed storage system, the problems of slow image uploading speed and low annotation efficiency in existing technologies are solved, enabling efficient uploading and secure storage of massive images, and improving annotation efficiency and data security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-02
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies suffer from slow image upload speeds, low annotation efficiency, inability to support massive image uploads, and insufficient data security due to storage on local disks.
By decoupling image uploading and annotation using an external distributed storage system, and storing and cleaning images using the distributed storage system, image uploading and annotation are decoupled, supporting massive image uploads, and cleaning and annotation processing is performed in the external storage system.
It improves image upload efficiency, enhances annotation efficiency, strengthens data security, and supports storage expansion and data backup.
Smart Images

Figure CN114860970B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to the fields of data cleaning and data annotation, specifically to an image annotation method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of artificial intelligence (AI), AI technology has been applied to various industries. As the foundation of the AI industry, data is one of the decisive conditions for realizing this capability. Therefore, providing high-quality labeled data services for training machine learning algorithms has become a crucial factor determining the level of AI application. In related technologies, the labeling process mainly involves uploading images from the front end and storing and labeling them on the back end, which suffers from slow upload speeds and low labeling efficiency. Summary of the Invention
[0003] This disclosure provides a method, apparatus, electronic device, and storage medium for image annotation.
[0004] According to a first aspect of this disclosure, an image annotation method is provided, comprising:
[0005] Obtain the first storage path of the original image in the external storage system;
[0006] The original image is obtained based on the first storage path, and the image to be labeled is obtained based on the original image;
[0007] Store the image to be labeled in an external storage system and obtain the second storage path of the image in the external storage system;
[0008] The image to be labeled is obtained based on the second storage path, and the image to be labeled is then labeled.
[0009] According to a second aspect of this disclosure, an image processing apparatus is provided, comprising:
[0010] The acquisition module is used to obtain the first storage path of the original image in the external storage system;
[0011] The first processing module is used to obtain the original image according to the first storage path, and to obtain the image to be labeled based on the original image;
[0012] The second processing module is used to store the image to be labeled in an external storage system and obtain the second storage path of the image to be labeled in the external storage system.
[0013] The annotation module is used to obtain the image to be annotated based on the second storage path and to perform annotation processing on the image.
[0014] According to a third aspect of this disclosure, an electronic device is provided, comprising:
[0015] At least one processor; and
[0016] The memory is communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method provided in the first aspect above.
[0018] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method provided in the first aspect above.
[0019] According to a fifth aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method provided in the first aspect described above.
[0020] According to the technical solution disclosed herein, the decoupling between image uploading and image annotation can be achieved, which not only enables the uploading of massive amounts of images but also improves the efficiency of image annotation.
[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0022] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0023] Figure 1 This is a flowchart illustrating the image annotation method according to an embodiment of the present disclosure;
[0024] Figure 2 These are schematic diagrams of the architecture labeled according to embodiments of this disclosure;
[0025] Figure 3 This is a schematic diagram of the composition structure of the image annotation device according to an embodiment of the present disclosure;
[0026] Figure 4 These are schematic diagrams of scenes labeled according to embodiments of this disclosure;
[0027] Figure 5 This is a block diagram of an electronic device used to implement the image annotation method of the embodiments of this disclosure. Detailed Implementation
[0028] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0029] The terms "first," "second," and "third," etc., used in the embodiments, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as including a series of steps or units. A method, system, product, or apparatus is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses.
[0030] In related technologies, images are uploaded via a front-end page, allowing for the simultaneous upload of hundreds of images. Image format verification is performed during the upload process, and images with mismatched formats are discarded. Uploaded images are then stored on the local hard drive. During image annotation, images are read from the local hard drive for annotation. However, uploading via a page limits the number of images to a few hundred at a time, resulting in low upload efficiency and difficulty in supporting tens of thousands of image uploads. Image cleaning during the upload process also impacts efficiency. Image cleaning is limited to format checking, resulting in a narrow scope and the potential for uploading too many invalid images, further affecting annotation efficiency. Cluster deployment is not supported: images can only be stored on the local disk, and the service cannot be scaled up via proxy servers. Storing images on the local disk also prevents data redundancy, compromising data security.
[0031] In order to at least partially solve one or more of the above-mentioned problems and other potential problems, this disclosure proposes an image annotation method. By utilizing the technical solution of the embodiments of this disclosure, at least the decoupling between image uploading and image annotation can be achieved, improving image uploading efficiency and storage security, thereby improving annotation efficiency.
[0032] This disclosure provides an image annotation method. Figure 1This is a flowchart illustrating an image annotation method according to an embodiment of the present disclosure. This image annotation method can be applied to an image processing device. The image processing device is located in an electronic device, which includes, but is not limited to, fixed devices and / or mobile devices. For example, fixed devices include, but are not limited to, servers, which can be cloud servers or ordinary servers. Mobile devices include, but are not limited to, one or more terminals such as mobile phones or tablets. In some possible implementations, the method can also be implemented by a processor calling computer-readable instructions stored in memory. Figure 1 As shown, the image annotation method includes:
[0033] S101: Obtain the first storage path of the original image in the external storage system;
[0034] S102: Obtain the original image according to the first storage path, and obtain the image to be labeled based on the original image;
[0035] S103: Store the image to be labeled in the external storage system and obtain the second storage path of the image to be labeled in the external storage system;
[0036] S104: Obtain the image to be labeled based on the second storage path, and perform labeling processing on the image to be labeled.
[0037] In this embodiment, the external storage system is a system with storage functionality. The external storage system is used to store a large number of original images or images after the original images have been cleaned and processed. Specifically, the external storage system can be a distributed storage system. For example, the distributed storage system can be a Ceph distributed storage system. Another example is a Hadoop Distributed File System (HDFS). Yet another example is a Moose File System (MooseFS) with redundancy and fault tolerance. The above are merely illustrative examples and are not intended to limit all possible types of external storage systems; an exhaustive list is not provided here.
[0038] Here, the first storage path is the storage path of the original image in the external storage system.
[0039] This disclosure does not limit the source of images in the external storage system. For example, users can upload images to the external storage system through a user interface. Alternatively, a portable hard drive containing many images can be directly mounted to the external storage system.
[0040] In this embodiment of the disclosure, the image to be labeled is an image awaiting labeling. For example, the image to be labeled may be an image obtained after data cleaning processing of the original image. Alternatively, the image to be labeled may also be an original image that meets a preset image quality standard.
[0041] Here, annotation processing includes, but is not limited to, manual annotation and automatic annotation. When user-inputted annotation information for a given image is detected via the user interface, this annotation information is saved, enabling manual annotation of the image. If no user-inputted annotation information is detected within a preset time, intelligent annotation is performed on the image, and the intelligent annotation results are saved. Intelligent annotation can use either active learning or a specified model, and can automatically filter and annotate difficult examples. After manual confirmation and approval, the annotation is completed.
[0042] The technical solution of this disclosure involves obtaining a first storage path of an original image in an external storage system; obtaining the original image based on the first storage path, and obtaining an image to be labeled based on the original image; storing the image to be labeled in the external storage system, and obtaining a second storage path of the image to be labeled in the external storage system; obtaining the image to be labeled based on the second storage path, and performing labeling processing on the image to be labeled. Since the external storage system can store massive amounts of images and supports the uploading of massive amounts of images, reading the original image from the external storage system based on the first storage path improves the efficiency of image uploading. Performing labeling processing on the image to be labeled stored in the external storage system based on the second storage path decouples image uploading from image labeling, improving labeling efficiency. Furthermore, compared to storing images on a local disk, storing images in an external storage system enables storage expansion.
[0043] In some embodiments, the number of original images is multiple, and S101 can be changed to: obtaining the first storage paths of the multiple original images in an external storage system. The image annotation method further includes: storing the first storage paths corresponding to each original image sequentially in a message queue; and reading the message queue to obtain the first storage paths.
[0044] In this embodiment of the disclosure, the message queue includes a first storage path for the original image. For example, the message queue could be a Kafka message queue. Another example is an ActiveMQ message queue. Yet another example is a RabbitMQ message queue. The above are merely illustrative examples and are not intended to limit all possible types of message queues; an exhaustive list is not provided here.
[0045] In this way, by reading the message queue, the first storage path corresponding to multiple original images can be obtained at once, which helps to improve the efficiency of reading original images from external storage systems.
[0046] In some embodiments, the message queue further includes identification information for each original image, and a first storage path for each original image is associated with the identification information of the corresponding original image. Reading the message queue to obtain the first storage path includes: reading the identification information in the message queue to obtain the first storage path corresponding to the original image with the target identification information.
[0047] Here, the identification information includes, but is not limited to, business topic information. In some implementations, reading the identification information in the message queue to obtain the first storage path corresponding to the original image of the target identification information includes: determining the first storage path corresponding to the original image of the target business from the message queue based on the business topic information included in the message queue; and reading the original image of the target business from the distributed storage system based on the first storage path.
[0048] Here, business theme information is used to categorize business operations. For example, if a user uploads an image from business system A and another image from business system B, the business theme information can be used to distinguish between the images from business system A and business system B.
[0049] Here, the target business is the preprocessing business. The target business can be set or adjusted according to design requirements or user needs. For example, there are N business themes: Business Theme 1, Business Theme 2, Business Theme 3, ..., Business Theme N. The message queue carries the business theme information of the image. If there are M message queues, and the business themes of the M message queues are Business Theme 1, Business Theme 2, Business Theme 3, ..., Business Theme M, where M is less than or equal to N, assuming the target business's business theme is Business Theme 1, then the message queue with Business Theme 1 is retrieved from the M message queues, ignoring the other message queues. In this way, targeted processing of the original images for different business types can be achieved.
[0050] In this way, images for different services can be processed based on the identification information in the message queue.
[0051] To ensure the accuracy of the labeled data, the original images need to be cleaned first. In some embodiments, obtaining the image to be labeled based on the original image includes: performing data cleaning on the original image to obtain the image to be labeled.
[0052] In some embodiments, data cleaning processing of the original image stored in the external storage system includes at least one of the following: format detection processing of the original image; angle rotation processing of the original image; damage detection processing of the original image; quality compression processing of the original image; and size scaling processing of the original image.
[0053] In some implementations, the original image undergoes format detection processing, including: determining whether the original image format conforms to a preset image format; if not, discarding or removing the original image. Here, the preset image format can be set or adjusted according to design or user requirements. For example, the preset image format can be one or more of formats such as PNG, JPEG, WebP, and JPG. In practical applications, the image format can be determined by the magic number of the image. For example, the hexadecimal magic number of PNG is "89504e47". If filtering for PNG format images, the magic number of the image is read; if the magic number is "89504e47", the original image is determined to be in PNG format.
[0054] In some implementations, damage detection processing is performed on the original image, including: reading the image; if the width of the image can be obtained, the image is determined to be undamaged; otherwise, the original image is discarded or removed. Thus, determining whether an image is damaged based on whether its width can be read allows for rapid damage detection processing of the original image.
[0055] In some implementations, rotating the original image involves obtaining the image rotation angle from the image attribute information. Here, the image attribute information can be Exchangeable Image File Format (Exif) information. The rotation angle can be understood as the angle rotated clockwise when the image is facing forward. Specifically, the rotation angle value is equal to the rotation angle in a counter-clockwise direction; and is 360° minus the rotation angle in a clockwise direction.
[0056] In some implementations, the original image is subjected to quality compression processing, including reducing the image storage size while maintaining the same image resolution.
[0057] In some implementation methods, the original image is scaled down, including at least one of the following: reducing the image resolution; reducing the image storage capacity.
[0058] In practical applications, the above-mentioned cleaning processes, such as format detection, angle rotation, damage detection, quality compression, and size scaling, can be combined arbitrarily.
[0059] Here, the image cleaning process may also include various basic cleaning operations such as automatic deblurring, near-miss removal, and mirroring. For example, the image cleaning process can be performed using the EasyData intelligent data service platform technology. This disclosure does not limit the technology used in the image cleaning process.
[0060] This increases the dimensions of image cleaning, thereby improving the quality of images to be labeled and increasing labeling efficiency.
[0061] In some embodiments, the image annotation method may further include storing annotation data for the image to be annotated into a first database.
[0062] In this embodiment of the disclosure, the first database is a database used to record image annotation data. For example, the first database can be a relational database management system, such as MySQL, Oracle, SQL Server, SQLite, etc. In practical applications, the first database can be the database corresponding to the image annotation service.
[0063] In some embodiments, the image annotation method may further include: storing the second storage path of the image to be annotated in the external storage system into a second database. Obtaining the second storage path of the image to be annotated in the external storage system includes: obtaining the second storage path of the image to be annotated in the external storage system from the second database.
[0064] In this embodiment, the second database is a database used to record the second storage path of the images to be labeled in the external storage system. For example, the second database can be a relational database management system, such as MySQL, Oracle, SQL Server, SQLite, etc. It should be noted that the second database and the first database can be the same database or different databases. In practical applications, the second database can be the database corresponding to the image cleaning service.
[0065] This separates the images to be labeled from the labeled data, enhancing data security.
[0066] In some embodiments, storing the image to be labeled in an external storage system includes: in response to a change in the image to be labeled relative to the original image, storing the image to be labeled in a first storage area of the external storage system, and using the storage path of the image to be labeled in the first storage area as the second storage path of the image to be labeled in the external storage system.
[0067] Here, the external storage system comprises multiple storage areas, with the first storage area being one of these areas, used to store the images to be labeled. For example, the external storage system includes P nodes, the first storage area includes nodes 1 to i, and the second storage area includes nodes i+1 to P of the distributed storage system. Here, nodes include, but are not limited to, bare metal, physical machines, and virtual machines.
[0068] For example, the original image a is stored in the second storage area of the external storage system. If the original image a changes after data cleaning and becomes an image a' to be labeled, then the image a' to be labeled is stored in the first storage area of the external storage system.
[0069] Therefore, storing the cleaned images separately from the original images improves data security. Additionally, it helps data annotation services quickly obtain a large number of images to be annotated, thus improving annotation efficiency.
[0070] In some embodiments, storing the image to be labeled in an external storage system includes: in response to the image to be labeled not being changed relative to the original image, using the first storage path of the original image as the second storage path of the image to be labeled in the external storage system.
[0071] For example, in the second storage area of the external storage system, the original image b is stored. If the original image b remains unchanged after data cleaning, then the original image b is used as the image to be labeled, and the storage path of the original image b in the distributed storage system is used as the second storage path of the image to be labeled in the external storage system, and stored in the second database. Here, the storage address of the second storage path is different from that of the first storage path. For example, the second storage path may be a storage path in the first storage area of the distributed storage system, specifically node 1 / D drive / folder 1. Or, the first storage path may be a storage path in the second storage area of the distributed storage system, specifically node i+1 / C drive / desktop. The above are merely illustrative examples and are not intended to limit all possible types of storage paths; they are simply not exhaustive.
[0072] Therefore, if the original image remains unchanged after cleaning, not saving the original image separately can reduce the storage resources occupied by the external storage system and help increase the storage capacity of the external storage system.
[0073] Figure 2 A schematic diagram of the overall architecture of the image annotation is shown, such as... Figure 2 As shown, the architecture consists of three main parts: image uploading, image cleaning, and image annotation.
[0074] The image upload process mainly includes:
[0075] Step a: Upload the original images in batches to a distributed storage system such as Ceph distributed storage system. At this point, each image has a corresponding storage path. Image security is enhanced through distributed storage.
[0076] Step b: Mount the image storage path to multiple image upload servers. Storing images in a distributed storage system first, and then mounting the storage path to the image upload servers, can improve image upload speed.
[0077] Step c: The image upload server recursively scans the image folders in the storage path and stores the complete image paths in the business topic of the message queue.
[0078] The image cleaning process mainly includes:
[0079] Step d: The image cleaning server reads the image storage path from the topic in the message queue.
[0080] Step e: The image cleaning server reads the image from the storage path, obtains the image stream, and uses the magic number to detect the image format. For example, it only allows images in formats such as png, jpeg, webp, and jpg. If the image conforms to the format, it proceeds to step f for processing; otherwise, it is discarded.
[0081] Step f: The image cleaning server performs image damage detection based on the processing results of step e. This is implemented as follows: The image is read; if the width can be read, the image is determined to be undamaged, i.e., complete, and the process proceeds to step g. If the image is damaged, it is discarded.
[0082] Step g: The image cleaning server rotates the image angle based on the processing result of step f, by obtaining the image rotation angle direction (orientation) from the image's Exif information. The rotation angle refers to the angle rotated clockwise when the image is facing forward. The rotation angle is equal to the rotation angle in the counterclockwise case; in the clockwise case, it is 360° minus the rotation angle. After processing is complete, proceed to step h.
[0083] Step h: The image cleaning server performs image quality compression and image scaling based on the processing results of step g. Quality compression means keeping the image resolution the same while reducing the image storage size; image scaling means reducing both the image resolution and the image storage size.
[0084] The four cleaning steps e, f, g, and h mentioned above are optional and can be combined arbitrarily.
[0085] Step i: Copy the processed image to a new disk in the distributed storage system and store the path in the first image library, such as MySQL.
[0086] If steps e, f, g, and h are not required, then directly store the path of the image on the original disk in the distributed storage system into the first database, MySQL.
[0087] The image annotation process mainly includes:
[0088] Step j: Read the image storage path stored in the first database.
[0089] Step k: Load the image into the distributed storage system based on the image storage path.
[0090] Step 1: The annotator provides image annotation services.
[0091] Step m: The image annotation results are stored in the second database.
[0092] It is evident that by using distributed storage, image uploading, image cleaning, and image annotation services are decoupled, enabling fast image uploading, effective cleaning, and efficient annotation, thereby improving image annotation efficiency and facilitating the training of machine learning algorithms.
[0093] The above image annotation method can be applied to image annotation services for model training, and has the following beneficial effects:
[0094] 1. Improve image upload efficiency and enable fast batch image uploads.
[0095] 2. Improve image cleaning efficiency: By performing image format detection, image damage detection, image angle rotation, image quality compression and scaling, each step of the cleaning process can be selectively arranged, resulting in a significant improvement in cleaning efficiency.
[0096] 3. Improve image storage security: Distributed storage provides data backup, thus improving image storage security.
[0097] 4. Improved annotation efficiency: There is no need to wait for image cleaning during the image upload process, and no need to wait for image upload and image cleaning during the annotation process, thus improving image annotation efficiency.
[0098] It should be understood that Figure 2 The architecture diagram shown is merely illustrative and not restrictive; those skilled in the art can use it as a basis for their own interpretation. Figure 2 Even with various obvious changes and / or substitutions to the examples, the resulting technical solutions still fall within the scope of this disclosure.
[0099] This disclosure provides an image annotation device. For example... Figure 3As shown, the image processing device may include: an acquisition module 301, used to acquire a first storage path of an original image in an external storage system; a first processing module 302, used to acquire the original image according to the first storage path, and acquire an image to be labeled based on the original image; a second processing module 303, used to store the image to be labeled in the external storage system, and acquire a second storage path of the image to be labeled in the external storage system; and an annotation module 304, used to acquire the image to be labeled based on the second storage path, and perform annotation processing on the image to be labeled.
[0100] In some embodiments, the external storage system is a distributed storage system.
[0101] In some embodiments, the data annotation apparatus further includes: a generation module, configured to sequentially store the first storage paths corresponding to each original image in a message queue; and a reading module, configured to read the message queue to obtain the first storage paths.
[0102] In some embodiments, the message queue also includes identification information for each original image, and the first storage path of each original image is associated with the identification information of the corresponding original image. The reading module is used to: read the identification information in the message queue to obtain the first storage path corresponding to the original image of the target identification information.
[0103] In some embodiments, the first processing module 302 includes a cleaning submodule, used to perform data cleaning processing on the original image to obtain an image to be labeled.
[0104] In some embodiments, the cleaning submodule performs data cleaning processing on the original image, including at least one of the following: performing format detection processing on the original image; performing angle rotation processing on the original image; performing damage detection processing on the original image; performing quality compression processing on the original image; and performing size scaling processing on the original image.
[0105] In some embodiments, the data annotation apparatus further includes a first storage module for storing annotation data for the image to be annotated into a local first database.
[0106] In some embodiments, the second processing module 403 includes: a first determining submodule, configured to, in response to a change in the image to be labeled relative to the original image, store the image to be labeled in a first storage area of an external storage system, and use the storage path of the image to be labeled in the first storage area as the second storage path of the image to be labeled in the external storage system; and / or,
[0107] The second determining submodule is used to, in response to the fact that the image to be labeled has not changed relative to the original image, use the first storage path of the original image as the second storage path of the image to be labeled in the external storage system.
[0108] In some embodiments, the data annotation device further includes: a second storage module for storing the image to be annotated in a second storage path in an external storage system to a local second database; and a second processing module including: an acquisition submodule for acquiring the second storage path of the image to be annotated in the external storage system from the second database.
[0109] Those skilled in the art should understand that the functions of each processing module in the image processing apparatus of this disclosure can be understood with reference to the relevant description of the image annotation method described above. Each processing module in the image processing apparatus of this disclosure can be implemented by an analog circuit that implements the functions described in the embodiments of this disclosure, or by running software that performs the functions described in the embodiments of this disclosure on an electronic device.
[0110] The image processing apparatus of this disclosure uses distributed image storage to decouple image uploading, image cleaning, and image annotation services, thereby enabling fast image uploading, effective cleaning, and efficient annotation, improving image annotation efficiency, and assisting in the training of machine learning algorithms.
[0111] Figure 4 This illustrates a scene of image processing. Figure 4 As can be seen, electronic devices, such as cloud servers, receive data cleaning configuration information sent by terminals. This data cleaning configuration information may include information such as target business type, cleaning type, and cleaning steps. Based on this data cleaning configuration information, the electronic device reads the images to be cleaned from the message queue and stores the cleaned images in the distributed storage system's storage path in the second database. The electronic device receives image annotation service requests sent by terminals, reads the storage path of the images to be annotated from the second database, and reads the images from the distributed storage system based on the storage path for terminal-side annotators to annotate, or automatically annotates the images to be annotated according to the data annotation service request, and stores the annotated data in the first database.
[0112] This disclosure does not limit the number of terminals or electronic devices; in practical applications, it may include multiple terminals or multiple electronic devices.
[0113] It should be understood that Figure 4 The scene diagrams shown are merely illustrative and not restrictive; those skilled in the art can interpret them based on... Figure 4 Even with various obvious changes and / or substitutions to the examples, the resulting technical solutions still fall within the scope of this disclosure.
[0114] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0115] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0116] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0117] like Figure 5 As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 505 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.
[0118] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0119] The computing unit 501 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as image annotation methods. For example, in some embodiments, the image annotation method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the image annotation method described above can be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the image annotation method by any other suitable means (e.g., by means of firmware).
[0120] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0121] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable image processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0122] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory (EPROM), flash memory, optical fiber, compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0123] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0124] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0125] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed storage systems, or servers incorporating blockchain technology.
[0126] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0127] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A picture labeling method, comprising: obtaining a first storage path of an original picture in an external storage system; obtaining the original picture according to the first storage path, and performing data cleaning processing based on the original picture to obtain a picture to be labeled; wherein the data cleaning processing comprises at least one of the following: format detection processing, angle rotation processing, and damage detection processing; storing the picture to be labeled into the external storage system, and obtaining a second storage path of the picture to be labeled in the external storage system; wherein storing the picture to be labeled into the external storage system comprises: in response to the picture to be labeled being changed relative to the original picture, storing the picture to be labeled in a first storage area in the external storage system, and taking a storage path of the picture to be labeled in the first storage area as the second storage path of the picture to be labeled in the external storage system; and in response to the picture to be labeled not being changed, taking the first storage path of the original picture as the second storage path of the picture to be labeled in the external storage system; obtaining the picture to be labeled based on the second storage path, and performing labeling processing on the picture to be labeled.
2. The method of claim 1, wherein, The external storage system is a distributed storage system.
3. The method of any one of claims 1-2, wherein, The original picture comprises a plurality of original pictures, and the method further comprises: storing the first storage path corresponding to each original picture in a message queue in sequence; reading the message queue to obtain the first storage path.
4. The method of claim 3, wherein the message queue further comprises identification information of each original picture, the first storage path of each original picture is associated with the identification information of the corresponding original picture, and the reading of the message queue to obtain the first storage path comprises: reading the identification information in the message queue to obtain the first storage path corresponding to the original picture of the target identification information.
5. The method of claim 1, wherein, The data cleaning processing on the original picture comprises at least one of the following: performing quality compression processing on the original picture; performing size scaling processing on the original picture.
6. The method of any one of claims 1-2, further comprising: storing labeling data for the picture to be labeled into a local first database.
7. The method of claim 1, further comprising: storing the second storage path of the picture to be labeled in the external storage system into a local second database; the obtaining of the second storage path of the picture to be labeled in the external storage system comprises: obtaining the second storage path of the picture to be labeled in the external storage system from the second database.
8. A picture labeling apparatus, comprising: an obtaining module configured to obtain a first storage path of an original picture in an external storage system; The first processing module is configured to obtain the original picture according to the first storage path, and perform data cleaning processing on the original picture to obtain a picture to be labeled; the first processing module includes a cleaning sub-module, which performs data cleaning processing on the original picture, including at least one of format detection processing, angle rotation processing, and damage detection processing; The second processing module is configured to store the picture to be labeled in the external storage system, and obtain a second storage path of the picture to be labeled in the external storage system; the second processing module includes: a first determining sub-module configured to, in response to the picture to be labeled being changed relative to the original picture, store the picture to be labeled in a first storage area in the external storage system, and take a storage path of the picture to be labeled in the first storage area as the second storage path of the picture to be labeled in the external storage system; and a second determining sub-module configured to, in response to the picture to be labeled not being changed, take the first storage path of the original picture as the second storage path of the picture to be labeled in the external storage system; The labeling module is configured to obtain the picture to be labeled based on the second storage path, and perform labeling processing on the picture to be labeled.
9. The apparatus of claim 8, wherein, The external storage system is a distributed storage system.
10. The apparatus of any of claims 8-9, wherein, The original picture includes a plurality of original pictures, and the apparatus further includes: The generating module is configured to sequentially store the first storage path corresponding to each original picture in a message queue; The reading module is configured to read the message queue to obtain the first storage path.
11. The apparatus of claim 10, wherein the message queue further includes identification information of each original picture, the first storage path of each original picture is associated with the identification information of the corresponding original picture, and the reading module is configured to: read the identification information in the message queue to obtain the first storage path of the original picture corresponding to target identification information.
12. The apparatus of claim 8, wherein, The cleaning sub-module performs data cleaning processing on the original picture, including at least one of: performing quality compression processing on the original picture; performing size scaling processing on the original picture.
13. The apparatus of any one of claims 8-9, further comprising: a first storage module configured to store labeling data for the picture to be labeled in a local first database.
14. The apparatus of claim 8, further comprising: a second storage module configured to store the second storage path of the picture to be labeled in the external storage system in a local second database; the second processing module includes: an obtaining sub-module configured to obtain the second storage path of the picture to be labeled in the external storage system from the second database.
15. An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are for causing a computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-7.
Citation Information
Patent Citations
Data processing method, device and system and electronic device
CN110187829A
Data labeling method, device, system, electronic equipment and storage medium
CN112861037A