"Data enhancement" yolov5 data enhancement and infrared data enhancement

Table of contents

yolov5 data augmentation

Mosaic

Copy paste

 Random affine

mix up

 Albumentations

Augment HSV(Hue, Saturation,Value)

 Random horizontal flip

Infrared Data Enhancement

Disadvantages of infrared images                                                       

Features of infrared imaging technology

Classic Algorithm of Infrared Image Enhancement

 Gray scale linear transformation

Gray scale non-linear transformation

 Histogram processing

 Infrared Image Digital Detail Enhancement (DDE)


yolov5 data augmentation

Detailed explanation of YOLOv5 network_哔哩哔哩_bilibili

Mosaic

4 images are spliced ​​into one image using random scaling , random cropping , and random arrangement

Copy paste

Copy and paste directly, but the dataset must require data labels for instance segmentation

 Random affine

Affine transformation, that is, rotation, scaling, translation, staggering

 In the yaml configuration file, only zoom and pan are enabled

mix up

Blend two pictures into a new picture according to a certain degree of transparency

In the source code, there is only a 10% probability of enabling each time

 Albumentations

Filtering, histogram equalization, changing picture quality, etc.

It is a third-party package, and it will start after installing this package. In the pip list, it is not installed by default.

Augment HSV(Hue, Saturation,Value)

Randomly adjust hue, saturation, lightness

 Random horizontal flip

According to a certain ratio, flip the picture horizontally

Infrared Data Enhancement

Disadvantages of infrared images                                                       

(1) The infrared thermal image represents the temperature distribution of the scene, which is a grayscale image without color or shadow, with low resolution and poor resolution potential;

(2) Infrared images have strong spatial correlation, low contrast, and blurred visual effects;

(3) The clarity of infrared images is lower than that of visible light images;

(4) The random interference of the external environment and the imperfection of the thermal imaging system bring a variety of noises to the infrared image, resulting in a very low signal-to-noise ratio of the infrared image;

(5) The non-uniformity of the infrared image caused by external interference is manifested as fixed pattern noise, crosstalk, and distortion of the image.


Features of infrared imaging technology

(1) Infrared radiation can pass through fog and smoke, and the system has a wide operating band and a long distance;

(2) Adopt a passive working method, which is not easy to be discovered or disturbed;

(3) It can work around the clock or in bad weather;

(4) Suitable for high-precision tracking and aiming;

(5) Not easily affected by strong light such as shooting, explosion and lighting flash.

Image Engineering: Infrared Image Enhancement_Truth?'s Blog-CSDN Blog

Classic Algorithm of Infrared Image Enhancement

Image enhancement refers to highlighting important information in an image according to specific needs, while weakening or removing unnecessary information. Images obtained from different channels, through appropriate enhancement processing, can process the original blurry or even indistinguishable original image into a clear and usable image rich in a lot of useful information, effectively removing noise in the image, Enhances edges or other regions of interest in an image, making it easier to detect and measure objects of interest in an image.

 Gray scale linear transformation

grayscale inversion

piecewise linear stretch

Gray scale non-linear transformation

Exponential transformation is used to expand high gray areas, generally suitable for overly bright images

Exponential transformation

 Logarithmic transformation is used to expand the low gray area, generally suitable for too dark images

logarithmic transformation

 Histogram processing

global balance

local histogram equalization

Histogram matching (histogram normalization)

 Infrared Image Digital Detail Enhancement (DDE)

Introduction to Infrared Image Digital Detail Enhancement (DDE)

Infrared images are usually used to detect objects with low heat, so they need to have a high dynamic range to capture target objects at different temperatures. A higher bit depth can provide more gray levels, thereby more accurately representing changes in temperature, so images in infrared systems are mostly 14-bit or higher.

And usually display devices only require 8-bit data width, so 14 bits need to be compressed to 8 bits. Therefore, if the compression method is not handled properly, the information that originally detected the large dynamic image will not be displayed, that is, the compression of the large dynamic image may cause the loss of the original information, which is manifested as the loss of image details in the displayed image.

For the currently commonly used compression methods such as linear mapping (such as AGC, Automatic Gain Control) or nonlinear mapping (such as histogram equalization, gamma transformation), since the images of small targets or parts of objects do not have an advantage in temperature difference or pixels, making These methods generally have defects in the compression of large dynamic images.

DDE (Digital Detail Enhancement) technology can solve this problem. It is an advanced nonlinear image processing algorithm. When the algorithm is processed, it first uses a special filter to convert the background layer (low frequency part) and detail layer (high frequency part) of the image. ) for separation, and then perform corresponding grayscale enhancement and noise suppression processing on the extracted background layer and detail layer, and then adjust and compress the dynamic range of each layer, and finally synthesize an 8bits output image. In this way, the large dynamic temperature difference in the 14bits image and the detailed information of the target part can be represented within the range of 8bits.

       Low-frequency information: Low-frequency information mainly reflects the overall brightness, color and larger-scale structure of the image. This includes flat areas of the image, backgrounds, lighting, etc. The change of low-frequency information in the image is relatively gentle, and the change trend is relatively slow.

     High-frequency information: High-frequency information mainly reflects details, textures, and smaller-scale structures in the image. This includes edges in images, texture details, boundaries of objects of interest, etc. The high-frequency information changes drastically in the image, and there are many subtle changes.

As shown in the figure above, compared with ordinary linear mapping and histogram equalization algorithms, DDE can greatly enhance the details of images while preserving the dynamic range. In the picture (a), the local temperature difference of the human face (position 1) and the circuit board (position 3) are not only reflected, but also the mirror image formed by the reflection of the thermal image itself on the glass can be found at position 2 , the furnace wall of the blast furnace in (c) and the fuel in the middle are also clearly visible after being enhanced by DDE.

Disclaimer: This article is compiled from the Internet, and the source has been indicated in the article; if there is any infringement, delete it!

Guess you like

Origin blog.csdn.net/weixin_45824067/article/details/131748504
Recommended