Image processing method, device, server, and storage medium
By updating and iterating the historical annotation data of images, the quality of the training samples of the image processing model is improved, the problem of low accuracy of image annotation data is solved, and the detection accuracy of the neural network is improved.
Patent Information
- Application Number
- CN201910384540.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-09
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2039-05-09
AI Technical Summary
In the existing technology, it is difficult to improve the accuracy of image corresponding annotation data, which affects the training and detection accuracy of neural networks.
By obtaining the adjustment operation for the annotation data of the image, the historical annotation data stored in the structured database is updated, the updated data is used as a training sample to train the image processing model, and the annotation data is iteratively updated to improve accuracy.
By iteratively updating the historical annotation data of the image, the quality of the training samples of the image processing model is improved, thereby improving the detection accuracy of the neural network.
Smart Images

Figure CN110163268B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, device, server, and storage medium. Background Art
[0002] With the rapid development of multimedia information technology and Internet information technology, hundreds of millions of images are presented on the Internet every day. Compared with text, images can describe information more intuitively and accurately. Therefore, in today's era of information explosion, images can enable users to obtain the required information more conveniently, quickly and accurately.
[0003] At present, a large number of annotated images are required in the training of neural networks such as those used for target tracking and image recognition. The accuracy of the annotated data corresponding to the image can directly affect the detection accuracy of the trained neural network. Therefore, how to improve the accuracy of the annotated data corresponding to the image has become a problem that needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present invention provide an image processing method, device, server, and storage medium, which are beneficial to improving the accuracy of image corresponding annotation data.
[0005] In one aspect, an embodiment of the present invention provides an image processing method, comprising:
[0006] Acquire an adjustment operation for the annotation data of the image, and update the historical annotation data of the image stored in the structured database according to the adjustment operation;
[0007] Using the updated historical annotation data of the image as training samples to train the image processing model;
[0008] The image is annotated using the trained image processing model, and the historical annotation data of the image is updated according to the annotation result.
[0009] On the other hand, an embodiment of the present invention provides an image processing device, including:
[0010] A communication module, used to obtain adjustment operations for the annotation data of the image;
[0011] A processing module is used to update the historical annotation data of the image stored in the structured database according to the adjustment operation, use the updated historical annotation data of the image as training samples to train the image processing model, annotate the image through the trained image processing model, and update the historical annotation data of the image according to the annotation results.
[0012] Correspondingly, an embodiment of the present invention also provides a server, comprising: a processor and a storage device; the storage device is used to store program instructions; the processor calls the program instructions to execute: obtaining an adjustment operation for the annotation data of an image, and updating the historical annotation data of the image stored in a structured database according to the adjustment operation; training an image processing model using the updated historical annotation data of the image as a training sample; annotating the image through the trained image processing model, and updating the historical annotation data of the image according to the annotation result.
[0013] Correspondingly, an embodiment of the present invention further provides a computer storage medium, in which program instructions are stored. When the program instructions are executed, they are used to implement the above methods.
[0014] In an embodiment of the present invention, the server can obtain an adjustment operation for the annotation data of an image, and update the historical annotation data of the image stored in the structured database according to the adjustment operation, and use the updated historical annotation data of the image as a training sample to train the image processing model, and then perform annotation processing on the image through the trained image processing model, and update the historical annotation data of the image according to the annotation result. By adopting such a method of iteratively updating the historical annotation data of each image through the trained image processing model, the annotation data of the determined image is more accurate, and a better quality training sample can be provided for the subsequent training of the image processing model, which is conducive to improving the detection accuracy of the trained image processing model. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 is a flowchart of an image processing method according to an embodiment of the present invention;
[0017] Figure 2 is a schematic diagram of a hierarchical storage structure according to an embodiment of the present invention;
[0018] Figure 3 is a flowchart of another image processing method according to an embodiment of the present invention;
[0019] Figure 4 is a flowchart of another image processing method according to an embodiment of the present invention;
[0020] Figure 5 is a schematic diagram of an image annotation result according to an embodiment of the present invention;
[0021] Figure 6 is a structural schematic diagram of an image processing device according to an embodiment of the present invention;
[0022] Figure 7 It is a structural diagram of a server according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In an embodiment of the present invention, on the one hand, images are stored through a hierarchical storage structure. For images that are streaming small files, such a storage method is conducive to improving the reading and writing efficiency of images; on the other hand, the annotation data of the image is stored through a structured database, and the historical annotation data of the image stored in the structured database is updated in combination with the annotation engine + manual annotation method to obtain more accurate annotation data corresponding to the image (i.e., the updated historical annotation data of the image); further, the updated historical annotation data of the image is used as a training sample to train the image processing model, and the image is annotated by the trained image processing model, and then the historical annotation data of the image is updated according to the annotation results. In this way, the historical annotation data of the image is iteratively updated by the trained image processing model, so that the annotation data corresponding to the determined image is more accurate, which can provide better training samples for the training of the image processing model, thereby improving the detection accuracy of the trained image processing model.
[0024] In one embodiment, the image processing method can be applied to a server, which can be a server or server group for image processing. In other embodiments, it can also be implemented by a powerful personal computer with rich software and hardware resources, and the present invention does not specifically limit this.
[0025] See also Figure 1 The schematic flow chart of the image processing method is as follows: the server can first store each image in the storage directories at each level corresponding to the hierarchical storage structure. Since the hierarchical storage structure is mainly used to solve the storage problem of image binary data, the image annotation data is not applicable to the hierarchical storage structure. The main reasons are as follows:
[0026] a. Image annotations are mainly numerical, including: target detection box (Bounding Box), target key points (Landmark), target classification category, etc. These annotation attributes are often represented by a category value or multiple image pixel position points;
[0027] b. The relationship between image and annotation attributes is one-to-many: one image corresponds to multiple annotation results from multiple annotation engines. The same annotation engine may repeatedly annotate the same image (for example, when the engine is iteratively upgraded). Multiple annotation results of the same image may need to be merged, intercepted, etc. (for example, during annotation mining).
[0028] In view of the above characteristics of the annotation data corresponding to the image, it can be seen that the annotation data is short and frequently updated structured data. Since the simple file system storage performance cannot meet these characteristics, the embodiment of the present invention can use a structured database to store the annotation data of the image. Therefore, after the server stores each image in the storage directory at each level corresponding to the hierarchical storage structure, the server can obtain the historical annotation data of the search engine for each of the above images, and store the historical annotation data of each image and the storage directory corresponding to each image in the structured database to achieve the establishment of the annotation index of each image.
[0029] The structured database may be, for example, Mongo DB, which is a database based on distributed file storage and is written in C++ language, and is intended to provide a scalable, high-performance data storage solution for WEB applications.
[0030] Furthermore, since the historical annotation data of each of the above-mentioned images is automatically annotated by the annotation engine, there may be a situation where the accuracy of the annotation data is poor. In view of this situation, the historical annotation data of each of the above-mentioned images can be adjusted by manual annotation, and the server can obtain the adjustment operation of the historical annotation data of each image, and update the historical annotation data of each image stored in the structured database according to the adjustment operation. Furthermore, the updated historical annotation data of each image can be used as a training sample to train the image processing model, and the trained image processing model can be used to annotate the above-mentioned images, and the historical annotation data of each of the above-mentioned images can be updated according to the annotation results. By adopting such a method of iteratively updating the historical annotation data of each image through the trained image processing model, the annotation data of the determined image is more accurate, and a better quality training sample can be provided for the subsequent training of the image processing model, which is conducive to improving the detection accuracy of the trained image processing model.
[0031] Furthermore, the structured database and hierarchical storage structure also store the source information of each of the images, wherein the source information represents the data source of each image, and the data source may be, for example, an open source platform source, a time source, a classification source (such as a person, animal, cat, dog, etc.), etc. The user may obtain the target image corresponding to the target source and the historical annotation data of the target image from the server through the user terminal, wherein, in order to improve the efficiency of the user terminal in reading and writing the target image and the historical annotation data corresponding to the target image, a layer of designated interface that can be used to access the hierarchical storage structure and the structured database may be encapsulated in the user terminal, and the user terminal may obtain all the target images under the target source and the historical annotation data corresponding to all the target images through the designated interface. The designated interface may be an advanced application programming interface (API) encapsulated through the Jupter NoteBook visual terminal interaction tool to access the hierarchical storage structure and the structured database.
[0032] Furthermore, after the user terminal obtains all target images and the historical annotation data corresponding to all target images, the historical annotation data of each target image can be integrated and processed, and the annotation results of the test image using the various annotation data obtained by the integrated processing can be displayed. When the user's confirmation indication for the annotation result is detected, the user can send a confirmation indication for the annotation result to the server. When the server receives the confirmation indication for the annotation result, the historical annotation data of the target image can be updated according to the annotation data obtained by the integrated processing. In this way, the mining of the annotation data corresponding to the target image is realized, so that the updated historical annotation data of the target image is more accurate.
[0033] After the historical annotation data of the target image is updated according to the annotation data obtained by the integration process, the accuracy corresponding to the historical annotation data of the updated target image is relatively high, and the historical annotation data of the updated target image can be determined as high-quality annotation data. The server can store the historical annotation data of the updated target image in a designated field in a structured database, and the designated field is used to indicate that the annotation data stored in the designated field is high-quality annotation data. When researchers need to use relevant annotation data for image model training (such as classification model training, target detection model training, etc.), they can directly obtain high-quality annotation data based on the designated field, and use the high-quality annotation data as a training sample to train the image processing model, so as to achieve iteration of high-quality annotation data and improve the detection accuracy of the trained image model.
[0034] In one embodiment, the above-mentioned designated field may be a (State Of The Art, SOTA) field, which is used to characterize the optimal annotation data of the image. The server may perform SOTA operations on the above-mentioned high-quality annotation data and store the high-quality data in the SOTA field of the structured database. When researchers need to use relevant annotation data for image model training (such as classification model training, target detection model training, etc.), they can directly obtain high-quality annotation data based on the SOTA field.
[0035] In one embodiment, before the server stores each image in the storage directories at each level corresponding to the hierarchical storage structure, it may create a hierarchical storage structure including at least one level of storage directory. Each level of storage directory is set with a maximum number of subdirectories, and the directory name of the first level storage directory is N. 1 The directory name of the secondary storage directory is N 2 The first N characters of the second-level directory are consistent with the first-level directory name, and so on. In this way, there are at most 16 N-power directories at each level. Among them, N is an integer greater than 0, which can be pre-set according to experimental tests and can be adjusted according to actual needs later. For example, N can be 3.
[0036] In one embodiment, the hexadecimal characters constituting the names of the storage directories at each level can be obtained by calculating the summary information of the image. For example, the summary information can be the MD5 value calculated by the fifth version of the message digest algorithm (Message-Digest Algorithm 5, MD5) on the image, and the server can calculate the MD5 value based on the first N of the MD5 value. 1 The hexadecimal characters corresponding to the directory name of the first-level storage directory are determined by the bit character, based on the first N of the MD5 value. 2 The hexadecimal character corresponding to the directory name of the secondary storage directory is determined by the bit character, and so on. Due to the distribution characteristics of the MD5 algorithm, under the premise of a huge total amount of images, the hierarchical storage structure is used to store each image, so that the number of images stored in each level of storage directory can be nearly evenly distributed.
[0037] For example, assuming that N is 3, the hierarchical storage structure includes a 2-level storage directory, and the hexadecimal characters are composed of characters a to f. The hierarchical storage structure can be as follows: Figure 2As shown. It can be seen that the first-level storage directory includes 6 first-level storage targets such as "aaa" to "fff", and each first-level storage directory name consists of 3 hexadecimal characters; the second-level storage targets under the first-level storage directory "aaa" include 6 second-level storage targets such as "aaaaaa" to "aaaaaf", and each second-level storage directory name consists of 6 hexadecimal characters, among which the first three characters of the second-level storage target name are "aaa" and are consistent with the first-level directory name.
[0038] See also Figure 3 , is a schematic diagram of an image processing flow of an embodiment of the present invention, and the method of the embodiment of the present invention can be executed by a server or a server group. The method of the embodiment of the present invention includes the following steps.
[0039] S301: Acquire an adjustment operation for the annotation data of an image, and update the historical annotation data of the image stored in the structured database according to the adjustment operation. The image may refer to a single image or an image set, wherein the image set includes multiple images.
[0040] In one embodiment, before the server obtains the adjustment operation for the annotation data of the image, it can obtain the summary information of the image, and determine the target storage directory corresponding to the image in the hierarchical storage structure according to the summary information of the image, and the hierarchical storage structure includes at least one level of storage directory. Further, the server can store the image in the target storage directory.
[0041] Each level of storage directory has a maximum number of subdirectories. The directory name of the first-level storage directory is N. 1 The directory name of the secondary storage directory is N 2 The first N characters of the second-level directory are consistent with the first-level directory name, and so on. The hexadecimal characters that make up the names of the above-mentioned storage directories can be obtained by calculating the summary information of the image. Specifically, the server can calculate the first N characters of the summary information corresponding to the image based on the first N characters of the summary information. 1 The hexadecimal character corresponding to the directory name of the first-level storage directory is determined by the bit character, based on the first N of the corresponding summary information of the image. 2 The bit character determines the hexadecimal character corresponding to the directory name of the secondary storage directory, and so on.
[0042] In one embodiment, since the names of the storage directories at each level in the hierarchical storage structure are determined according to the summary information of the images stored in the storage directories at each level, after the server receives any image, it can calculate the summary information of any image and first extract the top N from the summary information according to the preset detection rules. 1 bit character, determine the first N 1 Whether the first N characters match the first-level directory name.1 If the first N characters match the name of the first-level directory, the first-level directory is determined as the target storage directory corresponding to the image in the hierarchical storage structure; 1 If the first N characters do not match the first-level directory name, you can take the first N characters in the summary information. 2 bit character, and determine the first N 2 Whether the first N characters match the secondary directory name. 2 If the first N characters match the name of the secondary directory, the secondary directory is determined as the target storage directory corresponding to the image in the hierarchical storage structure; and so on. 2 If the characters do not match the secondary directory name, the first N characters in the summary information are taken. 3 bit character, and determine the first N 3 Whether the bit character matches the third-level directory name.
[0043] In one embodiment, when storing multiple images needs to be stored in storage directories at various levels of a hierarchical storage structure, a similar method as described above can be used to determine in parallel the target storage directories corresponding to each of the multiple images in the hierarchical storage structure, and store each image in the corresponding target storage directory, thereby completing the hierarchical storage of multiple images.
[0044] It can be seen that the above preset detection rule is used to instruct the server to detect the target storage directory corresponding to the image in the hierarchical storage structure in the order from high-level storage directories to low-level storage directories. In addition, the preset storage rule can also be used to instruct the server to detect the target storage directory corresponding to the image in the hierarchical storage structure in the order from low-level storage directories to high-level storage directories. The present invention does not specifically limit the preset detection rule.
[0045] In addition, in the process of determining the target storage directory corresponding to the image in the hierarchical storage structure based on the summary information of the image, the server can also detect the storage status of the storage directories at each level in the hierarchical storage structure, and determine the storage directory whose storage status is not full as the storage directory to be stored, and determine the target storage directory corresponding to the image from the storage directory to be stored based on the summary information of the image.
[0046] In one embodiment, after the server stores the above image in the target storage directory, it can also obtain the annotation data of the image from the annotation engine, and store the annotation data of the image and the target storage directory in a structured database.
[0047] In one embodiment, when the server receives a request to adjust the annotation of an image, it can determine the storage directory to which the image belongs according to the summary information of the image, and obtain the historical annotation data of the image from the structured database according to the storage directory to which the image belongs, and then send the image and the historical annotation data of the image to the user terminal so that the user terminal displays the image and the historical annotation data of the image. Furthermore, an adjustment operation for the historical annotation data of the image can be received.
[0048] In a specific implementation, when the user wants to adjust the historical annotation data of one or more of the above images, a annotation adjustment request for the one or more images can be sent to the server through the user terminal. When the server receives the annotation adjustment request for the one or more images, the storage directory to which each image belongs can be determined according to the summary information of each image in the one or more images, and the historical annotation data of each image can be obtained from the structured database according to the storage directory to which each image belongs, and then the images and the historical annotation data of each image are sent to the user terminal. Further, the user terminal can display the images and the historical annotation data of each image. After the user views the images and the historical annotation data of each image, if it is determined that the historical annotation data of some of the one or more images is not accurate, the historical annotation data of the images (hereinafter referred to as the first images) whose historical annotation data are not accurate can be input for adjustment operation, and the user terminal sends the adjustment operation for the historical annotation data of each first image to the server. Further, after receiving the adjustment operation, the server can update the historical annotation data of each first image stored in the structured database according to the adjustment operation. The method of annotation engine annotation + manual annotation adjustment is conducive to improving the accuracy of the updated historical annotation data of each first image.
[0049] The annotation data of the above-mentioned image includes at least one of a detection frame, a key point and a classification category. The adjustment operation indicates the adjustment result of which annotation data the user adjusts. Exemplarily, assuming that the annotation data of image P1 includes the coordinates of the four vertices of the rectangular detection frame, the adjustment operation indicates that the coordinates of the four vertices of the rectangular detection frame are changed from (100, 300), (400, 300), (100, 100) and (400, 100) to (100, 400), (400, 400), (100, 100) and (400, 100). In this case, the server can adjust the coordinates of the four vertices of the rectangular detection frame corresponding to image P2 to (100, 400), (400, 400), (100, 100) and (400, 100) according to the adjustment operation.
[0050] In one embodiment, in addition to storing the historical annotation data of the image and the target storage directory to which the image belongs, the structured database may also store the annotation score of the image, which represents the accuracy of the standard data of the image. In view of this situation, the user may input a query condition through the user terminal and submit a annotation adjustment request, and the query condition may be, for example, that the annotation score of the image is less than or equal to a preset score threshold. Further, after receiving the annotation adjustment request carrying the query condition, the server may query the historical annotation data of the second image matching the query condition from the structured database, and obtain the first image from the target storage directory of the hierarchical storage structure based on the target storage directory of the second image stored in the structured database, and then output the second image and the historical annotation data of the second image to the user terminal. Further, after viewing the second image and the historical annotation data of the second image through the user terminal, the user may input an adjustment operation for the historical annotation data of the second image, and the user terminal may send the adjustment operation for the historical annotation data of the second image to the server, and the server may update the historical annotation data of the second image stored in the structured database according to the adjustment operation. Wherein, the second image may refer to one or more images.
[0051] S302: Using the updated historical annotation data of the image as training samples to train the image processing model, wherein the image processing model may include an annotation module for annotating the image, and the annotation module may be, for example, an InceptionV4 classification network.
[0052] In one embodiment, after the server updates the historical annotations of an image stored in a structured database based on an adjustment operation, the image and the updated historical annotation data of the image can be used as training samples, and an image processing model can be trained based on the training samples. The image processing model can be a classification model, a target detection model, etc., and can be used for image recognition, target tracking, etc.
[0053] Exemplarily, assuming that the image processing model is an image classification model, the trained image classification model can be used to capture images in a video and identify the categories of objects included in the captured images, such as faces, flowers, cats, dogs, etc.
[0054] S303: Annotate the image using the trained image processing model, and update the historical annotation data of the image according to the annotation result.
[0055] In one embodiment, the above-mentioned images include multiple images. After executing step S302 to train the image processing model, each of the above-mentioned multiple images can be annotated by the trained image processing model, and the historical annotation data corresponding to each image can be updated according to the annotation results of each image by the image processing model. In this way, the historical annotation data of each image is iteratively updated by the trained image processing model, so that the annotation data corresponding to each image is determined to be more accurate, which can provide more high-quality training samples for the subsequent training of the image processing model, thereby facilitating further improving the detection accuracy of the trained image processing model.
[0056] In an embodiment of the present invention, the server can obtain an adjustment operation for the annotation data of an image, and update the historical annotation data of the image stored in the structured database according to the adjustment operation, and use the updated historical annotation data of the image as a training sample to train the image processing model, and then perform annotation processing on the image through the trained image processing model, and update the historical annotation data of the image according to the annotation result. By adopting such a method of iteratively updating the historical annotation data of each image through the trained image processing model, the annotation data of the determined image is more accurate, and a better quality training sample can be provided for the subsequent training of the image processing model, which is conducive to improving the detection accuracy of the trained image processing model.
[0057] See also Figure 4 , is a flow chart of another image processing method according to an embodiment of the present invention, and the method according to the embodiment of the present invention can be executed by a server. The method according to the embodiment of the present invention includes the following steps.
[0058] S401: Acquire an adjustment operation for annotation data of an image, and update historical annotation data of the image stored in a structured database according to the adjustment operation.
[0059] S402: Using the updated historical annotation data of the image as training samples to train the image processing model.
[0060] S403: annotate the image using the trained image processing model, and update the historical annotation data of the image according to the annotation result. The specific implementation of steps S401 to S403 can refer to the relevant description of steps S301 to S303 in the above embodiment, which will not be repeated here.
[0061] S404: When a request for obtaining historical annotation data of a target image corresponding to a target source is received, historical annotation data of the target image is obtained from the historical annotation data of the image according to the source information of the image stored in the structured database. The target source may include one or more.
[0062] In one embodiment, in addition to storing the historical annotation data of each image and the storage directory corresponding to each image, the structured database also stores the source information of each image. The source information of each image is determined based on the summary information of each image. In the structured database, the historical annotation data, storage directory and summary information of each image are associated.
[0063] In one embodiment, when a user wants to obtain the historical annotation data of a target image under a target source, the user can enter the target source in the display interface corresponding to the user terminal and submit an acquisition request for the target source. The user terminal can send the acquisition request for the target source to the server to request the server to obtain the historical annotation data of the target image corresponding to the target source. Further, when the server receives the acquisition request, it can first determine the target source information matching the target source from at least one source information pre-stored in the structured storage structure, and then obtain the historical annotation data of the target image stored in association with the target source information, as well as the storage directory of the target image stored in association with the target source information, and obtain the target image from the hierarchical storage result based on the storage directory. Further, the target image and the historical annotation data of the target image can be sent to the user terminal.
[0064] S405: Send the target image and the historical annotation data of the target image to the user terminal, so that the historical annotation data of the target image is integrated and the annotation result of the test image using the annotation data obtained by the integration is displayed.
[0065] Among them, the integration processing may include merging processing and / or mining processing. In one embodiment, the user can merge or mine the target image under the target source and the historical annotation data of the target image through the user terminal to obtain the historical annotation data after the target image is processed. Furthermore, the user terminal can import the test image, and use the processed historical annotation data to annotate each test image, and display each test image and the annotation results of each test image on the display screen. After the user views the annotation results displayed on each test image, if it is determined that the annotation results displayed on each test image meet the design requirements, a confirmation indication can be input for the annotation result.
[0066] Exemplarily, assume that a certain test image is image P1, and the size of image P1 is 500*800. The processed historical annotation data includes a first rectangular detection frame, a classification category corresponding to the first rectangular detection frame is panda face, coordinates of the four vertices of the first rectangular detection frame (i.e., coordinates of the key points corresponding to the first rectangular detection frame), a second rectangular detection frame, a classification category corresponding to the second rectangular detection frame is panda, and coordinates of the four vertices of the second rectangular detection frame (i.e., coordinates of the key points corresponding to the second rectangular detection frame). In this case, the user terminal can use the processed historical annotation data to annotate image P1, and display image P1 and the annotation results of image P1 on a display screen. The display effect can be as follows: Figure 5 shown.
[0067] S406: When a confirmation instruction for the annotation result is received, the historical annotation data of the target image is updated according to the annotation data obtained through the integration process.
[0068] In one embodiment, the test images include multiple test images. When the user views the annotation results displayed on each of the multiple test images, if it is determined that the number of test images with accurate annotation results displayed in each test image is greater than or equal to a preset number threshold, a confirmation indication can be input for the annotation result. The preset number threshold can be adjusted according to actual design requirements. Further, the user terminal can send the confirmation indication to the server, and when the server receives the confirmation indication, it can update the historical annotation data of the target image according to the annotation data obtained by the integration process.
[0069] In one embodiment, after the server updates the historical annotation data of the target image according to the annotation data obtained by the integration process, the server can also store the updated historical annotation data of the target image in a designated field in a structured database, and the updated historical annotation data of the target image is used as a training sample for the image processing model. Among them, the designated field is used to indicate that the annotation data stored in the designated field is high-quality annotation data. When researchers need to use relevant annotation data for image model training (such as classification model training, target detection model training, etc.), they can directly obtain high-quality annotation data according to the designated field, and use the high-quality annotation data as a training sample to train the image processing model, so as to achieve iteration of high-quality annotation data and improve the detection accuracy of the trained image model.
[0070] In one embodiment, in step S402, the server uses the historical annotation data of the updated image as a training sample to train the image processing model. The historical annotation data of the updated image may be the historical annotation data of all updated images, or may be the updated historical annotation data corresponding to the specified image under the specified source. For example, when the user wants to make the annotation results of the trained image processing model for the image under the specified source more accurate, a training request can be input for the specified source through the user terminal. In this case, after receiving the training request, the server can obtain all the specified images under the specified source, as well as the updated historical annotation data corresponding to each specified image, and then use the updated historical annotation data of the specified image as a training sample to train the image processing model.
[0071] In an embodiment of the present invention, the server can obtain the historical annotation data of the target image from the historical annotation data of the image according to the source information of the image stored in the structured database, and send the target image and the historical annotation data of the target image to the user terminal, so as to integrate the historical annotation data of the target image, and display the annotation result of the test image using the annotation data obtained by the integration, and when receiving the confirmation indication for the annotation result, update the historical annotation data of the target image according to the annotation data obtained by the integration. In this way, the mining of the corresponding annotation data of the target image is realized, so that the updated historical annotation data of the target image is more accurate.
[0072] An embodiment of the present invention further provides a computer storage medium, in which program instructions are stored. When the program instructions are executed, they are used to implement the corresponding methods described in the above embodiments.
[0073] See also Figure 6 , is a structural diagram of an image processing device according to an embodiment of the present invention. The image processing device according to the embodiment of the present invention can be set in a server, or can also be set in some intelligent terminals with rich software and hardware resources, such as some personal computers.
[0074] In one implementation of the device according to an embodiment of the present invention, the device includes the following structure.
[0075] A communication module 60, used to obtain an adjustment operation for the annotation data of the image;
[0076] A processing module 61, configured to update the historical annotation data of the image stored in the structured database according to the adjustment operation, and use the updated historical annotation data of the image as training samples to train the image processing model;
[0077] The processing module 61 is further used to perform labeling processing on the image using the trained image processing model, and update the historical labeling data of the image according to the labeling result.
[0078] In one embodiment, the structured database further stores the source information of the image, and the communication module 60 may also be used to receive a request for obtaining historical annotation data of a target image corresponding to a target source; the processing module 61 is further used to obtain the historical annotation data of the target image from the historical annotation data of the image according to the source information of the image stored in the structured database when the communication module 60 receives the request for obtaining historical annotation data of the target image corresponding to the target source;
[0079] The communication module 60 is further used to send the target image and the historical annotation data of the target image to the user terminal, so as to integrate the historical annotation data of the target image and display the annotation result of the test image using the annotation data obtained by the integration process;
[0080] The processing module 61 is further configured to update the historical annotation data of the target image according to the annotation data obtained by the integration process when the communication module 60 receives a confirmation instruction for the annotation result.
[0081] In one embodiment, the processing module 61 may also be used to store the updated historical annotation data of the target image into a specified field in the structured database, and the updated historical annotation data of the target image is used as a training sample for the image processing model.
[0082] In one embodiment, the processing module 61 can also be used to obtain summary information of the image; determine the target storage directory corresponding to the image in the hierarchical storage structure according to the summary information of the image, and the hierarchical storage structure includes at least one level of storage directory; and store the image in the target storage directory.
[0083] In one embodiment, the processing module 61 may also be used to obtain annotation data of the image from the annotation engine; and store the annotation data of the image and the target storage directory in a structured database.
[0084] In one embodiment, the processing module 61 can also be used to determine the storage directory to which the image belongs based on the summary information of the image when a request for adjusting the annotation for the image is received through the communication module 60; obtain the historical annotation data of the image from the structured database based on the storage directory to which the image belongs; send the image and the historical annotation data of the image to the user terminal through the communication module 60, so that the user terminal displays the image and the historical annotation data of the image; and receive adjustment operations on the historical annotation data of the image through the communication module 60.
[0085] In one embodiment, the annotation data of the image includes at least one of a detection box, a key point, and a classification category.
[0086] In the embodiment of the present invention, the specific implementation of each of the above modules can refer to the description of the relevant contents in the embodiments corresponding to the above-mentioned figures.
[0087] The embodiment of the present invention can obtain the adjustment operation for the annotation data of the image, and update the historical annotation data of the image stored in the structured database according to the adjustment operation, use the updated historical annotation data of the image as a training sample to train the image processing model, and then perform annotation processing on the image through the trained image processing model, and update the historical annotation data of the image according to the annotation result. By adopting such a method of iteratively updating the historical annotation data of each image through the trained image processing model, the annotation data of the determined image is more accurate, and a better quality training sample can be provided for the subsequent training of the image processing model, which is conducive to improving the detection accuracy of the trained image processing model.
[0088] See also Figure 7 , is a schematic diagram of the structure of a server according to an embodiment of the present invention, wherein the server according to the embodiment of the present invention includes a power supply module and other structures, and includes a processor 701, a storage device 702, and a network interface 703. The processor 701, the storage device 702, and the network interface 703 can exchange data, and the processor 701 implements the corresponding image processing function.
[0089] The storage device 702 may include a volatile memory, such as a random-access memory (RAM); the storage device 702 may also include a non-volatile memory, such as a flash memory, a solid-state drive (SSD), etc.; the storage device 702 may also include a combination of the above-mentioned types of memory.
[0090] The network interface 703 can exchange data with other servers and various user terminals. The user terminal can send a label adjustment request for an image to the network interface 703, which is then output to the processor 701 of the server for processing.
[0091] The processor 701 may be a central processing unit (CPU) 701. In one embodiment, the processor 701 may also be a graphics processing unit (GPU) 701. The processor 701 may also be a combination of a CPU and a GPU. In the server, multiple CPUs and GPUs may be included as needed to perform corresponding image processing. In one embodiment, the storage device 702 is used to store program instructions. The processor 701 may call the program instructions to implement the various methods involved in the embodiments of the present invention.
[0092] In a first possible implementation, the processor 701 of the server calls the program instructions stored in the storage device 702 to obtain an adjustment operation on the annotation data of the image, and updates the historical annotation data of the image stored in the structured database according to the adjustment operation, uses the updated historical annotation data of the image as a training sample to train the image processing model, and annotates the image through the trained image processing model, and updates the historical annotation data of the image according to the annotation result.
[0093] In one embodiment, the structured database further stores source information of the image, and the network interface 703 may also be used to receive a request for obtaining historical annotation data of a target image corresponding to a target source; the processor 701 is further used to obtain historical annotation data of the target image from the historical annotation data of the image according to the source information of the image stored in the structured database when the network interface 703 receives the request for obtaining historical annotation data of the target image corresponding to the target source;
[0094] The network interface 703 is further used to send the target image and the historical annotation data of the target image to the user terminal, so as to integrate the historical annotation data of the target image and display the annotation result of the test image using the annotation data obtained by the integration;
[0095] The processor 701 is further configured to update the historical annotation data of the target image according to the annotation data obtained by the integration process when the network interface 703 receives a confirmation indication for the annotation result.
[0096] In one embodiment, the processor 701 may also be used to store the updated historical annotation data of the target image into a specified field in the structured database, and the updated historical annotation data of the target image is used as a training sample for the image processing model.
[0097] In one embodiment, the processor 701 can also be used to obtain summary information of the image; determine the target storage directory corresponding to the image in the hierarchical storage structure according to the summary information of the image, and the hierarchical storage structure includes at least one level of storage directory; and store the image in the target storage directory.
[0098] In one embodiment, the processor 701 may also be used to obtain annotation data for the image from an annotation engine; and store the annotation data of the image and the target storage directory in a structured database.
[0099] In one embodiment, the processor 701 can also be used to determine the storage directory to which the image belongs based on the summary information of the image when a request for adjusting the annotations for the image is received through the network interface 703; obtain the historical annotation data of the image from the structured database based on the storage directory to which the image belongs; send the image and the historical annotation data of the image to the user terminal through the network interface 703, so that the user terminal displays the image and the historical annotation data of the image; and receive an adjustment operation on the historical annotation data of the image through the network interface 703.
[0100] In one embodiment, the annotation data of the image includes at least one of a detection box, a key point, and a classification category.
[0101] In the embodiment of the present invention, the specific implementation of the processor 701 may refer to the description of the relevant contents in the embodiments corresponding to the aforementioned figures.
[0102] The embodiment of the present invention can obtain the adjustment operation for the annotation data of the image, and update the historical annotation data of the image stored in the structured database according to the adjustment operation, use the updated historical annotation data of the image as a training sample to train the image processing model, and then perform annotation processing on the image through the trained image processing model, and update the historical annotation data of the image according to the annotation result. By adopting such a method of iteratively updating the historical annotation data of each image through the trained image processing model, the annotation data of the determined image is more accurate, and a better quality training sample can be provided for the subsequent training of the image processing model, which is conducive to improving the detection accuracy of the trained image processing model.
[0103] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0104] The above disclosure is only part of the embodiments of the present invention, which certainly cannot be used to limit the scope of the rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments and equivalent changes made according to the claims of the present invention are still within the scope of the invention.
Claims
1. An image processing method, characterized in that: The method comprises: Get the summary information of the image; Determining a target storage directory corresponding to the image in a hierarchical storage structure according to the summary information of the image, wherein the hierarchical storage structure includes at least one level of storage directory; storing the image in the target storage directory; Obtaining annotation data for the image from an annotation engine; Storing the annotated data of the image and the target storage directory in a structured database; When receiving a request for adjusting a label for an image, determining a storage directory to which the image belongs according to summary information of the image; Acquire historical annotation data of the image from the structured database according to the storage directory to which the image belongs; Sending the image and the historical annotation data of the image to a user terminal so that the user terminal displays the image and the historical annotation data of the image; receiving an adjustment operation on the historical annotation data of the image, and updating the historical annotation data of the image stored in a structured database according to the adjustment operation; Using the updated historical annotation data of the image as training samples to train the image processing model; The image is annotated using the trained image processing model, and the historical annotation data of the image is updated according to the annotation result.
2. The method according to claim 1, characterized in that: The structured database also stores source information of the image. After the image is annotated by the trained image processing model and the historical annotation data of the image is updated according to the annotation result, the method further includes: When receiving a request for obtaining historical annotation data of a target image corresponding to a target source, obtaining historical annotation data of the target image from the historical annotation data of the image according to the source information of the image stored in the structured database; Sending the target image and the historical annotation data of the target image to a user terminal, so that the historical annotation data of the target image is integrated, and displaying the annotation result of the test image using the annotation data obtained by the integration; When a confirmation indication for the annotation result is received, the historical annotation data of the target image is updated according to the annotation data obtained by the integration process.
3. The method according to claim 2, characterized in that After updating the historical annotation data of the target image according to the annotation data obtained by the integration process, the method further includes: The updated historical annotation data of the target image is stored in a specified field in the structured database, and the updated historical annotation data of the target image is used as a training sample of the image processing model.
4. The method according to claim 1, characterized in that: The annotation data of the image includes at least one of a detection box, a key point, and a classification category.
5. An image processing device, characterized in that: The device comprises: A communication module, configured to receive a request for adjusting annotations of an image, and receive an adjustment operation for historical annotation data of the image; A processing module, configured to update the historical annotation data of the image stored in the structured database according to the adjustment operation, and use the updated historical annotation data of the image as training samples to train the image processing model; The processing module is further used to perform annotation processing on the image through the trained image processing model, and update the historical annotation data of the image according to the annotation result; The processing module is further used to obtain summary information of the image, determine a target storage directory corresponding to the image in a hierarchical storage structure according to the summary information of the image, the hierarchical storage structure includes at least one level of storage directory, and store the image in the target storage directory; The processing module is further used to obtain the annotation data of the image from the annotation engine, and store the annotation data of the image and the target storage directory in a structured database; The processing module is further configured to, when receiving a request for adjusting the annotation of an image through the communication module, determine the storage directory to which the image belongs according to the summary information of the image, and obtain the historical annotation data of the image from the structured database according to the storage directory to which the image belongs; The communication module is further configured to send the image and the historical annotation data of the image to a user terminal, so that the user terminal displays the image and the historical annotation data of the image.
6. A server, characterized in that: include: processor and storage device; The storage device is used to store program instructions; The processor calls the program instructions to execute the method according to any one of claims 1 to 4.
7. A computer storage medium, characterized in that: The computer storage medium stores program instructions, which, when executed, are used to implement the method according to any one of claims 1 to 4.
