Skip to content

NVR with realtime local object detection for IP cameras

License

Notifications You must be signed in to change notification settings

guxiaoqi2007/frigate-rockchip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Realtime Object Detection for RTSP Cameras

  • Prioritizes realtime processing over frames per second. Dropping frames is fine.
  • OpenCV runs in a separate process so it can grab frames as quickly as possible to ensure there aren't old frames in the buffer
  • Object detection with Tensorflow runs in a separate process and ignores frames that are more than 0.5 seconds old
  • Uses shared memory arrays for handing frames between processes
  • Provides a url for viewing the video feed at a hard coded ~5FPS as an mjpeg stream
  • Frames are only encoded into mjpeg stream when it is being viewed

Getting Started

Build the container with

docker build -t realtime-od .

Download a model from the zoo.

Download the cooresponding label map from here.

Run the container with

docker run -it --rm \
-v <path_to_frozen_detection_graph.pb>:/frozen_inference_graph.pb:ro \
-v <path_to_labelmap.pbtext>:/label_map.pbtext:ro \
-p 5000:5000 \
-e RTSP_URL='<rtsp_url>' \
realtime-od:latest

Access the mjpeg stream at http:https://localhost:5000

Future improvements

  • MQTT messages when detected objects change
  • Dynamic changes to processing speed, ie. only process 1FPS unless motion detected
  • Break incoming frame into multiple smaller images and run detection in parallel for lower latency (rather than input a lower resolution)
  • Parallel processing to increase FPS

About

NVR with realtime local object detection for IP cameras

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 51.2%
  • TypeScript 43.6%
  • CSS 1.6%
  • C++ 1.2%
  • Dockerfile 0.8%
  • Shell 0.7%
  • Other 0.9%