浏览代码

cleanup imports

Blake Blackshear 5 年之前
父节点
当前提交
f5a2252b29
共有 3 个文件被更改,包括 7 次插入6 次删除
  1. 2 1
      frigate/object_detection.py
  2. 1 1
      frigate/objects.py
  3. 4 4
      frigate/video.py

+ 2 - 1
frigate/object_detection.py

@@ -5,7 +5,8 @@ import threading
 import prctl
 import numpy as np
 from edgetpu.detection.engine import DetectionEngine
-from . util import tonumpyarray, LABELS, PATH_TO_CKPT
+
+from frigate.util import tonumpyarray, LABELS, PATH_TO_CKPT
 
 class PreppedQueueProcessor(threading.Thread):
     def __init__(self, cameras, prepped_frame_queue, fps, queue_full):

+ 1 - 1
frigate/objects.py

@@ -6,7 +6,7 @@ import prctl
 import itertools
 import numpy as np
 from scipy.spatial import distance as dist
-from . util import draw_box_with_label, LABELS, compute_intersection_rectangle, compute_intersection_over_union, calculate_region
+from frigate.util import draw_box_with_label, LABELS, compute_intersection_rectangle, compute_intersection_over_union, calculate_region
 
 class ObjectCleaner(threading.Thread):
     def __init__(self, objects_parsed, detected_objects):

+ 4 - 4
frigate/video.py

@@ -11,10 +11,10 @@ import numpy as np
 import prctl
 import itertools
 from collections import defaultdict
-from . util import tonumpyarray, LABELS, draw_box_with_label, calculate_region, EventsPerSecond
-from . object_detection import RegionPrepper, RegionRequester
-from . objects import ObjectCleaner, BestFrames, DetectedObjectsProcessor, RegionRefiner, ObjectTracker
-from . mqtt import MqttObjectPublisher
+from frigate.util import tonumpyarray, LABELS, draw_box_with_label, calculate_region, EventsPerSecond
+from frigate.object_detection import RegionPrepper, RegionRequester
+from frigate.objects import ObjectCleaner, BestFrames, DetectedObjectsProcessor, RegionRefiner, ObjectTracker
+from frigate.mqtt import MqttObjectPublisher
 
 # Stores 2 seconds worth of frames so they can be used for other threads
 class FrameTracker(threading.Thread):