ailia_tracker package¶
Classes¶
- class ailia_tracker.AiliaTracker(algorithm=0, score_threshold=0.1, nms_threshold=0.7, track_threshold=0.5, track_buffer=30, match_threshold=0.8, flags=0)¶
Bases:
objectwrapper class for ailia tracker instance
- __init__(algorithm=0, score_threshold=0.1, nms_threshold=0.7, track_threshold=0.5, track_buffer=30, match_threshold=0.8, flags=0)¶
constructor of ailia tracker instance.
- Parameters:
algorithm (int, optional, default: AILIA_TRACKER_ALGORITHM_BYTE_TRACK(0)) – tracking algorithm.
score_threshold (float, optional, default: 0.1) – minimum confidence score to accept a detection result.
nms_threshold (float, optional, default: 0.7) – Non-Maximum Suppression (NMS) threshold used to remove duplicate detections.
track_threshold (float, optional, default: 0.5) – confidence threshold for updating active tracks.
track_buffer (int, optional, default: 30) – maximum number of frames to keep lost tracks in memory.
match_threshold (float, optional, default: 0.8) – IoU threshold used for matching objects between frames.
flags (int, optional, default: AILIA_TRACKER_FLAG_NONE(0)) – logical OR of AILIA_TRACKER_FLAG_*.
- add_target(category, prob, x, y, w, h)¶
set a tracking target detected in the current frame.
- Parameters:
category (int) – object category number.
prob (float) – estimated probability (0 to 1).
x (float) – x position at the top left (1 for the image width).
y (float) – y position at the top left (1 for the image height).
w (float) – width (1 for the width of the image).
h (float) – height (1 for the height of the image).
- compute()¶
run tracking with the targets given by add_target().
Get the tracking result with get_objects() or get_object().
- get_object(index)¶
get a tracked object specified by index.
- Parameters:
index (int) – object index. valid values : range(0, get_object_count())
- Returns:
tracking result.
- Return type:
- get_object_count()¶
get the number of tracked objects.
- Returns:
number of tracked objects.
- Return type:
int
- get_objects()¶
get all tracked objects.
- Returns:
tracking results.
- Return type:
list of TrackerObject
- release()¶
destroy the ailia tracker instance.
- class ailia_tracker.TrackerSettings¶
Bases:
Structuresettings of the tracker (AILIATrackerSettings)
- score_threshold¶
Minimum confidence score to accept a detection result.
- Type:
float
- nms_threshold¶
Non-Maximum Suppression (NMS) threshold used to remove duplicate detections.
- Type:
float
- track_threshold¶
Confidence threshold for updating active tracks.
- Type:
float
- track_buffer¶
Maximum number of frames to keep lost tracks in memory.
- Type:
int
- match_threshold¶
IoU threshold used for matching objects between frames.
- Type:
float
- VERSION = c_int(1)¶
- match_threshold¶
Structure/Union member
- nms_threshold¶
Structure/Union member
- score_threshold¶
Structure/Union member
- track_buffer¶
Structure/Union member
- track_threshold¶
Structure/Union member
- class ailia_tracker.TrackerObject¶
Bases:
Structuretracking result (AILIATrackerObject)
- id¶
Object tracking id.
- Type:
int
- category¶
Object category number (0 to category_count-1).
- Type:
int
- prob¶
Estimated probability (0 to 1).
- Type:
float
- x¶
X position at the top left (1 for the image width).
- Type:
float
- y¶
Y position at the top left (1 for the image height).
- Type:
float
- w¶
Width (1 for the width of the image, negative numbers not allowed).
- Type:
float
- h¶
Height (1 for the height of the image, negative numbers not allowed).
- Type:
float
- VERSION = c_uint(1)¶
- category¶
Structure/Union member
- h¶
Structure/Union member
- id¶
Structure/Union member
- prob¶
Structure/Union member
- w¶
Structure/Union member
- x¶
Structure/Union member
- y¶
Structure/Union member
- class ailia_tracker.DetectorObject¶
Bases:
Structuretracking target (AILIADetectorObject)
- category¶
Object category number (0 to category_count-1).
- Type:
int
- prob¶
Estimated probability (0 to 1).
- Type:
float
- x¶
X position at the top left (1 for the image width).
- Type:
float
- y¶
Y position at the top left (1 for the image height).
- Type:
float
- w¶
Width (1 for the width of the image, negative numbers not allowed).
- Type:
float
- h¶
Height (1 for the height of the image, negative numbers not allowed).
- Type:
float
- VERSION = c_int(1)¶
- category¶
Structure/Union member
- h¶
Structure/Union member
- prob¶
Structure/Union member
- w¶
Structure/Union member
- x¶
Structure/Union member
- y¶
Structure/Union member