Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

关于Image Classification Demo里的Flip操作

Open Noplz opened this issue 9 years ago • 0 comments

https://github.com/PaddlePaddle/Paddle/blob/develop/demo/image_classification/image_util.py

def flip(im):
    """
    Return the flipped image.
    Flip an image along the horizontal direction.
    im: input image, (H x W x K) ndarrays 
    """
    if len(im.shape) == 3:
        return im[:, :, ::-1]
    else:
        return im[:, ::-1]

Demo里的图片翻转是不是有问题?这里的操作是把channel顺序颠倒了,应该是channel顺序不变,竖直或者水平做翻转吧。

Noplz avatar Apr 01 '17 07:04 Noplz