Image augmentation methods and model training methods based on image augmentation
By expanding and segmenting the initial image using image augmentation methods, candidate panoramic images that meet the preset aspect ratio are generated. This solves the problem of high cost in obtaining labeled panoramic images and improves the detection accuracy of the panoramic image target detection model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2026-03-24
AI Technical Summary
In existing technologies, acquiring a large number of labeled panoramic images is costly and makes it difficult to effectively train deep learning models for object detection.
The initial image is expanded and segmented by an image augmentation method to generate a candidate panoramic image that meets the preset aspect ratio. The target detection box is selected in the candidate panoramic image, segmented and then stitched to generate the first augmented panoramic image.
It reduces the cost of acquiring labeled panoramic images, generates high-quality augmented panoramic images suitable for training panoramic image target detection models, and improves the detection accuracy of the models.
Smart Images

Figure CN114742704B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to image augmentation methods and image augmentation-based model training methods. Background Technology
[0002] Object detection algorithms can obtain the category and location information of objects in an image. The location information is usually represented by the coordinates of a rectangular detection box. Currently, the best-performing object detection algorithm is based on deep learning. A panoramic image is an image with an aspect ratio of 2:1, and it is generally composed of multiple images stitched together. According to the latitude-longitude unfolding method, the width of a panoramic image is latitude 0-2π, and the height of a panoramic image is longitude 0-π.
[0003] Training a deep learning model with a large number of labeled panoramic images enables the trained panoramic image detection model to perform well in handling target detection tasks in panoramic images. However, there are few publicly available panoramic images. A large number of labeled panoramic images can be obtained by manually taking pictures of real scenes and then labeling these images. However, this method is too costly.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] Therefore, it is necessary to address the aforementioned technical problems by providing an image augmentation method that facilitates the acquisition of a large number of high-quality labeled panoramic images and reduces the cost of acquiring such images, as well as a model training method based on image augmentation.
[0006] In a first aspect, this application provides an image augmentation method, comprising:
[0007] A labeled initial image is obtained, and the initial image is expanded to obtain a candidate panoramic image. The initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio.
[0008] A target detection box is selected in the candidate panoramic image, and the candidate panoramic image is segmented and stitched based on the target detection box to obtain a first augmented panoramic image, wherein the left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box.
[0009] Secondly, this application also provides a model training method based on image augmentation, including:
[0010] A labeled initial image is obtained, and the initial image is expanded to obtain a candidate panoramic image. The initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio.
[0011] If the candidate panoramic image meets the preset conditions, a target detection box is selected in the candidate panoramic image, and the candidate panoramic image is segmented and stitched based on the target detection box to obtain the first augmented panoramic image corresponding to the initial image. The left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box.
[0012] If the candidate panoramic image does not meet the preset conditions, then the candidate panoramic image is used as the second augmented panoramic image corresponding to the initial image;
[0013] Multiple labeled training panoramic images are obtained. The initial target detection model is trained using the multiple training panoramic images, multiple first augmented panoramic images corresponding to the multiple initial images, and multiple second augmented panoramic images corresponding to the multiple initial images, to obtain a panoramic image target detection model.
[0014] Thirdly, this application also provides an image augmentation apparatus, comprising:
[0015] An extension module is used to acquire an annotated initial image, extend the initial image to obtain a candidate panoramic image, wherein the initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio;
[0016] An augmented panoramic image determination module is used to select a target detection box in the candidate panoramic image, and to perform segmentation and stitching processing on the candidate panoramic image based on the target detection box to obtain a first augmented panoramic image, wherein the left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box.
[0017] Fourthly, this application also provides a model training device based on image augmentation, comprising:
[0018] The first image augmentation module is used to acquire an annotated initial image, expand the initial image to obtain a candidate panoramic image, wherein the initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio.
[0019] The second image augmentation module is used to select a target detection box in the candidate panoramic image if the candidate panoramic image meets the preset conditions, and to perform segmentation and stitching processing on the candidate panoramic image based on the target detection box to obtain a first augmented panoramic image corresponding to the initial image. The left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box.
[0020] The third image augmentation module is used to use the candidate panoramic image as the second augmented panoramic image corresponding to the initial image if the candidate panoramic image does not meet the preset conditions.
[0021] The training module is used to acquire multiple labeled training panoramic images, and to train the initial target detection model using the multiple training panoramic images, multiple first augmented panoramic images corresponding to the multiple initial images, and multiple second augmented panoramic images corresponding to the multiple initial images, to obtain a panoramic image target detection model.
[0022] Fifthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the aforementioned image augmentation method or the aforementioned image augmentation-based model training method.
[0023] Sixthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the aforementioned image augmentation method or the aforementioned image augmentation-based model training method.
[0024] Seventhly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the aforementioned image augmentation method or the aforementioned image augmentation-based model training method.
[0025] The image augmentation method described above acquires an annotated initial image, expands the initial image to obtain candidate panoramic images with a preset aspect ratio, segments and stitches the candidate panoramic images to obtain a first augmented panoramic image. The aspect ratio of the first augmented panoramic image satisfies the characteristics of the aspect ratio of the real panoramic image. Each first augmented panoramic image satisfies the characteristic that in the real panoramic image, part of the target is on the left side of the first augmented panoramic image, and another part of the target is on the right side of the first augmented panoramic image. Therefore, the first augmented panoramic image possesses the characteristics of the real panoramic image, and the obtained first augmented panoramic image has high quality. The image augmentation method described above makes it easy to obtain a large number of high-quality annotated panoramic images, reducing the cost of obtaining a large number of annotated panoramic images. Attached Figure Description
[0026] Figure 1 This is a diagram illustrating the application environment of the image augmentation method in one embodiment;
[0027] Figure 2 This is a flowchart illustrating an image augmentation method in one embodiment;
[0028] Figure 3 This is a schematic diagram of the process for obtaining candidate panoramic images in one embodiment;
[0029] Figure 4 This is a schematic diagram of the process for obtaining the first augmented panoramic image in one embodiment;
[0030] Figure 5 This is a flowchart illustrating a model training method based on image augmentation in one embodiment;
[0031] Figure 6 This is a structural block diagram of an image augmentation device in one embodiment;
[0032] Figure 7 This is a structural block diagram of a model training device based on image augmentation in one embodiment;
[0033] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0035] The image augmentation method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located in the cloud or on other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0036] Terminal 102 can obtain the labeled initial image through server 104, expand the initial image to obtain candidate panoramic images, and terminal 102 can also select target detection boxes in the candidate panoramic images, and perform segmentation and stitching processing on the candidate panoramic images based on the target detection boxes to obtain the first augmented panoramic image. Terminal 102 sends the first augmented panoramic image to server 104.
[0037] It should be noted that the above application environment is just an example. In some embodiments, the terminal 102 can send the acquired initial image to the server 104, and the server 104 can perform expansion, segmentation and stitching processing on the initial image to obtain the first augmented panoramic image; the server 104 then sends the first augmented panoramic image to the terminal 102.
[0038] In one embodiment, such as Figure 2 As shown, an image augmentation method is provided, which is applied to image augmentation methods. Figure 1 Taking the terminal in the example, the explanation includes the following steps:
[0039] S101. Obtain the labeled initial image, expand the initial image to obtain a candidate panoramic image.
[0040] The initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is the preset aspect ratio of the panoramic image. The aspect ratio of the panoramic image is the same as that of the real panoramic image, and the aspect ratio of the panoramic image is 1:2.
[0041] Specifically, obtaining a labeled initial image can involve acquiring the original image, detecting multiple targets within it, and annotating the detection bounding boxes for each target in the original image, resulting in a labeled initial image containing the detection bounding boxes for multiple targets. The original image is not a panoramic image; it uses a common aspect ratio, such as 3:4, 4:3, or 16:9. The initial image can also have an aspect ratio of 3:4, 4:3, or 16:9. Target detection and annotation of the original image can be performed using existing target detection and annotation tools. Alternatively, a labeled initial image can be obtained from an existing publicly available dataset.
[0042] Acquiring panoramic images and labeled panoramic images requires a significant investment of resources. In contrast, it is relatively easy to acquire a large number of labeled initial images of different scenes.
[0043] Based on the aspect ratio of the initial image, a copy of the image to be processed is obtained from the initial image. The height of the image to be processed is the same as the height of the initial image. The image to be processed and the initial image are then stitched together to obtain a candidate panoramic image.
[0044] If the above copying and stitching operation is performed on the initial image once and an image with the same aspect ratio as the panoramic image is not obtained, the above copying and stitching operation is continued on the obtained image until a candidate panoramic image with the same aspect ratio as the panoramic image is obtained.
[0045] The image to be processed includes a first side and a second side, where the first side is a side of the initial image. To obtain a candidate panoramic image, the image to be processed and the initial image are stitched together. This can be achieved by stitching the other side of the initial image with the first side of the image to be processed, thus making the first side of the image to be processed and the other side of the initial image adjacent in the candidate panoramic image.
[0046] Alternatively, the candidate panoramic image can be obtained by stitching the image to be processed and the initial image together. Another method is to stitch one side of the initial image with the second side of the image to be processed, so that the second side of the image to be processed and one side of the initial image are adjacent in the candidate panoramic image.
[0047] S102. Select a target detection box in the candidate panoramic image, and perform segmentation and stitching processing on the candidate panoramic image based on the target detection box to obtain a first augmented panoramic image.
[0048] Specifically, target detection boxes are selected in the candidate panoramic image. Based on the target detection boxes, the candidate panoramic image is divided into two parts, so that each of the two segmented images includes a portion of the target detection box. The two segmented images are then stitched together to form a first augmented panoramic image, such that a portion of the target detection box is on the left side of the first augmented panoramic image and the other portion of the target detection box is on the right side of the first augmented panoramic image. By stitching the left and right sides of the first augmented panoramic image together, a complete target detection box can be obtained.
[0049] The image augmentation method described above acquires an annotated initial image, expands the initial image to obtain candidate panoramic images with a preset aspect ratio, segments and stitches the candidate panoramic images to obtain a first augmented panoramic image. The aspect ratio of the first augmented panoramic image satisfies the characteristics of the aspect ratio of the real panoramic image. Each first augmented panoramic image satisfies the characteristic that in the real panoramic image, part of the target is on the left side of the first augmented panoramic image, and another part of the target is on the right side of the first augmented panoramic image. Therefore, the first augmented panoramic image possesses the characteristics of the real panoramic image, and the obtained first augmented panoramic image has high quality. The image augmentation method described above makes it easy to obtain a large number of high-quality annotated panoramic images, reducing the cost of obtaining a large number of annotated panoramic images.
[0050] In one embodiment, such as Figure 3 As shown, in S101, the initial image is expanded to obtain a candidate panoramic image, including:
[0051] S111. Determine the target width based on the initial height of the initial image, and determine the difference between the target width and the initial width of the initial image.
[0052] The ratio between the target width and the initial height is the aspect ratio of the panoramic image.
[0053] Specifically, the initial height h0 and initial width w0 of the initial image are obtained. Based on the preset aspect ratio of the panoramic image and the initial height h0, the target width w1 is determined. The aspect ratio of the panoramic image is 2:1, so the target width w1 is twice the initial height h0. The difference is obtained by subtracting the initial width from the target width.
[0054] For example, if the initial height h0 = 30 and the initial width w0 = 40 of the initial image, and the aspect ratio of the panoramic image is 1:2, then the target width w1 = 60, and the difference = w1 - w0 = 20.
[0055] S112. If the difference is less than or equal to the initial width, then the image to be processed is obtained from the initial image according to the initial height and the difference.
[0056] The image to be processed includes the boundary region on one side of the initial image.
[0057] Specifically, if the difference is less than or equal to the initial width, the image to be processed is obtained from the initial image. The width of the image to be processed is the difference, and the height is the initial height. When the difference is less than the initial width, the image to be processed is a part of the initial image. When the difference is equal to the initial width, the image to be processed is the initial image itself.
[0058] The boundary region on one side of the initial image can be the left side of the initial image, including multiple pixels on the left side of the initial image, or the right side of the initial image, including multiple pixels on the right side of the initial image. The boundary region on one side of the initial image is a rectangular region, the height of which is the initial height of the initial image, and the width of which is not limited.
[0059] In fact, the boundary region on one side of the initial image is used to represent the region on either the left or right side of the initial image, and the size and shape of the boundary region on one side of the initial image are not limited.
[0060] For example, if the initial height h0 = 30, the initial width w0 = 40, and the coordinates of all pixels in the initial image are (a, b), where 1 ≤ a ≤ 40, 1 ≤ b ≤ 30, and the aspect ratio of the panoramic image is 2:1, then the target width w1 = 60, and the difference = w1 - w0 = 20. Assume that the boundary region on one side of the initial image is the left side of the initial image, and a processing image with a width of 20 and a height of 30 is obtained from the initial image. This processing image consists of pixels with coordinates (x1, y1) in the initial image, where 1 ≤ x1 ≤ 20, 1 ≤ y1 ≤ 30. Similarly, assume that the boundary region on one side of the initial image is the right side of the initial image, and a processing image with a width of 20 and a height of 30 is obtained from the initial image. This processing image consists of pixels with coordinates (x2, y2) in the initial image, where 21 ≤ x2 ≤ 40, 1 ≤ y2 ≤ 30.
[0061] S113. If the difference is greater than the initial width, then copy the initial image to obtain a copied image, and stitch the copied image and the initial image together to obtain a stitched image.
[0062] Specifically, if the difference is greater than the initial width, the initial image is copied and then stitched together with the initial image. This stitching is done in the width direction of the initial image, so that the height of the stitched image is the initial height and the width of the stitched image is twice the initial width.
[0063] S114. Take the stitched image as the initial image and repeat the process of determining the difference between the target width and the initial width of the initial image until the determined difference is less than or equal to the initial width.
[0064] Specifically, the stitched image is used as the initial image, and S111 is executed again. If the difference obtained after executing S111 again is greater than the initial width, then proceed to S113. This process is repeated until the difference obtained after executing S111 is less than or equal to the initial width, then proceed to S112.
[0065] S115. The image to be processed is stitched together with the initial image to obtain a candidate panoramic image.
[0066] Specifically, the image to be processed is stitched together with the initial image in the width direction of the initial image. The height of the candidate panoramic image is the same as the initial height, and the width of the candidate panoramic image is twice the initial width.
[0067] The initial image includes a first boundary region and a second boundary region, and the image to be processed includes either the first boundary region or the second boundary region. In one implementation, the image to be processed is stitched together with the initial image, which can be done by stitching the image to be processed together with the second boundary region of the initial image to obtain a candidate panoramic image. In this implementation, the first boundary region included in the image to be processed and the second boundary region included in the initial image are adjacent in the candidate panoramic image.
[0068] For example, the first boundary region is the region on the left side of the initial image, and the second boundary region is the region on the right side of the initial image. The image to be processed is stitched to the right side of the initial image so that the first boundary region included in the image to be processed in the candidate panoramic image is adjacent to the second boundary region included in the initial image.
[0069] In another implementation, the image to be processed is stitched together with the initial image. This can be done by stitching the first boundary region of the image to be processed together with the first boundary region of the initial image to obtain a candidate panoramic image. In this implementation, the first boundary region of the image to be processed is not adjacent to the first boundary region and the second boundary region of the initial image in the candidate panoramic image.
[0070] For example, the first boundary region is the region on the left side of the initial image, and the second boundary region is the region on the right side of the initial image. The image to be processed is stitched to the left side of the initial image so that the first boundary region included in the image to be processed is not adjacent to the first boundary region and the second boundary region included in the initial image.
[0071] In one embodiment, S101 includes:
[0072] Obtain an labeled initial image. If the aspect ratio of the initial image meets a preset expansion condition, expand the initial image to obtain a candidate panoramic image.
[0073] Specifically, after acquiring the labeled initial image, it is determined whether the aspect ratio of the initial image meets the preset expansion conditions. If the aspect ratio of the initial image meets the preset expansion requirements, the initial image is expanded to obtain a candidate panoramic image; if the aspect ratio of the initial image does not meet the preset expansion requirements, the initial image is discarded. The preset expansion conditions include: the difference between the aspect ratio of the initial image and the preset aspect ratio of the panoramic image is greater than or equal to a preset tolerance value.
[0074] The preset tolerance value is a small number. If the difference between the aspect ratio w0 / h0 of the initial image and the aspect ratio of the panoramic image is less than the preset tolerance value, it means that the aspect ratio of the initial image is close to or exceeds that of the panoramic image, and the initial image is discarded. The aspect ratio of the panoramic image is 2, and the preset tolerance value can be set to 0.2. The preset extension condition can be expressed as: 2 - w0 / h0 ≤ eps, where w0 / h0 is the aspect ratio of the initial image, 2 is the aspect ratio of the panoramic image, and eps is the preset tolerance value.
[0075] In one embodiment, in S102, selecting a target detection box in the candidate panoramic image includes: randomly selecting one detection box as the target detection box from all the detection boxes included in the candidate panoramic image.
[0076] To avoid randomly selected target detection boxes occupying a small area in the candidate panoramic image, in one embodiment, selecting target detection boxes in the candidate panoramic image includes: selecting the detection box with the largest area from all detection boxes in the candidate panoramic image as the target detection box.
[0077] Specifically, since the initial image contains multiple detection boxes, an expansion operation is performed on the initial image to obtain a candidate panoramic image. The candidate panoramic image contains at least multiple detection boxes from the initial image. The area of each detection box in the candidate panoramic image is determined, and the detection box with the largest area is selected as the target detection box.
[0078] In one embodiment, S102, the step of segmenting and stitching the candidate panoramic image based on the target detection box to obtain the first augmented panoramic image includes:
[0079] S212. Select a target pixel in the target detection box and determine a dividing line that passes through the target pixel and is perpendicular to the horizontal axis of the image coordinate system of the candidate panoramic image.
[0080] Specifically, selecting a target pixel in the target detection box involves selecting a target pixel from multiple pixels within the target detection box. This can be done by randomly selecting one pixel from the multiple pixels within the target detection box, or by selecting the pixel located at the center of the target detection box from the multiple pixels within the target detection box.
[0081] The origin of the image coordinate system for the candidate panoramic image is the pixel at the top left corner of the image. The pixels in the candidate panoramic image are distributed in a matrix. The horizontal axis of the image coordinate system is parallel to the straight line formed by any row of pixels in the candidate panoramic image, and the vertical axis is parallel to the straight line formed by any column of pixels in the candidate panoramic image. The dividing line is the straight line formed by all pixels in the same column as the target pixel in the candidate panoramic image.
[0082] S213. Based on the dividing line, the candidate panoramic image is divided into a first image and a second image.
[0083] The first image includes the left boundary region of the candidate panoramic image, and the second image includes the right boundary region of the candidate panoramic image.
[0084] Specifically, the left boundary region of the candidate panoramic image includes multiple pixels on the left side of the candidate panoramic image, and the right boundary region of the candidate panoramic image includes multiple pixels on the right side of the candidate panoramic image. Both the left and right boundary regions are rectangular regions, and their heights are the initial heights of the initial image. The widths of the left and right boundary regions are not limited.
[0085] The candidate panoramic image is segmented into a first image and a second image based on the segmentation line, such that part of the object detection box is in the first image and the other part is in the second image.
[0086] S214. The first image and the second image are stitched together to obtain the first augmented panoramic image.
[0087] In the first augmented panoramic image, the left boundary region and the right boundary region are adjacent.
[0088] Specifically, the left boundary region of the first image is stitched together with the right boundary region of the second image to obtain a first augmented panoramic image, wherein the left and right boundary regions are adjacent in the first augmented panoramic image. The width and height of the first augmented panoramic image are the same as those of the candidate panoramic image.
[0089] Since part of the target detection box is in the first image and another part is in the second image, in the first augmented panoramic image, part of the target detection box is on the right side of the first augmented panoramic image and the other part is on the left side of the first augmented panoramic image.
[0090] For example, such as Figure 4 As shown, the candidate panoramic image P1 includes a target detection box M00, and the target corresponding to the target detection box M00 is a car. Based on the target detection box M00, the candidate panoramic image P1 is segmented into a first image P2 and a second image P3. The part of the target detection box M00 in the first image P2 is M01, and the part of the target detection box M00 in the second image P3 is M02. The first image P2 and the second image P3 are stitched together to obtain a first augmented panoramic image P4. In the first augmented panoramic image P4, M01 and M02 are located on the left and right sides of P4, respectively.
[0091] In this embodiment, an initial labeled image is acquired, and the initial image is expanded to obtain a candidate panoramic image with a preset aspect ratio. The candidate panoramic image is then segmented and stitched together to obtain a first augmented panoramic image. The aspect ratio of the first augmented panoramic image satisfies the characteristics of the aspect ratio of the real panoramic image. Each first augmented panoramic image satisfies the characteristic that in the real panoramic image, part of the target is on the left side of the first augmented panoramic image, and another part of the target is on the right side of the first augmented panoramic image. Therefore, the first augmented panoramic image possesses the characteristics of the real panoramic image, and the obtained first augmented panoramic image has high quality. The above image augmentation method makes it easy to obtain a large number of high-quality labeled panoramic images, reducing the cost of obtaining a large number of labeled panoramic images.
[0092] This application also provides a model training method based on image augmentation, such as... Figure 5 As shown, the model training methods based on image augmentation include:
[0093] M100. Obtain the labeled initial image, expand the initial image to obtain a candidate panoramic image, wherein the initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio.
[0094] Specifically, the process of obtaining the candidate panoramic image in M100 is the same as the process of obtaining the candidate panoramic image in S101 in the above image augmentation method. Therefore, the specific process of obtaining the candidate panoramic image in M100 can be found in the above description of the process of obtaining the candidate panoramic image in S101.
[0095] M200. If the candidate panoramic image meets the preset conditions, a target detection box is selected in the candidate panoramic image, and the candidate panoramic image is segmented and stitched based on the target detection box to obtain the first augmented panoramic image corresponding to the initial image. The left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box.
[0096] The preset conditions are as follows: the random number corresponding to the candidate panoramic image is greater than a preset probability value. This random number is generated after obtaining the candidate panoramic image and can be set to a value between 0 and 1, meaning the maximum value is 1 and the minimum value is 0. The left side of the first augmented panoramic image includes a portion of the target detection box, and the right side of the first augmented panoramic image includes another portion of the target detection box. The preset probability value reflects the probability of segmenting and stitching the candidate panoramic image, and can also reflect the probability that part of the target is on the left side of the panoramic image and another part is on the right side. The preset probability value can be set to 0.5.
[0097] Specifically, after obtaining the candidate panoramic image, a random number between 0 and 1 is generated. If the generated random number is greater than the preset probability value, the candidate panoramic image is determined to meet the preset conditions. When the candidate panoramic image meets the preset conditions, the process of obtaining the first amplified panoramic image in M200 is the same as the process of obtaining the first amplified panoramic image in S102 of the above image amplification method. Therefore, the specific process of obtaining the first amplified panoramic image in M200 can be found in the above description of the process of obtaining the first amplified panoramic image in S102.
[0098] M300. If the candidate panoramic image does not meet the preset conditions, then the candidate panoramic image is used as the second augmented panoramic image corresponding to the initial image.
[0099] Specifically, if the random number generated after obtaining the candidate panoramic image is less than or equal to the preset probability value, for example, if the preset probability value is 0.5 and the random number generated after obtaining the candidate panoramic image is 0.4, then the candidate panoramic image does not meet the preset condition, and the candidate panoramic image is used as the second augmented panoramic image corresponding to the initial image.
[0100] Compared with the first amplified panoramic image, the second amplified panoramic image does not contain a detection box that is partially on the left and partially on the right of the second amplified image.
[0101] M400: Acquire multiple labeled training panoramic images; train the initial target detection model using the multiple training panoramic images, multiple first augmented panoramic images corresponding to the multiple initial images, and multiple second augmented panoramic images corresponding to the multiple initial images, to obtain a panoramic image target detection model.
[0102] The initial object detection model is the model used to perform object detection. The initial object detection model can be Faster R-CNN, SSD, or YOLO.
[0103] Specifically, the labeled training panoramic images are obtained by taking panoramic images with a panoramic photography device and then labeling the captured panoramic images; the multiple first amplified panoramic images and the multiple second amplified panoramic images are obtained by performing the above steps M100 to M300 on the multiple initial images respectively.
[0104] When the random number generated after obtaining the candidate panoramic image is less than or equal to the preset probability value, the candidate panoramic image is segmented and then stitched together to obtain the first augmented panoramic image corresponding to the initial image. When the random number generated after obtaining the candidate panoramic image is greater than the preset probability value, the candidate panoramic image is directly used as the second augmented panoramic image corresponding to the initial image. Therefore, the ratio of the number of multiple first augmented panoramic images to the number of multiple second augmented panoramic images is (1 - preset probability value): preset probability value. For example, if the preset probability value is 0.6, the ratio between the number of multiple first augmented panoramic images and the number of multiple second augmented panoramic images is 0.4:0.6.
[0105] The aspect ratios of multiple first and second augmented panoramic images are equal to the preset aspect ratio of the real panoramic image. Therefore, the multiple first and second augmented panoramic images satisfy the aspect ratio characteristics of the real panoramic image. The multiple first augmented panoramic images include one where a portion of the target detection box is on the left side and another portion is on the right side. Therefore, the multiple first augmented panoramic images satisfy the characteristic that in the real panoramic image, a portion of the target is on the left side and another portion is on the right side. The multiple first and second augmented panoramic images do not include the distortion features of the real panoramic image. Therefore, multiple labeled training panoramic images are obtained, and these labeled training panoramic images include distortion features. The initial object detection model is trained using multiple training panoramic images, multiple first-amplified panoramic images, and multiple second-amplified panoramic images. This allows the initial object detection model to learn more features from the panoramic images, resulting in a more accurate panoramic image object detection model. By using multiple first-amplified and second-amplified panoramic images as partial training data, the training cost of the panoramic image object detection model is significantly reduced while maintaining its accuracy.
[0106] The panoramic image target detection model is used to perform target detection tasks in panoramic images. The panoramic image to be detected is input into the panoramic image target detection model, and multiple targets in the panoramic image to be detected are detected by the panoramic image target detection model to obtain a detection image. The detection image includes the type and location information of the multiple detected targets, and the location information of each target is marked in the detection image using detection boxes.
[0107] If a target exists in a panoramic image where one part is on the left side and the other part is on the right side, the panoramic image target detection model can identify that the part on the left side and the part on the right side are the same target.
[0108] In one embodiment, setting the number of training panoramic images used for training to be less than the number of first augmented panoramic images and second augmented panoramic images can significantly reduce the training cost of the panoramic image object detection model.
[0109] The above-described method for generating a panoramic image target detection model involves acquiring an annotated initial image, expanding the initial image to obtain candidate panoramic images with a preset aspect ratio, segmenting and stitching the candidate panoramic images when they meet preset conditions to obtain a first expanded panoramic image corresponding to the initial image, and using the candidate panoramic image as a second expanded panoramic image corresponding to the initial image when it does not meet preset conditions. The initial target detection model is trained using multiple training panoramic images, multiple first expanded panoramic images corresponding to multiple initial images, and multiple second expanded panoramic images corresponding to multiple initial images to obtain the panoramic image target detection model. The aspect ratio of the second augmented panoramic image satisfies the aspect ratio characteristics of the real panoramic image. Each first augmented panoramic image satisfies the characteristic that in the real panoramic image, part of the target is on the left side of the first augmented panoramic image and the other part of the target is on the right side of the second augmented panoramic image. Multiple training panoramic images satisfy the distortion characteristics of the real panoramic image. The panoramic image target detection model trained based on multiple training panoramic images, multiple first augmented panoramic images, and multiple second augmented panoramic images has high accuracy. During training, multiple first augmented panoramic images and multiple second augmented panoramic images are used as part of the training data, which significantly reduces the training cost of the panoramic image target detection model while ensuring its accuracy.
[0110] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0111] Based on the same inventive concept, this application also provides an image augmentation apparatus for implementing the image augmentation method described above. The solution provided by this image augmentation is similar to the implementation scheme described in the image augmentation method above. Therefore, the specific limitations in one or more image augmentation apparatus embodiments provided below can be found in the limitations of the image augmentation method described above, and will not be repeated here.
[0112] In one embodiment, such as Figure 6As shown, an image augmentation device is provided, comprising:
[0113] The extension module 101 is used to acquire an annotated initial image, expand the initial image to obtain a candidate panoramic image, wherein the initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio.
[0114] The augmented panoramic image determination module 102 is used to select a target detection box in the candidate panoramic image, and perform segmentation and stitching processing on the candidate panoramic image based on the target detection box to obtain a first augmented panoramic image, wherein the left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box.
[0115] In one embodiment, the extension module includes:
[0116] The difference determination unit is used to determine the target width based on the initial height of the initial image, and to determine the difference between the target width and the initial width of the initial image, wherein the ratio between the target width and the initial height is the aspect ratio of the panoramic image;
[0117] The image to be processed determination unit is configured to, if the difference is less than or equal to the initial width, obtain the image to be processed in the initial image according to the initial height and the difference, wherein the image to be processed includes a boundary region on one side of the initial image;
[0118] The first stitching unit is used to stitch the image to be processed with the initial image to obtain a candidate panoramic image.
[0119] In one embodiment, the extension module further includes:
[0120] The second stitching unit is used to copy the initial image if the difference is greater than the initial width, to obtain a copied image, and to stitch the copied image and the initial image together to obtain a stitched image;
[0121] The loop unit is used to take the stitched image as the initial image and repeat the process of determining the difference between the target width and the initial width of the initial image until the determined difference is less than or equal to the initial width.
[0122] In one embodiment, the augmented panoramic image determination module further includes:
[0123] The target detection box determination unit is used to select the detection box with the largest area from all detection boxes in the candidate panoramic image as the target detection box.
[0124] In one embodiment, the augmented panoramic image determination module further includes:
[0125] A segmentation line determination unit is used to select a target pixel in the target detection box and determine a segmentation line that passes through the target pixel and is perpendicular to the horizontal axis of the image coordinate system of the candidate panoramic image.
[0126] A segmentation unit is configured to segment the candidate panoramic image into a first image and a second image based on the segmentation line, wherein the first image includes the left boundary region of the candidate panoramic image and the second image includes the right boundary region of the candidate panoramic image.
[0127] The third stitching unit is used to stitch the first image and the second image together to obtain a first augmented panoramic image, wherein the left boundary region and the right boundary region are adjacent in the first augmented panoramic image.
[0128] The various modules in the image augmentation described above can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0129] Based on the same inventive concept, this application also provides an image augmentation-based model training apparatus for implementing the image augmentation-based model training method described above. The solution provided by this image augmentation-based model training apparatus is similar to the implementation scheme described in the image augmentation-based model training method above. Therefore, the specific limitations in one or more embodiments of the image augmentation-based model training apparatus provided below can be found in the limitations of the image augmentation-based model training method described above, and will not be repeated here.
[0130] In one embodiment, such as Figure 7 As shown, an image augmentation-based model training device is provided, comprising:
[0131] The first image augmentation module 201 is used to acquire an annotated initial image, expand the initial image to obtain a candidate panoramic image, wherein the initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio.
[0132] The second image augmentation module 202 is used to select a target detection box in the candidate panoramic image if the candidate panoramic image meets the preset conditions, and to perform segmentation and stitching processing on the candidate panoramic image based on the target detection box to obtain a first augmented panoramic image corresponding to the initial image, wherein the left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box.
[0133] The third image augmentation module 203 is used to use the candidate panoramic image as the second augmented panoramic image corresponding to the initial image if the candidate panoramic image does not meet the preset conditions.
[0134] The training module 204 is used to acquire multiple labeled training panoramic images, and to train the initial target detection model using the multiple training panoramic images, multiple first augmented panoramic images corresponding to the multiple initial images, and multiple second augmented panoramic images corresponding to the multiple initial images, to obtain a panoramic image target detection model.
[0135] In one embodiment, the preset condition includes that the random number corresponding to the candidate panoramic image is greater than a preset probability value, wherein the random number corresponding to the candidate panoramic image is a random number generated after obtaining the candidate panoramic image.
[0136] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements an image augmentation method or an image augmentation-based model training method. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0137] Those skilled in the art will understand that Figure 8The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0138] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0139] A labeled initial image is obtained, and the initial image is expanded to obtain a candidate panoramic image. The initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio.
[0140] A target detection bounding box is selected in the candidate panoramic image, and the candidate panoramic image is segmented and then stitched together based on the target detection bounding box to obtain a first augmented panoramic image. The left side of the first augmented panoramic image includes a portion of the target detection bounding box, and the right side of the first augmented panoramic image includes the other portion of the target detection bounding box; or...
[0141] A labeled initial image is obtained, and the initial image is expanded to obtain a candidate panoramic image. The initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio.
[0142] If the candidate panoramic image meets the preset conditions, a target detection box is selected in the candidate panoramic image, and the candidate panoramic image is segmented and stitched based on the target detection box to obtain the first augmented panoramic image corresponding to the initial image. The left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box.
[0143] If the candidate panoramic image does not meet the preset conditions, then the candidate panoramic image is used as the second augmented panoramic image corresponding to the initial image;
[0144] Multiple labeled training panoramic images are obtained. The initial target detection model is trained using the multiple training panoramic images, multiple first augmented panoramic images corresponding to the multiple initial images, and multiple second augmented panoramic images corresponding to the multiple initial images, to obtain a panoramic image target detection model.
[0145] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0146] A labeled initial image is obtained, and the initial image is expanded to obtain a candidate panoramic image. The initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio.
[0147] A target detection bounding box is selected in the candidate panoramic image, and the candidate panoramic image is segmented and then stitched together based on the target detection bounding box to obtain a first augmented panoramic image. The left side of the first augmented panoramic image includes a portion of the target detection bounding box, and the right side of the first augmented panoramic image includes the other portion of the target detection bounding box; or...
[0148] A labeled initial image is obtained, and the initial image is expanded to obtain a candidate panoramic image. The initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio.
[0149] If the candidate panoramic image meets the preset conditions, a target detection box is selected in the candidate panoramic image, and the candidate panoramic image is segmented and stitched based on the target detection box to obtain the first augmented panoramic image corresponding to the initial image. The left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box.
[0150] If the candidate panoramic image does not meet the preset conditions, then the candidate panoramic image is used as the second augmented panoramic image corresponding to the initial image;
[0151] Multiple labeled training panoramic images are obtained. The initial target detection model is trained using the multiple training panoramic images, multiple first augmented panoramic images corresponding to the multiple initial images, and multiple second augmented panoramic images corresponding to the multiple initial images, to obtain a panoramic image target detection model.
[0152] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0153] A labeled initial image is obtained, and the initial image is expanded to obtain a candidate panoramic image. The initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio.
[0154] A target detection bounding box is selected in the candidate panoramic image, and the candidate panoramic image is segmented and then stitched together based on the target detection bounding box to obtain a first augmented panoramic image. The left side of the first augmented panoramic image includes a portion of the target detection bounding box, and the right side of the first augmented panoramic image includes the other portion of the target detection bounding box; or...
[0155] A labeled initial image is obtained, and the initial image is expanded to obtain a candidate panoramic image. The initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio.
[0156] If the candidate panoramic image meets the preset conditions, a target detection box is selected in the candidate panoramic image, and the candidate panoramic image is segmented and stitched based on the target detection box to obtain the first augmented panoramic image corresponding to the initial image. The left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box.
[0157] If the candidate panoramic image does not meet the preset conditions, then the candidate panoramic image is used as the second augmented panoramic image corresponding to the initial image;
[0158] Multiple labeled training panoramic images are obtained. The initial target detection model is trained using the multiple training panoramic images, multiple first augmented panoramic images corresponding to the multiple initial images, and multiple second augmented panoramic images corresponding to the multiple initial images, to obtain a panoramic image target detection model.
[0159] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0160] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0161] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0162] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An image augmentation method, characterized in that, The image augmentation method includes: A labeled initial image is obtained, and the initial image is expanded to obtain a candidate panoramic image. The initial image is a non-panoramic image, and the initial image includes multiple detection boxes. The aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio. A target detection box is selected in the candidate panoramic image, and the candidate panoramic image is segmented and stitched based on the target detection box to obtain a first augmented panoramic image, wherein the left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box.
2. The image augmentation method according to claim 1, characterized in that, The step of expanding the initial image to obtain candidate panoramic images includes: The target width is determined based on the initial height of the initial image, and the difference between the target width and the initial width of the initial image is determined, wherein the ratio between the target width and the initial height is the aspect ratio of the panoramic image; If the difference is less than or equal to the initial width, then according to the initial height and the difference, the image to be processed is obtained in the initial image, wherein the image to be processed includes the boundary region on one side of the initial image; The image to be processed is stitched together with the initial image to obtain a candidate panoramic image.
3. The image augmentation method according to claim 2, characterized in that, After determining the target width based on the initial height of the initial image, and determining the difference between the target width and the initial width of the initial image, the method further includes: If the difference is greater than the initial width, then the initial image is copied to obtain a copied image, and the copied image and the initial image are stitched together to obtain a stitched image; The stitched image is used as the initial image, and the process of determining the difference between the target width and the initial width of the initial image is repeated until the determined difference is less than the initial width.
4. The image augmentation method according to claim 1, characterized in that, The step of selecting a target detection box in the candidate panoramic image includes: Among all the detection boxes in the candidate panoramic image, the detection box with the largest area is selected as the target detection box.
5. The image augmentation method according to claim 1, characterized in that, The step of segmenting and stitching the candidate panoramic image based on the target detection box to obtain the first augmented panoramic image includes: Select a target pixel in the target detection box and determine a dividing line that passes through the target pixel and is perpendicular to the horizontal axis of the image coordinate system of the candidate panoramic image; The candidate panoramic image is divided into a first image and a second image based on the dividing line, wherein the first image includes the left boundary region of the candidate panoramic image and the second image includes the right boundary region of the candidate panoramic image. The first image and the second image are stitched together to obtain a first augmented panoramic image, wherein the left boundary region and the right boundary region are adjacent in the first augmented panoramic image.
6. The image augmentation method according to claim 1, characterized in that, The step of acquiring the labeled initial image and expanding the initial image to obtain candidate panoramic images includes: Obtain an labeled initial image. If the aspect ratio of the initial image meets a preset expansion condition, expand the initial image to obtain a candidate panoramic image. The preset expansion condition includes: the difference between the aspect ratio of the initial image and the aspect ratio of the preset panoramic image is greater than or equal to a preset tolerance value.
7. A model training method based on image augmentation, characterized in that, The image augmentation-based model training method includes: A labeled initial image is obtained, and the initial image is expanded to obtain a candidate panoramic image. The initial image is a non-panoramic image, and the initial image includes multiple detection boxes. The aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio. If the candidate panoramic image meets the preset conditions, a target detection box is selected in the candidate panoramic image, and the candidate panoramic image is segmented and stitched based on the target detection box to obtain the first augmented panoramic image corresponding to the initial image. The left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box. If the candidate panoramic image does not meet the preset conditions, then the candidate panoramic image is used as the second augmented panoramic image corresponding to the initial image; Multiple labeled training panoramic images are obtained. The initial target detection model is trained using the multiple training panoramic images, multiple first augmented panoramic images corresponding to the multiple initial images, and multiple second augmented panoramic images corresponding to the multiple initial images, to obtain a panoramic image target detection model.
8. The model training method based on image augmentation according to claim 7, characterized in that, The preset condition includes that the random number corresponding to the candidate panoramic image is greater than a preset probability value, wherein the random number corresponding to the candidate panoramic image is a random number generated after obtaining the candidate panoramic image.
9. An image augmentation device, characterized in that, The image augmentation device includes: An extension module is used to acquire an annotated initial image, extend the initial image to obtain a candidate panoramic image, wherein the initial image is a non-panoramic image, the initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio. An augmented panoramic image determination module is used to select a target detection box in the candidate panoramic image, and to perform segmentation and stitching processing on the candidate panoramic image based on the target detection box to obtain a first augmented panoramic image, wherein the left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box.
10. A model training device based on image augmentation, characterized in that, The image augmentation-based model training device includes: The first image augmentation module is used to acquire an annotated initial image, expand the initial image to obtain a candidate panoramic image, wherein the initial image is a non-panoramic image, the initial image includes multiple detection boxes, and the aspect ratio of the candidate panoramic image is a preset panoramic image aspect ratio. The second image augmentation module is used to select a target detection box in the candidate panoramic image if the candidate panoramic image meets the preset conditions, and to perform segmentation and stitching processing on the candidate panoramic image based on the target detection box to obtain a first augmented panoramic image corresponding to the initial image. The left side of the first augmented panoramic image includes a part of the target detection box, and the right side of the first augmented panoramic image includes another part of the target detection box. The third image augmentation module is used to use the candidate panoramic image as the second augmented panoramic image corresponding to the initial image if the candidate panoramic image does not meet the preset conditions. The training module is used to acquire multiple labeled training panoramic images, and to train the initial target detection model using the multiple training panoramic images, multiple first augmented panoramic images corresponding to the multiple initial images, and multiple second augmented panoramic images corresponding to the multiple initial images, to obtain a panoramic image target detection model.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the image augmentation method according to any one of claims 1 to 6, or the model training method based on image augmentation according to claim 7 or 8.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the image augmentation method according to any one of claims 1 to 6, or the model training method based on image augmentation according to claim 7 or 8.
13. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the image augmentation method according to any one of claims 1 to 6, or the image augmentation-based model training method according to claim 7 or 8.
Citation Information
Patent Citations
Image processing method, image processing apparatus, and non-transitory storage medium
CN113344957A