Weather augmentations in Albumentations¶
This notebook demonstrates weather augmentations that are supported by Albumentations.
Import the required libraries¶
In [1]:
import random
import cv2
from matplotlib import pyplot as plt
import albumentations as A
Define a function to visualize an image¶
In [2]:
def visualize(image):
plt.figure(figsize=(20, 10))
plt.axis('off')
plt.imshow(image)
Load the image from the disk¶
In [3]:
image = cv2.imread('images/weather_example.jpg')
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
Visualize the original image¶
In [4]:
visualize(image)