Skip to content

JoHyukJun/tensorflow-lite-raspberrypi-object-detection

Repository files navigation

Activity Contributors Forks Stargazers Issues MIT License


Logo

tensorflow-lite-raspberrypi-object-detection

An object detection project
Explore the docs »

View Project · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Product Name Screen Shot

The following source code located in /original/detect_usbwebcam.py is a program that modified this example: Link. This is another example for Tensorflow lite with Raspberry Pi using USB webcam based on Pi camera version. In this example, you need to add one more from the settings that you performed on the Pi camera version. That is to install opencv.

(back to top)

Built With

  • Tensorflow
  • OpenCV

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • download model
    curl -O http://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip
    unzip coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip -d ${DATA_DIR}
    rm coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip

Installation

Perform the following procedure to install the required package.

  1. Clone the repo
    git clone https://github.com/JoHyukJun/tensorflow-lite-raspberrypi-object-detection.git
  2. Install opencv
    sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
    sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
    sudo apt-get install libxvidcore-dev libx264-dev
    sudo apt-get install qt4-dev-tools libatlas-base-dev
    sudo pip3 install opencv-python

Run

  • example
    python3 detect_usbwebcam.py \
    --model ${DATA_DIR}/detect.tflite \
    --labels ${DATA_DIR}/coco_labels.txt

(back to top)

Usage

For more examples, please refer to the Documentation

(back to top)

Roadmap

  • Add basic modeling type
  • Add opencv param data

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/amazing-feature)
  3. Commit your Changes (git commit -m 'feat: Add some amazing-feature')
  • commit message
    <type>[optional scope]: <description>
    
    [optional body]
    
    [optional footer(s)]
    
  • commit type
    - feat: a commit of the type feat introduces a new feature to the codebase
    - fix: a commit of the type fix patches a bug in your codebase
    
  1. Push to the Branch (git push origin feature/amazing-feature)
  2. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

JO HYUK JUN - hyukzuny@gmail.com

Project Link: https://github.com/JoHyukJun/tensorflow-lite-raspberrypi-object-detection

(back to top)

Acknowledgments

(back to top)