Skip to content

CuzImClicks/Raccoon

Repository files navigation

Raccoon Object Detector

Raccoon is a TensorFlow based application designed to recognize people on video feeds. It uses the latest version of TensorFlow and is hosted on a custom Docker system consisting of multiple different Docker images. The object detector is trained on a custom dataset of approximately 1000 annotated images hosted at https://universe.roboflow.com/cuzimclicks/raccoon-qnjzn. The dataset contains three different classes and has been resized to 640x640.

Dependencies

  • Docker

Installation

To use Raccoon, you will need to install TensorFlow. You can then clone the repository from GitHub using the following command:

git clone https://github.com/CuzImClicks/Raccoon.git

Usage

To use Raccoon, you will need to provide it with an input image or video stream. The object detector will then return the bounding boxes and labels for any detected objects.

You can run the object detection script using the following command:

python plot_object_detection_saved_model.py

For more options, you can use the following command to view the available arguments:

python examples/detect_image.py --help

Training

To train the object detector, you will need to use the custom dataset of annotated images hosted at https://universe.roboflow.com/cuzimclicks/raccoon-qnjzn. This can be done using the TensorFlow training API. Make sure to specify the three different classes and that the images have been resized to 640x640.

Hosting

Raccoon can be hosted using a custom Docker system consisting of multiple different Docker images, which are hosted at Docker Hub:

TensorFlow

The first version of this object detector, which is very accurate but slow on low-performance CPUs/GPUs

Edge TPU

the Edge TPU version of this object detector, which is quick but has low accuracy

Compiler

comes with the Edge TPU compiler preinstalled

Vanilla TensorFlow Build the docker image

docker build -t my-name/my-image .

Run the docker image

docker run --rm -i -t my-name/my-image bash

In the bash command line run to start the program

python plot_object_detection_saved_model.py

To copy something(the final images) to or from a docker container

docker ps
docker cp <file path> <container id>:<destination path>

TensorFlow (no-avx, no-gpu)

yaroslavvb/tensorflow-community-wheels#217

Download

Docker

Run the same container again

docker container ps -a

Find the container you want

docker exec -it <CONTAINER_ID> bash

Locations

Input folder for copying with pull.sh

/share/Henrik/input

Output folder for copying with push.sh

/share/Henrik/output

Location of the converted YOLOV7 model

/share/Henrik/yolov7_model.tflite

Location of the security camera alarm images

/share/Public/record_nvr_images

Converting a model to tflite

tflite_convert --[keras_model_file|saved_model_dir]<input> --output_file=<file>

TODO:

  • train own dataset
  • dockerize for deployment
  • code quality with codacy
  • tensorflow
  • pr based contributing
  • discord webhook for results
Links

Problems

'${\r' command not found -> apt install dos2unix

Links

usbipd

usbipd docs WSL support Docker on wsl does not like having fun

YOLO V7

Converting YOLO V7

Converting TensorFlow model to Edge TPU model

Converting TensorFlow models to Tflite

jveitchmichaelis/edgetpu-yolo

EdgeTPU Compiler

Retraining models

Retraining TensorFlow models

Retrain EdgeTPU model

List of Models

List of EdgeTPU compatible models

TensorFlow Hub

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published