From 6de8e3bd1f89d5e91e6151a76f4b3be17db5d32a Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Fri, 13 Mar 2020 15:50:27 -0500 Subject: [PATCH] remove sharedarray references --- Dockerfile | 1 - frigate/edgetpu.py | 1 - frigate/object_processing.py | 1 - frigate/video.py | 9 ++------- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index e8674da55..33df7a4e1 100755 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,6 @@ RUN apt -qq update && apt -qq install --no-install-recommends -y \ imutils \ scipy \ && python3.7 -m pip install -U \ - SharedArray \ Flask \ paho-mqtt \ PyYAML \ diff --git a/frigate/edgetpu.py b/frigate/edgetpu.py index 5dbe68741..b9a28976d 100644 --- a/frigate/edgetpu.py +++ b/frigate/edgetpu.py @@ -3,7 +3,6 @@ import datetime import hashlib import multiprocessing as mp import numpy as np -import SharedArray as sa import pyarrow.plasma as plasma import tflite_runtime.interpreter as tflite from tflite_runtime.interpreter import load_delegate diff --git a/frigate/object_processing.py b/frigate/object_processing.py index d157857d7..034c3dff1 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -8,7 +8,6 @@ import numpy as np from collections import Counter, defaultdict import itertools import pyarrow.plasma as plasma -import SharedArray as sa import matplotlib.pyplot as plt from frigate.util import draw_box_with_label from frigate.edgetpu import load_labels diff --git a/frigate/video.py b/frigate/video.py index b368539e8..223a02079 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -10,7 +10,6 @@ import subprocess as sp import numpy as np import hashlib import pyarrow.plasma as plasma -import SharedArray as sa import copy import itertools import json @@ -109,6 +108,7 @@ def start_or_restart_ffmpeg(ffmpeg_cmd, frame_size, pid, ffmpeg_process=None): print("FFmpeg didnt exit. Force killing...") ffmpeg_process.kill() ffmpeg_process.communicate() + ffmpeg_process = None print("Creating ffmpeg process...") print(" ".join(ffmpeg_cmd)) @@ -158,12 +158,7 @@ def track_camera(name, config, ffmpeg_global_config, global_objects_config, dete frame_size = frame_shape[0] * frame_shape[1] * frame_shape[2] - try: - sa.delete(name) - except: - pass - - frame = sa.create(name, shape=frame_shape, dtype=np.uint8) + frame = np.zeros(frame_shape, np.uint8) # load in the mask for object detection if 'mask' in config: