-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.py
37 lines (29 loc) · 809 Bytes
/
common.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- coding: utf-8 -*-
#from collections import namedtuple
from typing import NamedTuple
import numpy as np
#Configuration = namedtuple('Configuration', ['fps', 'rsl', 'roi', 'model'])
class Configuration(NamedTuple):
fps: int
rsl: int
#roi: bool
#model: str
#Task = namedtuple('Task', ['time', 'frame', 'jid', 'sid', 'fid', 'rs', 'fr'])
class Task(NamedTuple):
frame: np.ndarray
sid: int
fid: int
tag: int
time: float
#DetectionResult = namedtuple('DetectionResult', ['box', 'lbl'])
class DetectionResult(NamedTuple):
box: np.ndarray
lbl: int
time: float
#TrackResult = namedtuple('TrackResult', ['id', 'center', 'box', 'lbl', 'speed'])
class TrackResult(NamedTuple):
id: int
box: np.ndarray
lbl: int
speed: np.ndarray
time: float