prevent unnecessary early exit from loop

This commit is contained in:
blakeblackshear 2019-03-02 15:20:53 -06:00
parent 5dc76803d6
commit e597a08a66
2 changed files with 3 additions and 8 deletions

View File

@ -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:
- <path_to_frozen_detection_graph.pb>:/frozen_inference_graph.pb:ro
- <path_to_labelmap.pbtext>:/label_map.pbtext:ro

View File

@ -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