Efficient image data intelligent enhanced transcoding method and system suitable for target detection

By adopting the intelligent enhanced transcoding method of efficient image data in the field of object detection, automated annotation updates and multi-format conversions of large-scale data sets are realized, solving the problem of inefficient data enhancement and annotation updates in the existing technology, and improving data processing Speed ​​and system performance.

CN119150802AActive Publication Date: 2024-12-17CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411603738.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2024-12-17
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

The existing technology is difficult to achieve efficient data enhancement and annotation update on large-scale data sets, resulting in performance bottlenecks when processing massive data, and manual annotation update is inefficient and cannot meet actual needs.

Method used

Using the intelligent enhanced transcoding method of efficient image data, the results are recorded and batch processed through operations such as random clipping, random flip, and random rotation. Combined with the image dataset annotation format conversion program, it automatically updates the annotation, supports three formats: XML, JSON, and TXT Convert each other to achieve automated dataset annotation updates.

Benefits of technology

It significantly improves data processing speed and system performance, saves computing power and time costs, improves the efficiency of data set maintenance and expansion, is suitable for large-scale image data processing, supports multi-format conversion, and enhances the universality and convenience of applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150802A_ABST
    Figure CN119150802A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and discloses an efficient image data intelligent enhanced transcoding method and system suitable for target detection. According to the method, all results of random clipping, random overturning and random rotating operations are recorded in a centralized text file, and the method is used for improving the efficiency and speed of image data enhancement in large-scale image data processing. According to the method, the random clipping, random rotation and random overturning results are centrally recorded and processed in batches, so that the disk I / O operation is remarkably reduced, and the processing speed and the system performance are improved. In order to improve the universality of the method, common TXT format annotations are supported, and a mutual conversion function among three annotation formats (XML, TXT and JSON) is also developed. Therefore, the method can be widely applied to various data sets in different formats, and great convenience is brought to developers to use in different projects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing technology, and in particular relates to a high-efficiency image data intelligent enhancement transcoding method and system suitable for target detection. Background Art

[0002] In the era of big data, the amount and complexity of data that deep learning models, especially object detection models, need to process has increased significantly. Object detection models such as YOLO (You Only Look Once) perform well in real-time detection tasks, but they are highly dependent on datasets. In order to improve the generalization ability and performance of the model, data augmentation has become a key step. However, updating annotations after data augmentation is a technical challenge, especially on large-scale datasets. Data augmentation can not only expand the dataset, but also improve the generalization ability of the model. In existing technologies, images are mainly augmented by random cropping, random flipping, random rotation, color processing, and random scaling. In the era of big data, the scale and diversity of data are increasing, which requires object detection models to be able to handle larger datasets. At the same time, the automation, efficiency, and accuracy of data augmentation and annotation updating become more important.

[0003] Currently, mainstream data augmentation libraries such as PyTorch and TensorFlow provide a wealth of image augmentation capabilities, but their support for annotation updates is relatively limited. This means that after enhancing the image, developers need to manually update the annotations, which is not only time-consuming but also error-prone. To address this challenge, some tools and libraries such as Albumentations have begun to introduce automatic annotation update functions. However, these methods perform poorly when processing large-scale data sets, and speed has become a key factor restricting their practical application.

[0004] Through the above analysis, the problems and defects of the existing technology are as follows: In the era of big data, processing and analyzing massive data sets has become an urgent need. Traditional data processing methods often face performance bottlenecks and cannot effectively cope with the sharp increase in data volume. First, the process of manually updating annotations is very cumbersome and almost infeasible for large-scale data sets. Especially when processing tens of millions or even hundreds of millions of images, the workload of manually labeling and updating annotations is huge and inefficient, which greatly limits the scope of application of data augmentation technology.

[0005] Even though some tools, such as Python's Albumentations library, provide an automatic annotation update function, their processing speed is difficult to meet actual needs. For example, when processing 10,000 images, although this number performs well on a small-scale dataset, its speed is insufficient when facing a larger dataset. This is mainly because the existing methods fail to fully optimize the computational efficiency in design and implementation, resulting in performance bottlenecks when processing high-dimensional data and complex operations. Summary of the invention

[0006] In order to overcome the problems existing in the related art, the disclosed embodiments of the present invention provide an efficient image data intelligent enhancement transcoding method and system suitable for target detection. The purpose of the present invention is to provide a technology that is efficient and can automatically update the annotations of image enhancement datasets, and can realize the mutual conversion between the three commonly used annotation formats (XML, JSON, TXT) in the field of target detection. This technology greatly shortens the time used to enhance data. Through this technology, users can save a lot of computing power and time costs, can more effectively maintain and expand data sets, and improve the training efficiency and accuracy of image processing and target detection algorithms. At the same time, this system supports flexible conversion of annotation formats in multiple formats, which greatly improves the versatility and convenience of its application.

[0007] The technical solution is as follows: an efficient image data intelligent enhancement transcoding method suitable for target detection, which records the results of all random cropping, random flipping, and random rotation operations in a centralized text file, and is used to improve the efficiency and speed of image data enhancement in large-scale image data processing; the method specifically includes the following steps: S1, performing image enhancement on the original data set using five data enhancement methods including random rotation, random flipping, random cropping, color processing, and random scaling to obtain a corresponding enhanced data set; the corresponding enhanced data set includes a random rotation enhanced data set, a random flipping enhanced data set, a random cropping enhanced data set, a color processing enhanced data set, and a random scaling enhanced data set; S2, export the obtained random rotation enhancement data set, random flip enhancement data set, and random crop enhancement data set, and combine them with the TXT annotation file converted by the created image data set annotation format conversion program, and record them into the random crop record.txt file, the random flip record.txt file, and the random rotation record.txt file respectively; S3, update the image annotations of the random cropping record.txt file, the random flipping record.txt file, and the random rotation record.txt file respectively to obtain the corresponding new annotation sets.

[0008] In step S1, the color processing enhanced data set and the random scaling enhanced data set are annotated using the original images.

[0009] In step S2, the created image dataset annotation format conversion programs include XML2TXT and JSON2TXT; This image dataset annotation format conversion program will extract the bounding box information of the target detection from the XML annotation file in PASCAL VOC format and convert the XML annotation file into a TXT annotation file in YOLO format.

[0010] In step S3, the record .txt file is randomly cropped to update the image annotation, and the new annotation set is obtained including: The width and height of the cropped image are , the calculation formula is: ; ; In the formula, The lower right corner of the cropped image coordinate, The upper left corner of the cropped image coordinate, The lower right corner of the cropped image coordinate, The upper left corner of the cropped image coordinate; The coordinates of the new bounding box are offset from the upper left corner of the cropped image. are the coordinates of the center point of the new bounding box, is the width and height of the new bounding box, calculated as: ; ; ; ; In the formula, is the upper left corner of the new bounding box coordinate, is the upper left corner of the new bounding box coordinate, is the lower right corner of the new bounding box coordinate, is the lower right corner of the new bounding box coordinate; Get the new bounding box After that, scale it to get the annotation of the cropped image. .

[0011] Get annotations for the cropped image The calculation formula is: ; ; ; ; In the formula, is the width of the cropped image, The height of the cropped image.

[0012] In step S3, the record .txt file is randomly flipped to update the image annotation, and the new annotation set is obtained including: The original annotation corresponding to the record is ,in, For categories, is the horizontal coordinate of the center point of the bounding box, is the ordinate of the center point of the bounding box, is the width of the bounding box, is the height of the bounding box; is the ratio of the bounding box to the original image, with the upper left corner as the origin. The updated annotation is .

[0013] In step S3, the randomly rotated record .txt file is used to update the image annotations, and a new annotation set is obtained including: If the first record of the random rotation record.txt file is ,in, is the file name, is the rotation angle, is the width of the original image, is the height of the original image; If the image is rotated counterclockwise, the calculation of the image annotation after counterclockwise rotation is updated, where, , , are the width and height of the rotated image respectively, and the expression is: ; ; ; ; ; ; ; ; In the formula, are the lengths of the sides in the counterclockwise rotated image; After obtaining the width and height of the new annotation box according to formula (17) and formula (18), the width, height and center coordinates of the new annotation box are scaled according to formula (7)-formula (10), and finally the annotation of the image after counterclockwise rotation is updated. .

[0014] If the image is rotated clockwise, the calculation of the image annotation after clockwise rotation is updated, where, is the absolute value of the rotation angle. The angle of clockwise rotation is negative, and the angle of counterclockwise rotation is positive. ; ; .

[0015] in, are the lengths of the sides in the clockwise rotated image.

[0016] Another object of the present invention is to provide a highly efficient image data intelligent enhancement transcoding system adapted for target detection, the system implements the highly efficient image data intelligent enhancement transcoding method adapted for target detection, the system comprising: An image enhancement module is used to perform image enhancement on the original data set by using five data enhancement methods, namely, random rotation, random flipping, random cropping, color processing, and random scaling, to obtain a corresponding enhanced data set; the corresponding enhanced data set includes a random rotation enhanced data set, a random flipping enhanced data set, a random cropping enhanced data set, a color processing enhanced data set, and a random scaling enhanced data set; The record .txt file acquisition module is used to export the obtained random rotation enhancement data set, random flip enhancement data set, and random crop enhancement data set, and at the same time, combine the TXT annotation file converted by the created image data set annotation format conversion program, and record them respectively into the random crop record .txt file, the random flip record .txt file, and the random rotation record .txt file; The new annotation set acquisition module is used to update the image annotations of the random cropping record .txt file, the random flipping record .txt file and the random rotation record .txt file respectively to obtain the corresponding new annotation set.

[0017] Furthermore, the system is mounted on a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can realize the functions of the above-mentioned efficient image data intelligent enhancement transcoding system suitable for target detection.

[0018] In combination with all the above-mentioned technical solutions, the beneficial effects possessed by the present invention are as follows: by introducing batch processing technology, the present invention has significant advantages in speed and versatility, and greatly improves the ability of data processing. Especially in the field of deep learning and target detection, the automatic update annotation function of the present invention significantly improves the efficiency and accuracy of data annotation, which is very critical for training high-precision models. Automatic update of annotations reduces the need for manual intervention, accelerates the data preparation process, and enables the model to learn and adapt to new data faster. Under the same hardware environment, in order to improve the versatility of the method, the present invention not only supports common TXT format annotations, but also develops mutual conversion functions between three annotation formats (XML, TXT, JSON). This makes the method widely applicable to data sets in various formats, greatly facilitating the use of developers in different projects.

[0019] This invention not only solves the performance bottleneck problem of large-scale data set processing, but also provides strong technical support for the practical application of deep learning target detection. This is especially important for big data application scenarios that require real-time or near-real-time data analysis and decision support, such as video surveillance, autonomous driving vehicle systems, medical image analysis, etc., which will benefit from it. Such technological progress is exactly the innovation needed in the big data era, which can make data analysis and processing more efficient, accurate and real-time.

[0020] This invention realizes efficient and automated management of image enhancement dataset annotations, significantly improves the efficiency of data preparation in the field of target detection and image processing, and provides a foundation for improving the speed and accuracy of model training, which can enable enterprises and research institutions to gain a competitive advantage in the development and implementation of AI vision models. The commercialization of this technology will promote the widespread application of intelligent image analysis technology, such as in unmanned driving, security monitoring, medical image analysis and other fields.

[0021] In terms of automatically updating image dataset annotations and reducing disk I / O operations, existing image processing tools or systems have failed to provide a complete solution that is both efficient and can save system resources. In addition, the flexible conversion function of multiple annotation formats provided by the present invention also solves the format dependency problem existing in the prior art and increases the applicability and flexibility of the system.

[0022] The present invention successfully solves the problem of low efficiency and high resource consumption when processing large-scale image data. This is a long-standing challenge in the field of image processing and object detection research, especially when processing high-definition and large-capacity image data. The present invention overcomes the technical bias in traditional image data processing, that is, it is believed that efficient image dataset management and annotation must rely on manual operation or inefficient single annotation format processing. Through the technical solution of automatic update and flexible conversion of multiple annotation formats, this technical bias is effectively solved, breaking through the limitations of traditional methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure; Figure 1 It is a flow chart of a highly efficient image data intelligent enhancement transcoding method suitable for target detection provided by an embodiment of the present invention; Figure 2 It is a data enhancement principle diagram of a high-efficiency image data intelligent enhancement transcoding method suitable for target detection provided by an embodiment of the present invention; Figure 3 is a flowchart of updating flipped image annotations provided by an embodiment of the present invention; Figure 4 is a flowchart of updating image annotations after random cropping provided by an embodiment of the present invention; Figure 5 is a flowchart of updating image annotations after random rotation provided by an embodiment of the present invention; Figure 6 is a calculation flow chart of image annotation after counterclockwise rotation provided by an embodiment of the present invention; Figure 7 This is a calculation flow chart of image annotation after clockwise rotation provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.

[0025] The innovation of the present invention is that the present invention significantly reduces disk I / O operations by centrally recording random cropping, random rotation, and random flipping results and processing them in batches, thereby improving processing speed and system performance. At the same time, this method not only optimizes resource management by effectively utilizing system resources and adopting modular design, but also enhances the maintainability and scalability of the system. This makes the present invention more advantageous and applicable when processing large-scale image data.

[0026] Batch processing optimization: The present invention records the results of all random cropping operations in a centralized text file so that the entire data set can be processed in batches. This method improves efficiency and speed in large-scale image data processing.

[0027] Reduce disk I / O operations: The present invention significantly reduces the number of disk writes, and only performs a batch write once all images are processed. This design reduces frequent disk I / O operations, thereby improving the overall performance of the system and reducing the load on the disk.

[0028] Efficient use of system resources: By recording and temporarily storing processing results, the present invention manages memory and storage resources more effectively. In an environment with limited resources, the use of resources can be optimized by adjusting the batch size to adapt to different operating environments.

[0029] Maintainability and scalability: Due to the modular processing flow (i.e., the three stages of clipping, recording, and updating are clearly separated), the present invention is easy to maintain and upgrade. For example, the clipping algorithm can be easily improved or the annotation file format can be changed without large-scale modifications to the entire system.

[0030] Embodiment 1, as Figure 1 As shown, the efficient image data intelligent enhancement transcoding method suitable for target detection provided by the embodiment of the present invention includes: S1, performing image enhancement on the original data set using five data enhancement methods including random rotation, random flipping, random cropping, color processing, and random scaling to obtain a corresponding enhanced data set; the corresponding enhanced data set includes a random rotation enhanced data set, a random flipping enhanced data set, a random cropping enhanced data set, a color processing enhanced data set, and a random scaling enhanced data set; S2, export the obtained random rotation enhancement data set, random flip enhancement data set, and random crop enhancement data set, and combine them with the TXT annotation file converted by the created image data set annotation format conversion program, and record them into the random crop record.txt file, the random flip record.txt file, and the random rotation record.txt file respectively; S3, update the image annotations of the random cropping record.txt file, the random flipping record.txt file, and the random rotation record.txt file respectively to obtain the corresponding new annotation sets.

[0031] Exemplarily, in step S1, data enhancement is often used in the field of target detection because it can improve the performance and generalization ability of the model. Common image data enhancement methods mainly include random rotation, random flipping, random cropping, color processing, random scaling, etc. Therefore, the present invention develops a Python program to perform corresponding annotation updates on the above five data enhancement methods.

[0032] For example, in the data augmentation method, color processing will not affect the size of the original image. Although random scaling will change the size of the original image and the annotation box, the label used by YOLO is the proportional size of the original image. Therefore, color processing and random scaling do not require updating the annotations, and the annotations of the original image can be used.

[0033] Exemplarily, in step S2, Figure 2 As shown, an image dataset annotation format conversion program is created. Specifically, in the field of target detection, the commonly used image data label formats are mainly XML, JSON, and TXT. Since the TXT format has the advantages of simplicity, small file size, easy processing and flexibility, and the label format used by the current mainstream target detection algorithm YOLO is TXT, an image dataset annotation format conversion program (a program for label format conversion) is created in the present invention, thereby obtaining the original image dataset and the image dataset label in TXT format.

[0034] The created image dataset annotation format conversion programs include XML2TXT and JSON2TXT.

[0035] This code will extract the bounding box information for object detection from the XML annotation file in PASCAL VOC format and convert it to a TXT annotation file in YOLO format. The code performs the following steps: Define the convert function to convert the bounding box information from VOC format to YOLO format. In the YOLO format, the bounding box is represented by the category label, center point coordinates (x, y), width and height, and all values ​​are normalized to [0, 1].

[0036] Define the convert_annotation function to process all XML files in the folder and convert each file into a corresponding TXT file.

[0037] The function first lists the XML files and creates an output TXT file name for each file.

[0038] It then parses the XML file to obtain information about the image dimensions and the target object.

[0039] For each target object in the XML file, the function extracts the class name, difficulty level, and bounding box coordinates.

[0040] If a target is not in the defined list of categories or is marked as difficult to identify, it is skipped.

[0041] Otherwise, it converts the category names to category indices and converts the bounding box coordinates to YOLO format.

[0042] Finally, write the YOLO formatted data into a TXT file.

[0043] In the __main__ block, the code defines the list of categories to be converted, classes, and the input and output paths for the XML and TXT files.

[0044] The code uses the convert_annotation function to actually perform the conversion.

[0045] In summary, this script is used to convert the annotation files in the PASCAL VOC dataset from XML format to the TXT format required for YOLO training; For example, in step S3, for random flipping, a common flipping method is to flip the image along the central y-axis (i.e., the vertical axis). The flipped image annotation update process of the present invention is as follows: Figure 3 As shown in the figure, the original data set is randomly flipped to obtain an enhanced data set. During data enhancement, the image flipping direction is recorded in the random flipping record .txt file. The original data set is combined with the program to obtain a new annotation set based on the .txt file.

[0046] Suppose a record in the random flip record.txt is ,in, is the file name, is the flipping direction. The original annotation corresponding to this record is ,in, For categories, is the horizontal coordinate of the center point of the bounding box, is the ordinate of the center point of the bounding box, is the width of the bounding box, is the height of the bounding box; is the ratio of the bounding box to the original image, with the upper left corner as the origin. The updated annotation is .

[0047] Exemplarily, in step S3, for random cropping, the image annotation update process after random cropping of the present invention is as follows: Figure 4 shown.

[0048] Take the first record of the random clipping record.txt file as an example, 00001 is the file name, is the width of the original image, is the height of the original image, The upper left corner of the cropped image coordinate, The upper left corner of the cropped image coordinate, The lower right corner of the cropped image coordinate, The lower right corner of the cropped image Coordinates (Note: coordinates are actual distances, with the upper left corner of the original image as the origin).

[0049] The original annotation set provides the same file name are the upper left corner of the original bounding box. Coordinates, top left corner of the original bounding box Coordinates, lower right corner of the original bounding box Coordinates, lower right corner of the original bounding box coordinate.

[0050] The upper left corner of the new bounding box Coordinates, upper left corner Coordinates, lower right corner Coordinates, lower right corner coordinate; After obtaining the vertex coordinates of the original bounding box, the upper left corner and the lower right corner of the cropped image, the coordinate points are compared as follows: Figure 4 As shown, the coordinate points of the upper left corner and the lower right corner of the new cropping frame are finally obtained.

[0051] Specifically include: Assume that the width and height of the cropped image are , the calculation formula is as follows: ; ; In the formula, The lower right corner of the cropped image coordinate, The upper left corner of the cropped image coordinate, The lower right corner of the cropped image coordinate, The upper left corner of the cropped image coordinate; The coordinates of the new bounding box are offset from the upper left corner of the cropped image. are the coordinates of the center point of the new bounding box, is the width and height of the bounding box, calculated as: ; ; ; ; In the formula, is the x coordinate of the upper left corner of the new bounding box, is the y coordinate of the upper left corner of the new bounding box, is the x-coordinate of the lower right corner of the new bounding box, is the y coordinate of the lower right corner of the new bounding box; Get the new bounding box After that, scale it to get the annotation of the cropped image. , the calculation formula is: ; ; ; ; In the formula, is the width of the cropped image, The height of the cropped image.

[0052] It can be understood that the above formula is used to calculate the new annotation of the image after random cropping (the x coordinate of the center point of the annotation box, the y coordinate of the center point of the annotation box, the width of the annotation box, and the height of the annotation box).

[0053] Exemplarily, in step S3, for random rotation, the image annotation update process after random rotation is as follows: Figure 5 As shown in the figure, the original data set is randomly rotated to obtain an enhanced data set. During data enhancement, various parameters of image rotation are recorded in a random rotation record .txt file. The original data set is combined with the program to obtain a new annotation set based on the .txt file.

[0054] If the first record of the random rotation record.txt file is ,in, is the file name, is the rotation angle, is the width of the original image, is the height of the original image; like Figure 5 , Figure 6As shown, if the image is rotated counterclockwise, the calculation of the image annotation after counterclockwise rotation is updated, where, , , are the width and height of the rotated image respectively, and the expression is: ; ; ; ; ; ; ; ; In the formula, are the lengths of the sides in the image after counterclockwise rotation; It can be understood that the above formula is used to calculate the new annotation (x coordinate of the center point of the annotation box, y coordinate of the center point of the annotation box, width of the annotation box, height of the annotation box) after the image is randomly rotated (counterclockwise rotation).

[0055] After obtaining the width and height of the new annotation box according to formula (17) and formula (18), the width, height and center coordinates of the new annotation box are scaled according to formula (7)-formula (10), and finally the annotation of the image after counterclockwise rotation is updated. .

[0056] If the image is rotated clockwise, the calculation of the image annotation after clockwise rotation is updated, where, is the absolute value of the rotation angle. The angle of clockwise rotation is negative, and the angle of counterclockwise rotation is positive. ; ; .

[0057] in, are the lengths of the sides in the clockwise rotated image.

[0058] It can be understood that the above formula is used to calculate the new annotation (x coordinate of the center point of the annotation box, y coordinate of the center point of the annotation box, width of the annotation box, height of the annotation box) after the image is randomly rotated (clockwise rotation).

[0059] Through the above embodiments, it can be seen that the existing image enhancement annotation update method uses the albumentations library in Python to perform data enhancement on a single image data and then update the annotation. Using the same data set (total) to perform a comparative experimental analysis using random cropping as an example, the execution time of the present invention is 25.24s, and the execution time of the existing method is 62s. The present invention saves 36.76s of time, which is 59.29% more efficient than the existing method. The specific advantages are reflected in the following aspects: Improve processing efficiency: By dividing the processing flow of the entire data set into three stages - trimming, recording and annotation updating, the present invention supports batch processing and significantly improves the speed of data processing. Batch execution of data trimming and annotation updating can significantly reduce the total processing time.

[0060] Optimize resource usage: Reducing disk I / O operations not only improves the system's response speed, but also effectively reduces hardware disk wear and tear, extending the system's service life. By centrally storing processing results, memory and storage space are better managed, which is particularly advantageous in resource-constrained systems.

[0061] Enhance system maintainability and scalability: The modular design of the present invention allows each processing unit (cutting, recording, updating) to be independently modified and upgraded without affecting other parts, which facilitates system maintenance and expansion. For example, image processing algorithms can be easily replaced or new data format support can be introduced without affecting the stable operation of the overall system.

[0062] Reduced environmental dependence: Since the dependence on high-speed disk I / O operations is reduced, the present invention is applicable to a wider range of hardware environments without the need to place special emphasis on high-performance disk systems, thereby reducing deployment costs and improving application flexibility and breadth.

[0063] The present invention is suitable for massive image data enhancement and annotation updating in the big data era, and can effectively improve data processing efficiency and save a lot of computing resources and time costs.

[0064] Embodiment 2, the embodiment of the present invention provides a high-efficiency image data intelligent enhancement transcoding system suitable for target detection, including: An image enhancement module is used to perform image enhancement on the original data set by using five data enhancement methods, namely, random rotation, random flipping, random cropping, color processing, and random scaling, to obtain a corresponding enhanced data set; the corresponding enhanced data set includes a random rotation enhanced data set, a random flipping enhanced data set, a random cropping enhanced data set, a color processing enhanced data set, and a random scaling enhanced data set; The record .txt file acquisition module is used to export the obtained random rotation enhancement data set, random flip enhancement data set, and random crop enhancement data set, and at the same time, combine the TXT annotation file converted by the created image data set annotation format conversion program, and record them respectively into the random crop record .txt file, the random flip record .txt file, and the random rotation record .txt file; The new annotation set acquisition module is used to update the image annotations of the random cropping record .txt file, the random flipping record .txt file and the random rotation record .txt file respectively to obtain the corresponding new annotation set.

[0065] To further illustrate the effects of the embodiments of the present invention, the following experiments are performed: The present invention proposes a batch processing mechanism: describing how to centrally process (crop) a large number of images, and how to uniformly record the cropped results in a file to optimize processing efficiency and reduce disk I / O operations.

[0066] Data aggregation and processing pipeline: Details the flow, management, and optimization of data in batch processing, including how to collect image data, perform batch cropping, and effectively integrate the results into the final annotation file.

[0067] Cache and temporary storage optimization: Emphasizes how to use memory cache or temporary storage strategies to effectively manage the large amount of data generated during batch processing, avoid resource exhaustion and maintain system performance.

[0068] Efficient Data Synchronization and Recovery Mechanism: Demonstrate the mechanism of data synchronization in batch processing, ensure the consistency of annotation and image data, and explain the data recovery strategy in case of possible system failure.

[0069] The present invention redefines the following technical points: A unified data enhancement and annotation update framework focuses on protecting the data processing flow design, especially the implementation methods of batch data enhancement and annotation synchronous update.

[0070] Data processing and I / O optimization methods focus on protecting data and reducing reliance on disk I / O during processing, including the implementation of cache usage and optimized write strategies.

[0071] The original data set (15052 images) is randomly rotated, randomly flipped, and randomly cropped using the technology proposed in this invention and the existing technology (albumentations library). The experimental results are shown in Table 1.

[0072] Table 1 Comparative experimental results

[0073] From Table 1, we can see that the efficiency of random cropping, random flipping, and random rotation is improved by 59.29%, 63.68%, and 34.63%, respectively.

[0074] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered within the protection scope of the present invention.

Claims

1. An efficient image data intelligent enhancement transcoding method suitable for target detection, characterized in that: The method records the results of all random cropping, random flipping, and random rotation operations in a centralized text file, and is used to improve the efficiency and speed of image data enhancement in large-scale image data processing. The method specifically includes the following steps: S1, performing image enhancement on the original data set using five data enhancement methods including random rotation, random flipping, random cropping, color processing, and random scaling to obtain a corresponding enhanced data set; the corresponding enhanced data set includes a random rotation enhanced data set, a random flipping enhanced data set, a random cropping enhanced data set, a color processing enhanced data set, and a random scaling enhanced data set; S2, export the obtained random rotation enhancement data set, random flip enhancement data set, and random crop enhancement data set, and combine them with the TXT annotation file converted by the created image data set annotation format conversion program, and record them into the random crop record.txt file, the random flip record.txt file, and the random rotation record.txt file respectively; S3, update the image annotations of the random cropping record.txt file, the random flipping record.txt file, and the random rotation record.txt file respectively to obtain the corresponding new annotation sets.

2. The efficient image data intelligent enhancement transcoding method adapted for target detection according to claim 1, characterized in that: In step S1, the color processing enhanced data set and the random scaling enhanced data set are annotated using the original images.

3. The efficient image data intelligent enhancement transcoding method adapted for target detection according to claim 1, characterized in that: In step S2, the created image dataset annotation format conversion programs include XML2TXT and JSON2TXT; This image dataset annotation format conversion program will extract the bounding box information of the target detection from the XML annotation file in PASCAL VOC format and convert the XML annotation file into a TXT annotation file in YOLO format.

4. The efficient image data intelligent enhancement transcoding method adapted for target detection according to claim 1, characterized in that: In step S3, the record .txt file is randomly cropped to update the image annotation, and the new annotation set is obtained including: The width and height of the cropped image are , the calculation formula is: ; ; In the formula, The lower right corner of the cropped image coordinate, The upper left corner of the cropped image coordinate, The lower right corner of the cropped image coordinate, The upper left corner of the cropped image coordinate; The coordinates of the new bounding box are offset from the upper left corner of the cropped image. are the coordinates of the center point of the new bounding box, is the width and height of the new bounding box, calculated as: ; ; ; ; In the formula, is the upper left corner of the new bounding box coordinate, is the upper left corner of the new bounding box coordinate, is the lower right corner of the new bounding box coordinate, is the lower right corner of the new bounding box coordinate; Get the new bounding box After that, scale it to get the annotation of the cropped image. .

5. The efficient image data intelligent enhancement transcoding method adapted for target detection according to claim 4, characterized in that: Get annotations for the cropped image The calculation formula is: ; ; ; ; In the formula, is the width of the cropped image, The height of the cropped image.

6. The efficient image data intelligent enhancement transcoding method adapted for target detection according to claim 1, characterized in that: In step S3, the record .txt file is randomly flipped to update the image annotation, and the new annotation set is obtained including: The original annotation corresponding to the record is ,in, For categories, is the horizontal coordinate of the center point of the bounding box, is the ordinate of the center point of the bounding box, is the width of the bounding box, is the height of the bounding box; is the ratio of the bounding box to the original image, with the upper left corner as the origin. The updated annotation is .

7. The efficient image data intelligent enhancement transcoding method adapted for target detection according to claim 1, characterized in that: In step S3, the randomly rotated record .txt file is used to update the image annotations, and a new annotation set is obtained including: If the first record of the random rotation record.txt file is ,in, is the file name, is the rotation angle, is the width of the original image, is the height of the original image; If the image is rotated counterclockwise, the calculation of the image annotation after counterclockwise rotation is updated, where, , , are the width and height of the rotated image respectively, and the expression is: ; ; ; ; ; ; ; ; In the formula, are the lengths of the sides in the counterclockwise rotated image; After obtaining the width and height of the new annotation box according to formula (17) and formula (18), the width, height and center coordinates of the new annotation box are scaled according to formula (7)-formula (10), and finally the annotation of the image after counterclockwise rotation is updated. .

8. The efficient image data intelligent enhancement transcoding method adapted for target detection according to claim 7, characterized in that: If the image is rotated clockwise, the calculation of the image annotation after clockwise rotation is updated, where, is the absolute value of the rotation angle. The angle of clockwise rotation is negative, and the angle of counterclockwise rotation is positive. ; ; ; in, are the lengths of the sides in the clockwise rotated image.

9. An efficient image data intelligent enhancement transcoding system suitable for target detection, characterized in that: The system implements the efficient image data intelligent enhancement transcoding method adapted for target detection as described in any one of claims 1 to 8, and the system comprises: An image enhancement module is used to perform image enhancement on the original data set by using five data enhancement methods, namely, random rotation, random flipping, random cropping, color processing, and random scaling, to obtain a corresponding enhanced data set; the corresponding enhanced data set includes a random rotation enhanced data set, a random flipping enhanced data set, a random cropping enhanced data set, a color processing enhanced data set, and a random scaling enhanced data set; The record .txt file acquisition module is used to export the obtained random rotation enhancement data set, random flip enhancement data set, and random crop enhancement data set, and at the same time, combine the TXT annotation file converted by the created image data set annotation format conversion program, and record them respectively into the random crop record .txt file, the random flip record .txt file, and the random rotation record .txt file; The new annotation set acquisition module is used to update the image annotations of the random cropping record .txt file, the random flipping record .txt file and the random rotation record .txt file respectively to obtain the corresponding new annotation set.

10. The efficient image data intelligent enhancement transcoding system adapted for target detection according to claim 9, characterized in that: The system is mounted on a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the functions of the efficient image data intelligent enhancement transcoding system suitable for target detection can be realized.

Citation Information

Patent Citations

  • Bird visual target detection method combining YOLO and rotation-fusion strategy

    CN112560675A

  • Large-format remote sensing image ship target detection method and system under small sample condition

    CN112580439A

  • Method for rapidly constructing aircraft classification data set based on remote sensing image

    CN113221773A

  • Crack defect detection system based on deep learning

    CN114119480A

  • Method for enhancing labeled samples for artificial intelligence training

    CN117670717A