Skip to content

JiananAlvin/dockerfile_yolov5_jetson

 
 

Repository files navigation

this repository

This repository builds docker image for object detection using Yolov5 on Nvidia Jetson platform. All operations below should be done on Jetson platform.

setup

This operation makes default docker runtime 'nvidia'.

./setup.sh

build

This operation build docker image named 'yolov5'. Make sure this takes a few hours.

./build.sh

real 140m18.467s
user 0m2.160s
sys 0m1.524s

If the build fails, use --no-cache option to clean the docker build cache.

./build.sh --no-cache

run

This operation detects objects with camera connected to /dev/video0.

./run.sh

run with your own weights

You can use your own weights(my-weights.pt), as follows:

mkdir -p /path/to/weights
cp my-weights.pt /path/to/weights
xhost +local:
docker run -it --rm \
           --runtime nvidia \
           --network host \
           --device /dev/video0:/dev/video0:mrw \
           -e DISPLAY=$DISPLAY \
           -v /tmp/.X11-unix/:/tmp/.X11-unix \
           -v /path/to/weights:/weights \
           yolov5 python3 detect.py --source 0 --weights /weights/my-weights.pt

run csi-camera sample

for more details: https://github.com/JetsonHacksNano/CSI-Camera

./run-csi-camera.sh

About

Dockerfile for yolov5 inference on NVIDIA Jetson.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 42.5%
  • Shell 37.1%
  • Roff 20.4%