Skip to content

A simple script for running object detection on a RTSP stream using YOLOv3-tiny

Notifications You must be signed in to change notification settings

rydercalmdown/sprinkler_detector

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple RTSP Object Detector

This project uses the YOLOv3-tiny pretrained model to identify objects from a RTSP stream using CPU-only inference. It's designed to run in a docker container for portibility.

Installation

To install, clone the respository and run the install command:

make install

It will take care of building the docker container, and downloading the yolov3-tiny model if you don't already have it downloaded.

Next, create a settings.env file, and populate it with your stream URI

touch settings.env
export STREAM_URI=rtsp://username:password@stream_ip_address/stream_endpoint
echo "STREAM_URI=$STREAM_URI" >> settings.env

Running

To run locally, use the following command:

make run

Environment Variables

Environment variables for configuring things

# The URI to the stream
export STREAM_URI=rtsp://username:password@stream_ip_address/stream_endpoint

# FPS_LIMIT - limit the number of frames being processed
export FPS_LIMIT=10

# Display the frames per second in stdout
export DISPLAY_FPS=1

# Set the confidence threshold for detection reporting at 80%
export CONFIDENCE_THRESHOLD=0.8

About

A simple script for running object detection on a RTSP stream using YOLOv3-tiny

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.7%
  • Shell 5.2%
  • Makefile 4.8%
  • Dockerfile 2.3%