Skip to content

Qengineering/MobileNet_SSD_OpenCV_TensorFlow

Repository files navigation

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