Giter Club home page Giter Club logo

Comments (5)

shicai avatar shicai commented on June 6, 2024

please use original images (not lmdb).

from mobilenet-caffe.

fanghuaqi avatar fanghuaqi commented on June 6, 2024

Hi shicai, I also tried to use original images to do inference on mobilenet-v2, the result I get is:

I0704 09:38:38.086778  3370 caffe.cpp:310] Loss: 1.17715
I0704 09:38:38.086797  3370 caffe.cpp:322] accuracy@1 = 0.712339
I0704 09:38:38.086804  3370 caffe.cpp:322] accuracy@5 = 0.901795
I0704 09:38:38.086813  3370 caffe.cpp:322] loss = 1.17715 (* 1 = 1.17715 loss)

This is the test prototxt data input section:

layer {                                                                                                                                                                                                                                     
   name: "data"                                                                                                                                                                                                                              
   type: "ImageData"                                                                                                                                                                                                                         
   top: "data"                                                                                                                                                                                                                               
   top: "label"                                                                                                                                                                                                                              
   include {                                                                                                                                                                                                                                 
     phase: TEST                                                                                                                                                                                                                             
   }                                                                                                                                                                                                                                         
   transform_param {                                                                                                                                                                                                                         
     scale: 0.017                                                                                                                                                                                                                            
     mean_value: [103.94, 116.78, 123.68]                                                                                                                                                                                                    
     mirror: false                                                                                                                                                                                                                           
     crop_size: 224                                                                                                                                                                                                                          
   }                                                                                                                                                                                                                                         
   image_data_param {                                                                                                                                                                                                                        
     source: "val.txt"                                                                                                                                                                                                                       
     new_height: 256                                                                                                                                                                                                                         
     new_width: 256                                                                                                                                                                                                                          
     batch_size: 20                                                                                                                                                                                                                          
     root_folder: "ILSVRC2012/val/"                                                                                                                                                                                                          
   }                                                                                                                                                                                                                                         
 }    

The result is similar to the values I directly use LMDB in mobilenet-v2. And still lower than the official one, is there anything wrong in this test prototxt?

Is the steps in eval_image.py correct for inference? I see in that script, the image is cropped then resize to 224x224 not resize to 256xN, then crop to 224x224.

Thanks
Huaqi

from mobilenet-caffe.

shicai avatar shicai commented on June 6, 2024

eval_image.py is just an example for evaluating single image.
to reproduce the performance on imagenet val dataset, you should resize the image to 256xN, then crop the center 224x224 regions, then feed it into the model.

from mobilenet-caffe.

17759205390 avatar 17759205390 commented on June 6, 2024

@fanghuaqi @shicai @lutzroeder @mn-robot 弱弱的请问一下top1和top5可以详细解释一下吗???

from mobilenet-caffe.

fanghuaqi avatar fanghuaqi commented on June 6, 2024

@17759205390 https://caffe.berkeleyvision.org/tutorial/layers/accuracy.html

from mobilenet-caffe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.