Skip to content
Permalink
Browse files

fix(encoder): remove image resize from TFInceptionEncoder

  • Loading branch information...
raccoonliukai committed Sep 4, 2019
1 parent 334d232 commit 67b211da58d8f0bef2221cce07509d69ff551fc1
Showing with 1 addition and 4 deletions.
  1. +1 −4 gnes/encoder/image/inception.py
@@ -16,7 +16,6 @@
from typing import List

import numpy as np
from PIL import Image

from ..base import BaseImageEncoder
from ...helper import batching, get_first_available_gpu
@@ -62,9 +61,7 @@ def post_init(self):
self.saver.restore(self.sess, self.model_dir)

def encode(self, img: List['np.ndarray'], *args, **kwargs) -> np.ndarray:
img = [(np.array(Image.fromarray(im).resize((self.inception_size_x,
self.inception_size_y)), dtype=np.float32) * 2 / 255. - 1.) for im
in img]
img = [(im * 2 / 255. - 1.) for im in img]

@batching
def _encode(_, data):

0 comments on commit 67b211d

Please sign in to comment.
You can’t perform that action at this time.