Coder Social home page Coder Social logo

Slow detection about ssd_keras HOT 5 OPEN

rykov8 avatar rykov8 commented on August 17, 2024 3
Slow detection

from ssd_keras.

Comments (5)

rykov8 avatar rykov8 commented on August 17, 2024 6

@MrXu as for training, I'm working on this part, hope to release the code this week. I also had to change some things in the architecture in order to be able to train the net. However, I will test it only for my problem, but I try to implement training as universal, as possible. Hope, it will be useful.
As for real-time detection, I'm quite sure, that unfortunately, it is nearly impossible nowadays to run deep nets on CPU with real-time performance. If you need real-time on CPU you might consider simpler methods with loss of quality.

from ssd_keras.

xindongzhang avatar xindongzhang commented on August 17, 2024

The performance of inference phase in this paper is conducted using NVIDIA K40 GPUs, and the input is a batch of images. You can replace the vgg module with AlexNet, AlexNet is smaller than vgg.

from ssd_keras.

rykov8 avatar rykov8 commented on August 17, 2024

@xindongzhang thanks for your comment, but I believe, that the authors state the following:
We measure the speed with batch size 8 using Titan X and cuDNN v4 with Intel Xeon [email protected]. However, it doesn't matter, they report performance on GPU.

@MrXu, I measured forward pass of my PC with Titan and for 5 pictures (like in SSD.ipynb) I got the results that are in the screenshot.
screen shot 2016-11-12 at 12 10 18 pm
This means that it takes around 50 ms per image to get the prediction. I haven't measured the original caffe code, but I'm sure that my NMS implementation is slower, than the original one. Moreover, some custom layers can also be not very efficient, this is the thing to improve in the future, because I also need real-time performance on GPU for my problem. Any ideas how to speed up the code are welcome! I've also heard that sometimes Keras is slower, than other frameworks, but I can't bear Caffe, so, for me Keras is the best choice.

As for network shrinkage, apart from replacing vgg with AlexNet (after this step you will have to retrain the net), you can think about scales of your detection. For example, if you know, that you won't have big objects on your images, you, probably, don't need final layers and can delete them.

from ssd_keras.

MrXu avatar MrXu commented on August 17, 2024

@xindongzhang thanks for the suggestion. I may prefer to avoid retrain the model.
@rykov8 , thanks for the clarification. I do read that Keras is slower than other framework like TensorLayer or TFlearn. I am trying to run the prediction on Rpi, seems achieving real-time detection with only CPU is really hard...

from ssd_keras.

ManjeeraJagiri avatar ManjeeraJagiri commented on August 17, 2024

@rykov8 , Thanks for the code!. It works perfectly. I wanted to know if you tried out anything to improve the fps for real time detection. I have been trying to implement multithreading, but no luck so far.

from ssd_keras.

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.