From e597a08a66aeb145cb46837c1c4a2cd64e331895 Mon Sep 17 00:00:00 2001 From: blakeblackshear Date: Sat, 2 Mar 2019 15:20:53 -0600 Subject: [PATCH] prevent unnecessary early exit from loop --- README.md | 6 +++--- frigate/motion.py | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9088c9be1..d0f65a1b4 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This results in a MJPEG stream with objects identified that has a lower latency ## Getting Started Build the container with ``` -docker build -t realtime-od . +docker build -t frigate . ``` Download a model from the [zoo](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md). @@ -31,7 +31,7 @@ docker run --rm \ -e MQTT_HOST='your.mqtthost.com' \ -e MQTT_TOPIC_PREFIX='cameras/1' \ -e DEBUG='0' \ -realtime-od:latest +frigate:latest ``` Example compose: @@ -39,7 +39,7 @@ Example compose: frigate: container_name: frigate restart: unless-stopped - image: realtime-od:latest + image: frigate:latest volumes: - :/frozen_inference_graph.pb:ro - :/label_map.pbtext:ro diff --git a/frigate/motion.py b/frigate/motion.py index 89a26cf66..3a6fdbc9e 100644 --- a/frigate/motion.py +++ b/frigate/motion.py @@ -70,11 +70,6 @@ def detect_motion(shared_arr, shared_frame_time, frame_lock, frame_ready, motion cnts = cv2.findContours(thresh.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) cnts = imutils.grab_contours(cnts) - # if there are no contours, there is no motion - if len(cnts) < 1: - motion_frames = 0 - continue - motion_found = False # loop over the contours