forked from Github/frigate
Compare commits
2 Commits
v0.6.0-rc2
...
v0.6.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
309c0dcda3 | ||
|
|
b35cc01035 |
@@ -19,7 +19,7 @@ You see multiple bounding boxes because it draws bounding boxes from all frames
|
||||
Run the container with
|
||||
```bash
|
||||
docker run --rm \
|
||||
-name frigate \
|
||||
-name blakeblackshear/frigate:stable \
|
||||
--privileged \
|
||||
--shm-size=512m \ # should work for a 2-3 cameras
|
||||
-v /dev/bus/usb:/dev/bus/usb \
|
||||
|
||||
@@ -140,6 +140,12 @@ cameras:
|
||||
################
|
||||
take_frame: 1
|
||||
|
||||
################
|
||||
# The number of seconds to retain the highest scoring image for the best.jpg endpoint before allowing it
|
||||
# to be replaced by a newer image. Defaults to 60 seconds.
|
||||
################
|
||||
best_image_timeout: 60
|
||||
|
||||
################
|
||||
# MQTT settings
|
||||
################
|
||||
|
||||
@@ -384,7 +384,7 @@ def main():
|
||||
best_object = object_processor.get_best(camera_name, label)
|
||||
best_frame = best_object.get('frame', np.zeros((720,1280,3), np.uint8))
|
||||
|
||||
crop = bool(request.args.get('crop', 0))
|
||||
crop = bool(request.args.get('crop', 0, type=int))
|
||||
if crop:
|
||||
region = best_object.get('region', [0,0,300,300])
|
||||
best_frame = best_frame[region[1]:region[3], region[0]:region[2]]
|
||||
|
||||
@@ -193,8 +193,8 @@ class CameraState():
|
||||
current_best = self.best_objects[object_type]
|
||||
now = datetime.datetime.now().timestamp()
|
||||
# if the object is a higher score than the current best score
|
||||
# or the current object is more than 1 minute old, use the new object
|
||||
if obj_copy['score'] > current_best['score'] or (now - current_best['frame_time']) > 60:
|
||||
# or the current object is older than desired, use the new object
|
||||
if obj_copy['score'] > current_best['score'] or (now - current_best['frame_time']) > self.config.get('best_image_timeout', 60):
|
||||
obj_copy['frame'] = np.copy(self.current_frame)
|
||||
self.best_objects[object_type] = obj_copy
|
||||
for c in self.callbacks['snapshot']:
|
||||
|
||||
Reference in New Issue
Block a user