GithubHelp home page GithubHelp logo

Comments (9)

simon-rob avatar simon-rob commented on July 24, 2024

I have just downloaded your latest prototxt and it's fixed!

ssd_screenshot_04 05 2018-fixed

from pelee.

MrWhiteHomeman avatar MrWhiteHomeman commented on July 24, 2024

@simon-rob , Thank you for your python script, your python script use cpu or gpu to test a picture?
I use the python script to test a image in 0.3 seconds, so I don't know cpu or gpu I used.
Can you give me some advice?

from pelee.

simon-rob avatar simon-rob commented on July 24, 2024

@MrWhiteHomeman,

It depends if you successfully compiled the GPU version of Caffe and you didn't disable the GPU by uncommenting CPU_ONLY := 1 in the Makefile.config

If you do have a GPU version installed, you can switch between CPU and GPU by using:

caffe.set_mode_gpu() or caffe.set_mode_cpu()

Otherwise it should default to using the GPU.

You could try putting caffe.set_mode_cpu() in the python code to see if the performance differs.

from pelee.

MrWhiteHomeman avatar MrWhiteHomeman commented on July 24, 2024

@simon-rob
Thank you for your excellent advice! I know how to switch between cpu and gpu from you .
I spend 0.1 seconds to detecting a image by gpu, 0.3 seconds by cpu. How many seconds take you to detect a image by cpu or gpu? And I have another question, the first line of your python script, the net_file is pelee.prototxt, do you mean the pelee.prototxt is the deploy.prototxt?

from pelee.

simon-rob avatar simon-rob commented on July 24, 2024

@MrWhiteHomeman

I haven't bench-marked the speed yet as I am not interested in using PC GPU speed. I am interested in CPU/GPU inference on mobile/embedded. But I have got 45-50ms on snapdragon 820 for mobileNet-SSD v1 so I am hoping PeeleNet will be about the same or faster.

So 0.1 or 100ms seems a bit slow, but it depends on how/when you are measuring the speed to/from. I normally measure just the inference time and not the image load or pre-processing as that is the same for whatever network and will vary with CPU type and original image size.

As for pelee.prototxt, yes it is the same as deploty.prototxt - deploy.prototxt is too generic and I get confused to easily!

from pelee.

shudct avatar shudct commented on July 24, 2024

@simon-rob
i notice when testing, img = img * 0.017. can you explain why?

from pelee.

simon-rob avatar simon-rob commented on July 24, 2024

@shudct

That code is normalising the inputs in the same way that the author trained the network.

See https://www.coursera.org/learn/deep-neural-network/lecture/lXv6U/normalizing-inputs for a mathematical explaination.

Have you tried taking the code out to see what happens?

from pelee.

shudct avatar shudct commented on July 24, 2024

@simon-rob I have tested without img = img * 0.017, the result is completely wrong. Usually, the code to normalize the input is by 1/255. I'm confused to the exact meaning of 0.017.

from pelee.

simon-rob avatar simon-rob commented on July 24, 2024

It is scaling the input as described in the video with the same scaling that Robert used during the training. Have a look at the scale parameter in train_merged.prototxt:

 transform_param {

    scale: 0.0170000009239

    mirror: true

    mean_value: 103.940002441

    mean_value: 116.779998779

    mean_value: 123.680000305

    resize_param {

      prob: 1.0

      resize_mode: WARP

      height: 304

      width: 304

      interp_mode: LINEAR

      interp_mode: AREA

      interp_mode: NEAREST

      interp_mode: CUBIC

      interp_mode: LANCZOS4

    }

from pelee.

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.