Giter VIP home page Giter VIP logo

mobilenet_ssd_opencv_tensorflow's Introduction

MobileNetV1/V2_SSD for the DNN modul of OpenCV

output image

A example of OpenCV dnn framework working on a bare Raspberry Pi with TensorFlow models.

License

Paper: https://arxiv.org/abs/1611.10012

Special made for a bare Raspberry Pi 4 see Q-engineering deep learning examples


Training set: COCO
Size: 300x300
Frame rate V1 : 3.19 FPS (RPi 4)
Frame rate V1_0.75: 4.98 FPS (RPi 4)
Frame rate V2 : 2.02 FPS (RPi 4)
Frame rate V2 Lite: 3.86 FPS (RPi 4)


Dependencies.

To run the application, you have to:

  • A raspberry Pi 4 with a 32 or 64-bit operating system. It can be the Raspberry 64-bit OS, or Ubuntu 18.04 / 20.04. Install 64-bit OS
  • OpenCV 64 bit installed. Install OpenCV 4.5
  • Code::Blocks installed. ($ sudo apt-get install codeblocks)

Installing the app.

To extract and run the network in Code::Blocks
$ mkdir MyDir
$ cd MyDir
$ wget https://github.com/Qengineering/MobileNet_SSD_OpenCV_TensorFlow/archive/refs/heads/master.zip
$ unzip -j master.zip
Remove master.zip and README.md as they are no longer needed.
$ rm master.zip
$ rm README.md

Your MyDir folder must now look like this:
Traffic.jpg
COCO_labels.txt
frozen_inference_graph_V1.pb (download this file from: https://drive.google.com/open?id=1sDn1guYV6oj-AeYuC-riGRh4kv9XBTMz )
frozen_inference_graph_V2.pb (download this file from: https://drive.google.com/open?id=1EU6tVcDNLNwv-pbJUXL7wYUchFHxr5fw )
ssd_mobilenet_v1_coco_2017_11_17.pbtxt
ssd_mobilenet_v2_coco_2018_03_29.pbtxt
TestOpenCV_TensorFlow.cpb
MobileNetV1.cpp (can be use for V2 version also)


Running the app.

To run the application load the project file TestOpenCV_TensorFlow.cbp in Code::Blocks. More info or
if you want to connect a camera to the app, follow the instructions at Hands-On.

output image output image output image


paypal

mobilenet_ssd_opencv_tensorflow's People

Contributors

qengineering avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mobilenet_ssd_opencv_tensorflow's Issues

Lower framerates / performance

I tested your program on my Raspberry Pi, but I get much lower framerates.
Your source code has been adjusted a little so that I can see the images over the network. But I don't lose performance there (already tested).

system information:

  • Raspberry Pi 4B 2GB edition
  • Raspbian lite buster
  • OpenCV 4.3.0

I can achieve these framerates:
ssd mobilenet v1 : 1.78 FPS
ssdlite mobilenet v2 : 2.4 FPS

Only 140MB RAM is used. So using the 4GB edition wouldn't improve the performance? Or am I wrong?

Which operating system and hardware do you use?

Thanks!

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.