maix.tracker

maix.tracker module

You can use maix.tracker to access this module with MaixPy
This module is generated from MaixPy and MaixCDK

Module

No module

Enum

Variable

Function

Class

Object

tracker.Object class

C++ defination code:

class Object

__init__

def __init__(self, x: int, y: int, w: int, h: int, class_id: int, score: float) -> None

tracker.Object class constructor

item description
type func
static False

C++ defination code:

Object(const int &x, const int &y, const int &w, const int &h, const int &class_id, const float &score)

x

position x attribute.

item description
type var
static False
readonly False

C++ defination code:

int x

y

position y attribute.

item description
type var
static False
readonly False

C++ defination code:

int y

w

position rectangle width.

item description
type var
static False
readonly False

C++ defination code:

int w

h

position rectangle height.

item description
type var
static False
readonly False

C++ defination code:

int h

class_id

object class id, int type.

item description
type var
static False
readonly False

C++ defination code:

int class_id

score

object score(prob).

item description
type var
static False
readonly False

C++ defination code:

float score

Track

tracker.Track class

C++ defination code:

class Track

__init__

def __init__(self, id: int, score: float, lost: bool, start_frame_id: int, frame_id: int) -> None

tracker.Track class constructor

item description
type func
static False

C++ defination code:

Track(const size_t &id, const float &score, const bool &lost, const size_t &start_frame_id, const size_t &frame_id)

id

track id.

item description
type var
static False
readonly False

C++ defination code:

size_t id

score

track score(prob).

item description
type var
static False
readonly False

C++ defination code:

float score

lost

whether this track lost.

item description
type var
static False
readonly False

C++ defination code:

bool lost

start_frame_id

track start frame id.

item description
type var
static False
readonly False

C++ defination code:

size_t start_frame_id

frame_id

track current frame id.

item description
type var
static False
readonly False

C++ defination code:

size_t frame_id

history

track position history, the last one is latest position.

item description
type var
static False
readonly False

C++ defination code:

std::deque<tracker::Object> history

ByteTracker

tracker.ByteTracker class

C++ defination code:

class ByteTracker

__init__

def __init__(self, max_lost_buff_num: int = 60, track_thresh: float = 0.5, high_thresh: float = 0.6, match_thresh: float = 0.8, max_history: int = 20) -> None

tracker.ByteTracker class constructor

item description
type func
param max_lost_buff_num: the frames for keep lost tracks.
track_thresh: tracking confidence threshold.
high_thresh: threshold to add to new track.
match_thresh: matching threshold for tracking, e.g. one object in two frame iou < match_thresh we think they are the same obj.
max_history: max tack's position history length.
static False

C++ defination code:

ByteTracker(const int &max_lost_buff_num = 60,
                    const float &track_thresh = 0.5,
                    const float &high_thresh = 0.6,
                    const float &match_thresh = 0.8,
                    const int &max_history = 20)

update

def update(self, objs: list[Object]) -> list[Track]

update tracks according to current detected objects.

item description
type func
static False

C++ defination code:

std::vector<tracker::Track> update(const std::vector<tracker::Object> &objs)