From cc30afcf0a4e0cd1dc0e954741c22f80c5d62785 Mon Sep 17 00:00:00 2001 From: lkorth Date: Fri, 21 Jun 2019 16:46:13 -0400 Subject: [PATCH] Remove trailing whitespace --- Dockerfile | 24 ++++++++++++------------ frigate/object_detection.py | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index b2f6e7edf..80093e41d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,21 @@ FROM ubuntu:16.04 # Install system packages -RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y python3 \ +RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y python3 \ python3-dev \ python-pil \ python-lxml \ python-tk \ build-essential \ - cmake \ - git \ - libgtk2.0-dev \ - pkg-config \ - libavcodec-dev \ - libavformat-dev \ - libswscale-dev \ + cmake \ + git \ + libgtk2.0-dev \ + pkg-config \ + libavcodec-dev \ + libavformat-dev \ + libswscale-dev \ libtbb2 \ - libtbb-dev \ + libtbb-dev \ libjpeg-dev \ libpng-dev \ libtiff-dev \ @@ -36,9 +36,9 @@ RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y python3 libc++-dev \ libc++abi-dev \ build-essential \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* -# Install core packages +# Install core packages RUN wget -q -O /tmp/get-pip.py --no-check-certificate https://bootstrap.pypa.io/get-pip.py && python3 /tmp/get-pip.py RUN pip install -U pip \ numpy \ @@ -72,7 +72,7 @@ RUN cd /usr/local/src/ \ && rm 4.0.1.zip \ && cd /usr/local/src/opencv-4.0.1/ \ && mkdir build \ - && cd /usr/local/src/opencv-4.0.1/build \ + && cd /usr/local/src/opencv-4.0.1/build \ && cmake -D CMAKE_INSTALL_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local/ .. \ && make -j4 \ && make install \ diff --git a/frigate/object_detection.py b/frigate/object_detection.py index 965e1b608..3a1d11c42 100644 --- a/frigate/object_detection.py +++ b/frigate/object_detection.py @@ -57,7 +57,7 @@ class PreppedQueueProcessor(threading.Thread): # should this be a region class? class FramePrepper(threading.Thread): - def __init__(self, camera_name, shared_frame, frame_time, frame_ready, + def __init__(self, camera_name, shared_frame, frame_time, frame_ready, frame_lock, region_size, region_x_offset, region_y_offset, region_threshold, prepped_frame_queue): @@ -83,12 +83,12 @@ class FramePrepper(threading.Thread): # if there isnt a frame ready for processing or it is old, wait for a new frame if self.frame_time.value == frame_time or (now - self.frame_time.value) > 0.5: self.frame_ready.wait() - + # make a copy of the cropped frame with self.frame_lock: cropped_frame = self.shared_frame[self.region_y_offset:self.region_y_offset+self.region_size, self.region_x_offset:self.region_x_offset+self.region_size].copy() frame_time = self.frame_time.value - + # convert to RGB cropped_frame_rgb = cv2.cvtColor(cropped_frame, cv2.COLOR_BGR2RGB) # Resize to 300x300 if needed