Git Product home page Git Product logo

arbitrary-2912 / raspberrypicustomobjectdetection Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 30.32 MB

Custom dataset object detection using TensorFlow Lite

License: Apache License 2.0

Python 6.53% Shell 0.63% Jupyter Notebook 92.84%
computer-vision cv frc machine-learning object-detection python robotics tensor-flow deep-learning detection frc-charged-up tensorflow tensorflow-lite yolo

raspberrypicustomobjectdetection's Introduction

Train and Deploy Custom Object Detection Model on Raspberry Pi

This repository contains a python script and a few Object Detection models utilizing TensorFLow Lite. These models are placed in two folders i.e. 'custom' and 'pretrained'. The models located in the 'custom' folder are created using the Tensorflow Lite Model maker and can be trained to detect various objects from a desired dataset. In this case, that dataset happens to be field elements from the 2023 FRC Competition Charged Up.

The models in 'pretrained' folder are downloaded from coral.ai website. These pretrained models are trained with COCO dataset to detect 90 types of objects.

The python script can be used to run a custom as well as a pretrained model. It also supports the use of a Google Coral USB accelerator to speed up the inferencing process or any other Edge TPU containing device.

Training the Model with your data

The training is done through a Colab notebook which is an interactive Python notebook accessible through a web browser. It makes use of Tensorflow Lite Model Maker to create custom models through Transfer Learning.

The link to the notebook is here

The annotated data set created for this project is here. Annotations were performed with the help of roboFlow.

The notebook provides a framework to create and download a custom model for object detection using any custom dataset of choice. From the notebook, the corresponding models and label files can be downloaded and uploaded into this project.

Running your custom model

The packages and libraries required to run this file can be installed through bash script by running the command 'sudo sh setup.sh' in terminal. Alternitively there is a 'requirements.txt' that can be utilized for installation, or the direct dependencies may be manually installed.

Run the python file using the command 'python3 detect.py'

You can use a Pi camera or a USB camera with your Raspberry Pi to run the python file 'detect.py'. The python script also supports Google Coral USB Accelerator. If you want to use Coral Accelerator and Edge TPU framework, ensure the appropriate procedure is followed in the script labeled detect.py.

raspberrypicustomobjectdetection's People

Contributors

arbitrary-2912 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.