What are possible values for data_augmentation_options in the TensorFlow Object Detection pipeline configuration?

The list of options is provided in preprocessor.proto: NormalizeImage normalize_image = 1; RandomHorizontalFlip random_horizontal_flip = 2; RandomPixelValueScale random_pixel_value_scale = 3; RandomImageScale random_image_scale = 4; RandomRGBtoGray random_rgb_to_gray = 5; RandomAdjustBrightness random_adjust_brightness = 6; RandomAdjustContrast random_adjust_contrast = 7; RandomAdjustHue random_adjust_hue = 8; RandomAdjustSaturation random_adjust_saturation = 9; RandomDistortColor random_distort_color = 10; RandomJitterBoxes random_jitter_boxes = 11; RandomCropImage random_crop_image = … Read more

overlay a smaller image on a larger image python OpenCv

A simple way to achieve what you want: import cv2 s_img = cv2.imread(“smaller_image.png”) l_img = cv2.imread(“larger_image.jpg”) x_offset=y_offset=50 l_img[y_offset:y_offset+s_img.shape[0], x_offset:x_offset+s_img.shape[1]] = s_img Update I suppose you want to take care of the alpha channel too. Here is a quick and dirty way of doing so: s_img = cv2.imread(“smaller_image.png”, -1) y1, y2 = y_offset, y_offset + s_img.shape[0] … Read more

What is “semantic segmentation” compared to “segmentation” and “scene labeling”?

“segmentation” is a partition of an image into several “coherent” parts, but without any attempt at understanding what these parts represent. One of the most famous works (but definitely not the first) is Shi and Malik “Normalized Cuts and Image Segmentation” PAMI 2000. These works attempt to define “coherence” in terms of low-level cues such … Read more

How to avoid “CUDA out of memory” in PyTorch

Although import torch torch.cuda.empty_cache() provides a good alternative for clearing the occupied cuda memory and we can also manually clear the not in use variables by using, import gc del variables gc.collect() But still after using these commands, the error might appear again because pytorch doesn’t actually clears the memory instead clears the reference to … Read more