{"action":"opened","issue":{"url":"https://api.github.com/repos/apache/incubator-mxnet/issues/10935","repository_url":"https://api.github.com/repos/apache/incubator-mxnet","labels_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/10935/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/10935/comments","events_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/10935/events","html_url":"https://github.com/apache/incubator-mxnet/issues/10935","id":322745435,"number":10935,"title":"When are the images converted to range(0,1) in pre-trained resnet50_v2 on imagenet?","user":{"login":"jonbakerfish","id":2463872,"avatar_url":"https://avatars2.githubusercontent.com/u/2463872?v=4","gravatar_id":"","url":"https://api.github.com/users/jonbakerfish","html_url":"https://github.com/jonbakerfish","followers_url":"https://api.github.com/users/jonbakerfish/followers","following_url":"https://api.github.com/users/jonbakerfish/following{/other_user}","gists_url":"https://api.github.com/users/jonbakerfish/gists{/gist_id}","starred_url":"https://api.github.com/users/jonbakerfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonbakerfish/subscriptions","organizations_url":"https://api.github.com/users/jonbakerfish/orgs","repos_url":"https://api.github.com/users/jonbakerfish/repos","events_url":"https://api.github.com/users/jonbakerfish/events{/privacy}","received_events_url":"https://api.github.com/users/jonbakerfish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-14T09:50:03Z","updated_at":"2018-05-14T09:50:03Z","closed_at":null,"author_association":"NONE","body":"From the Gluon Model Zoo:\r\n\r\n> 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]\r\n\r\nHowever, 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)\r\n 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`. \r\nIt 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). \r\nPlease correct me if I'm wrong."}}
{"actor":{"display_login":"jonbakerfish"}}