DeepLearning 썸네일형 리스트형 If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. Solution: pip install protobuf==3.20.* 더보기 Image Augmentation (Photometric) 방법 class PhotoMetricDistortion: """Apply photometric distortion to image sequentially, every transformation is applied with a probability of 0.5. The position of random contrast is in second or second to last. 1. random brightness 2. random contrast (mode 0) 3. convert color from BGR to HSV 4. random saturation 5. random hue 6. convert color from HSV to BGR 7. random contrast (mode 1) 8. randomly s.. 더보기 Resize and crop images in a specific directory from tqdm import tqdm import logging import traceback import argparse from PIL import Image import matplotlib.pyplot as plt import cv2 import random from pathlib import Path from utils.functions import read_config, read_json from IPython.display import display def resize_and_crop_image(img, resize_dims, crop): img = img.resize(resize_dims, resample=Image.BILINEAR) img = img.crop(crop) return img.. 더보기 이전 1 다음