Diego Fernandez commited on
Commit
3647577
1 Parent(s): 470401e

fix: norfair imports

Browse files
Files changed (2) hide show
  1. inference.py +2 -5
  2. inference_utils.py +2 -3
inference.py CHANGED
@@ -3,6 +3,8 @@ import glob
3
  import os
4
 
5
  import numpy as np
 
 
6
 
7
  from inference_utils import (
8
  YOLO,
@@ -15,11 +17,6 @@ from inference_utils import (
15
  iou,
16
  yolo_detections_to_norfair_detections,
17
  )
18
- from norfair.norfair import Paths, Tracker, Video
19
- from norfair.norfair.camera_motion import (
20
- HomographyTransformationGetter,
21
- MotionEstimator,
22
- )
23
 
24
  DISTANCE_THRESHOLD_BBOX: float = 3.33
25
  DISTANCE_THRESHOLD_CENTROID: int = 30
 
3
  import os
4
 
5
  import numpy as np
6
+ from norfair import Paths, Tracker, Video
7
+ from norfair.camera_motion import HomographyTransformationGetter, MotionEstimator
8
 
9
  from inference_utils import (
10
  YOLO,
 
17
  iou,
18
  yolo_detections_to_norfair_detections,
19
  )
 
 
 
 
 
20
 
21
  DISTANCE_THRESHOLD_BBOX: float = 3.33
22
  DISTANCE_THRESHOLD_CENTROID: int = 30
inference_utils.py CHANGED
@@ -4,12 +4,11 @@ import os
4
  from enum import Enum
5
  from typing import List, Optional, Union
6
 
 
7
  import numpy as np
8
  import torch
9
  import torchvision.ops.boxes as bops
10
-
11
- from norfair import norfair
12
- from norfair.norfair import Detection
13
 
14
  DISTANCE_THRESHOLD_BBOX: float = 3.33
15
  DISTANCE_THRESHOLD_CENTROID: int = 30
 
4
  from enum import Enum
5
  from typing import List, Optional, Union
6
 
7
+ import norfair
8
  import numpy as np
9
  import torch
10
  import torchvision.ops.boxes as bops
11
+ from norfair import Detection
 
 
12
 
13
  DISTANCE_THRESHOLD_BBOX: float = 3.33
14
  DISTANCE_THRESHOLD_CENTROID: int = 30