DPNs icon indicating copy to clipboard operation
DPNs copied to clipboard

about inference image shape

Open wenhe-jia opened this issue 7 years ago • 3 comments

In scope.py, the shape of input image is [3, 320, 320] during inference step, i want to know how did you do it? I saw you use ImageRecorderIter to preprocess the input images, does it just resize the image into [3, 320, 320], or some other operations?
Thx for your help!~~

wenhe-jia avatar Jul 27 '17 13:07 wenhe-jia

I use im2rec in MXNet to generate images based according to #4 , then choosing choose resize=320 will yield default image size as 320*320. Also you could set resize=224 when doing .rec file generation. But still I cannot reproduce the results mentioned in the README and the Top-1 error is usually lower by around 1% and Top-5 errors is lower by 0.2%, I try to boost the accuracy by center croping but I don't know how to reproduce the similar result. @cypw Could you give us more hints?

hcwang95 avatar Jul 29 '17 06:07 hcwang95

@whcacademy

Please set the unchanged option to 1 while generating the .rec file using im2rec as I have already indicated in run_val.sh.

Note that: By setting unchanged=1, im2rec will directly save the raw image data without even decode it, see: im2rec.cc. So you won't lose any valuable information in this step, which may potentially damage the performance.

cypw avatar Jul 29 '17 07:07 cypw

Sorry for ignoring import comments in that file. And new test does reach the performance in the README.

Thanks!

hcwang95 avatar Jul 29 '17 09:07 hcwang95