xuepengqiang
2020-05-26 bb5cb224c9abe4216aaa49a8287b06d9f05dab60
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
3
™(¸]Êã@sddlZGdd„deƒZdS)éNc@s(eZdZdZdd„Zdd„Zdd„ZdS)    Ú    Detectionat
    This class represents a bounding box detection in a single image.
 
    Parameters
    ----------
    tlwh : array_like
        Bounding box in format `(x, y, w, h)`.
    confidence : float
        Detector confidence score.
    feature : array_like
        A feature vector that describes the object contained in this image.
 
    Attributes
    ----------
    tlwh : ndarray
        Bounding box in format `(top left x, top left y, width, height)`.
    confidence : ndarray
        Detector confidence score.
    feature : ndarray | NoneType
        A feature vector that describes the object contained in this image.
 
    cCs2tj|tjd|_t|ƒ|_tj|tjd|_dS)N)Údtype)ÚnpÚasarrayÚfloatÚtlwhÚ
confidenceÚfloat32Úfeature)Úselfrrr
©r úJD:\project\07_tracking_Re-id\04_s_yolo_tracking\lib\deep_sort\detection.pyÚ__init__s
zDetection.__init__cCs*|jjƒ}|dd…|dd…7<|S)zqConvert bounding box to format `(min x, min y, max x, max y)`, i.e.,
        `(top left, bottom right)`.
        éN)rÚcopy)r Úretr r r Úto_tlbr"s
zDetection.to_tlbrcCsB|jjƒ}|dd…|dd…d7<|d|d<|S)z‰Convert bounding box to format `(center x, center y, aspect ratio,
        height)`, where the aspect ratio is `width / height`.
        Nré)rr)r rr r r Úto_xyah*s
 zDetection.to_xyahN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rrrr r r r rsr)ÚnumpyrÚobjectrr r r r Ú<module>s