Sign inSign up

rollinsjw/tinyarmyolo

By rollinsjw

Updated almost 8 years ago

Tiny Arm YOLO contains all of the packages necessary to run YOLO on a raspberry pi 3 b+.

Image
1

138

rollinsjw/tinyarmyolo repository overview

Tiny Arm YOLO

Description

This container can be used to run YOLO on a Raspberry Pi as well as darknet-NNPACK, a version of Darknet that is optimized to be ran on a CPU.

Use Case

YOLO classification takes roughly 30 seconds to complete on a Raspberry Pi, however, using NNPACK allows to cut this time down to under one second on a Raspberry Pi 3 B+.

Restrictions

This container has only been tested on a Raspberry Pi 3 B+. During the installation of darknet NNPACK, the CPU architecture must be specified. This could lead to issues with other versions of Raspberry Pis as they use different CPU architectures. I hypothesize that this would work on the Raspberry Pi 3 Model B as they both use Arm's Cortex A53 architecture.

I also predict that the non NNPACK YOLO implementation would work on any Raspberry Pi through this container as it is not dependent on CPU architecture.

Instructions for use

  • Install Docker on the Raspberry Pi This tutorial was effective for me.

  • Run the Docker Image

Docker run -it -p 8080:8080 rollinsjw/tinyarmyolo:base /bin/bash 

The -it flag is condenced from -i and -t. -i makes the container interactive and the -t flag allocates a pseudo-tty. The -p flag opens up port 8080 on the container and allows you to create a ssh tunnel to connect to a jupyter notebook running within the container.

  • Enter the Darknet Directory. Warning: There will be both a darknet-nnpack and an NNPACK-darknet directory.
cd darknet-nnpack
  • You can confirm you are in the correct directory through this command.
ls | grep weights

If the return is not blank, then you are in the correct directory.

  • Run darknet
./darknet detector test ./cfg/coco.data ./cfg/tiny-yolo.cfg yolov2-tiny.weights data/person.jpg

Contained Packages

  • Jupyter notebook
  • Python 2.7
  • Python OpenCV
  • Darknet
  • YOLO v2 tiny weights
  • cmake
  • git
  • libgtk2.0-dev
  • pkg-config
  • libavcodec-dev
  • libavformat-dev
  • libswscale-dev
  • python-dev
  • python-numpy
  • libjpeg-dev
  • libpng-dev
  • libtiff-dev
  • build-essential

. Please pull the base tag to use.

Tag summary

Content type

Image

Digest

Size

743.2 MB

Last updated

almost 8 years ago

docker pull rollinsjw/tinyarmyolo:base