You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/05/14 09:50:04 UTC
[GitHub] jonbakerfish opened a new issue #10935: When are the images
converted to range(0, 1) in pre-trained resnet50_v2 on imagenet?
jonbakerfish opened a new issue #10935: When are the images converted to range(0,1) in pre-trained resnet50_v2 on imagenet?
URL: https://github.com/apache/incubator-mxnet/issues/10935
From the Gluon Model Zoo:
> All pre-trained models expect input images normalized in the same way, i.e. mini-batches of 3-channel RGB images of shape (N x 3 x H x W), where N is the batch size, and H and W are expected to be at least 224. The images have to be loaded in to a range of [0, 1] and then normalized using mean = [0.485, 0.456, 0.406] and std = [0.229, 0.224, 0.225]
However, when I look at the train scripts for resnet50_v2 (i.e. https://github.com/apache/incubator-mxnet/blob/master/example/gluon/image_classification.py and https://github.com/apache/incubator-mxnet/blob/master/example/gluon/data.py)
There is no code line showing that the image is converted to range (0,1) (i.e. `image = image/255`) in the `get_imagenet_iterator`.
It seems that the only explanation is that the images are loaded in [0, 1] range by the [ImageFolderDataset](https://github.com/apache/incubator-mxnet/blob/b011eccd17d660b2f1ecf901e0db0007706df35c/python/mxnet/gluon/data/vision/datasets.py#L264).
Please correct me if I'm wrong.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services