bluemellophone commited on
Commit
1ea2e17
·
unverified ·
1 Parent(s): c43979a

Slim imports

Browse files
scoutbot/loc/transforms/__init__.py CHANGED
@@ -4,9 +4,9 @@
4
  # Copyright EAVISE
5
  #
6
 
7
- from scoutbot.loc.transforms import annotations # NOQA
8
  from scoutbot.loc.transforms import box # NOQA
9
- from scoutbot.loc.transforms import detections # NOQA
10
  from scoutbot.loc.transforms import util # NOQA
11
  from scoutbot.loc.transforms._postprocess import ( # NOQA
12
  GetBoundingBoxes,
 
4
  # Copyright EAVISE
5
  #
6
 
7
+ from scoutbot.loc.transforms import annotation # NOQA
8
  from scoutbot.loc.transforms import box # NOQA
9
+ from scoutbot.loc.transforms import detection # NOQA
10
  from scoutbot.loc.transforms import util # NOQA
11
  from scoutbot.loc.transforms._postprocess import ( # NOQA
12
  GetBoundingBoxes,
scoutbot/loc/transforms/_postprocess.py CHANGED
@@ -232,7 +232,7 @@ class TensorToBrambox(BaseTransform):
232
 
233
  @staticmethod
234
  def _convert(boxes, width, height, class_label_map):
235
- from scoutbot.loc.transforms.detections.detection import Detection
236
 
237
  boxes[:, 0:3:2].mul_(width)
238
  boxes[:, 0] -= boxes[:, 2] / 2
 
232
 
233
  @staticmethod
234
  def _convert(boxes, width, height, class_label_map):
235
+ from scoutbot.loc.transforms.detection import Detection
236
 
237
  boxes[:, 0:3:2].mul_(width)
238
  boxes[:, 0] -= boxes[:, 2] / 2
scoutbot/loc/transforms/{annotations/annotation.py → annotation.py} RENAMED
@@ -83,7 +83,7 @@ class Annotation(b.Box):
83
  The obj can be both an :class:`~brambox.boxes.annotations.Annotation` or a :class:`~brambox.boxes.detections.Detection`.
84
  For Annotations every attribute is copied over, for Detections the flags are all set to **False**.
85
  """
86
- from scoutbot.loc.transforms.detections import detection as det
87
 
88
  instance = super(Annotation, cls).create(obj)
89
 
 
83
  The obj can be both an :class:`~brambox.boxes.annotations.Annotation` or a :class:`~brambox.boxes.detections.Detection`.
84
  For Annotations every attribute is copied over, for Detections the flags are all set to **False**.
85
  """
86
+ from scoutbot.loc.transforms import detection as det
87
 
88
  instance = super(Annotation, cls).create(obj)
89
 
scoutbot/loc/transforms/{detections/detection.py → detection.py} RENAMED
@@ -34,7 +34,7 @@ class Detection(b.Box):
34
  The obj can be both an :class:`~brambox.boxes.annotations.Annotation` or a :class:`~brambox.boxes.detections.Detection`.
35
  For Detections the confidence score is copied over, for Annotations it is set to 1.
36
  """
37
- from scoutbot.loc.transforms.annotations import annotation as anno
38
 
39
  instance = super(Detection, cls).create(obj)
40
 
 
34
  The obj can be both an :class:`~brambox.boxes.annotations.Annotation` or a :class:`~brambox.boxes.detections.Detection`.
35
  For Detections the confidence score is copied over, for Annotations it is set to 1.
36
  """
37
+ from scoutbot.loc.transforms import annotation as anno
38
 
39
  instance = super(Detection, cls).create(obj)
40
 
scoutbot/loc/transforms/detections/__init__.py DELETED
File without changes