def load_feature(img_path):
    img = util.cv_imread(img_path)
    crop = img / 255.
    crop = crop - 0.5
    crop = crop * 2.
    crop = cv2.resize(crop, (config.INPUT_SIZE, config.INPUT_SIZE))
    return crop
def load_feature(img_path):
    img = util.cv_imread(img_path)
    crop = img / 255.
    crop = crop - 0.5
    crop = crop * 2.
    crop = cv2.resize(crop, (250, 250))
    return crop
def load_feature(img_path):
    img = util.cv_imread(img_path)
    img= relight(img,random.uniform(0.9, 1.1), random.randint(-10, 10))
    crop= img / 255.
    crop = crop - 0.5
    crop = crop * 2.

    crop = cv2.resize(crop, (229, 229))
    return crop
Exemple #4
0
def load_feature(img_path):
    img = util.cv_imread(img_path)

    crop = random_crop(img, 224)
    flip = np.random.randint(0, 3)
    if flip == 1:
        flipimg = cv2.flip(crop, 1)
    if flip == 0:
        flipimg = cv2.flip(crop, 0)
    if flip == 2:
        flipimg = crop
    return flipimg
def load_feature(img_path):
    img = util.cv_imread(img_path)
    img = relight(img, random.uniform(0.9, 1.1), random.randint(-10, 10))
    crop = img / 255.
    r1 = random.uniform(0.9, 1.1)
    r2 = random.randint(0, 45)
    crop = rotate(crop, angle=r2, scale=r1)
    flip = np.random.randint(0, 3)
    if flip == 1:
        flipimg = cv2.flip(crop, 1)
    if flip == 0:
        flipimg = cv2.flip(crop, 0)
    if flip == 2:
        flipimg = crop
    crop = cv2.resize(flipimg, (224, 224))
    return crop
def load_feature(img_path):
    img = util.cv_imread(img_path)
    norm_img = img / 255.
    resized_img = util.resize_img(norm_img, size)
    crop = cv2.resize(resized_img, (size, size))
    return crop
Exemple #7
0
def load_feature(img_path):
    img = util.cv_imread(img_path)
    norm_img = img / 255.
    resized_img = util.resize_img(norm_img, config.INPUT_SIZE)
    crop = cv2.resize(resized_img, (config.INPUT_SIZE, config.INPUT_SIZE))
    return crop