{"action":"created","issue":{"url":"https://api.github.com/repos/NVIDIA/DIGITS/issues/62","labels_url":"https://api.github.com/repos/NVIDIA/DIGITS/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/NVIDIA/DIGITS/issues/62/comments","events_url":"https://api.github.com/repos/NVIDIA/DIGITS/issues/62/events","html_url":"https://github.com/NVIDIA/DIGITS/issues/62","id":67806739,"number":62,"title":"classification probability not match","user":{"login":"cmis91","id":9816523,"avatar_url":"https://avatars.githubusercontent.com/u/9816523?v=3","gravatar_id":"","url":"https://api.github.com/users/cmis91","html_url":"https://github.com/cmis91","followers_url":"https://api.github.com/users/cmis91/followers","following_url":"https://api.github.com/users/cmis91/following{/other_user}","gists_url":"https://api.github.com/users/cmis91/gists{/gist_id}","starred_url":"https://api.github.com/users/cmis91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmis91/subscriptions","organizations_url":"https://api.github.com/users/cmis91/orgs","repos_url":"https://api.github.com/users/cmis91/repos","events_url":"https://api.github.com/users/cmis91/events{/privacy}","received_events_url":"https://api.github.com/users/cmis91/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-11T16:51:07Z","updated_at":"2015-04-12T00:59:05Z","closed_at":null,"body":"All my images are 480 *480 grayscale. I used default \"half_crop\" resize mode to fit images to 256 *256. \r\n\r\nThen I downloaded the last epoch model and used caffe out-of-box classifier to predict the label for an image. However, the predicted probability does not match DIGIT'S classify one image top 5 probability. I suspect that the resize approach in caffe is different than \"half_crop\". Any suggestion to resize my input images?\r\n\r\nnet = caffe.Classifier(MODEL_FILE, PRETRAINED,\r\n\t           mean=np.load('/my/meanfile.npy').mean(1).mean(1),\r\n\t           raw_scale=255,\r\n\t           image_dims=(256, 256))\r\n\r\nimagefile='my/image/file'\r\ninput_image = caffe.io.load_image(imagefile,False)\r\ninput_image=caffe.io.resize_image(input_image,(256,256))\r\nprediction = net.predict([input_image])\r\nprint prediction"},"comment":{"url":"https://api.github.com/repos/NVIDIA/DIGITS/issues/comments/91956266","html_url":"https://github.com/NVIDIA/DIGITS/issues/62#issuecomment-91956266","issue_url":"https://api.github.com/repos/NVIDIA/DIGITS/issues/62","id":91956266,"user":{"login":"dxj19831029","id":2142159,"avatar_url":"https://avatars.githubusercontent.com/u/2142159?v=3","gravatar_id":"","url":"https://api.github.com/users/dxj19831029","html_url":"https://github.com/dxj19831029","followers_url":"https://api.github.com/users/dxj19831029/followers","following_url":"https://api.github.com/users/dxj19831029/following{/other_user}","gists_url":"https://api.github.com/users/dxj19831029/gists{/gist_id}","starred_url":"https://api.github.com/users/dxj19831029/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dxj19831029/subscriptions","organizations_url":"https://api.github.com/users/dxj19831029/orgs","repos_url":"https://api.github.com/users/dxj19831029/repos","events_url":"https://api.github.com/users/dxj19831029/events{/privacy}","received_events_url":"https://api.github.com/users/dxj19831029/received_events","type":"User","site_admin":false},"created_at":"2015-04-12T00:59:05Z","updated_at":"2015-04-12T00:59:05Z","body":"Indeed! I think caffe is using squash by default.\r\n\r\nApart from half_crop mode, the actual resizing algorithm is different for DIGITS and caffe.\r\n\r\nIn the case, I experience feeding the DIGITS and the caffe the same big pic, they will predict different probability, however, if you do resize the big picture to match the input size(let's say 224), then, the result will be the same。 (Notice: be sure #59 is fixing in your testing to see this).\r\n\r\n"}}