BoostTrack
Bases: BaseTracker
Initializes the BoostTrack tracker with various parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
reid_weights
|
Path to the re-identification model weights. |
required | |
device
|
Device to run the model on (e.g., 'cpu', 'cuda'). |
required | |
half
|
bool
|
Whether to use half-precision for computations. |
required |
max_age
|
int
|
Maximum allowed frames without update. |
60
|
min_hits
|
int
|
Minimum hits required to output a track. |
3
|
det_thresh
|
float
|
Detection confidence threshold. |
0.6
|
iou_threshold
|
float
|
IoU threshold for association. |
0.3
|
use_ecc
|
bool
|
Whether to use ECC for camera motion compensation. |
True
|
min_box_area
|
int
|
Minimum box area for detections. |
10
|
aspect_ratio_thresh
|
bool
|
Aspect ratio threshold for detections. |
1.6
|
cmc_method
|
str
|
Method for camera motion compensation. |
'ecc'
|
lambda_iou
|
float
|
Weight for IoU-based association. |
0.5
|
lambda_mhd
|
float
|
Weight for Mahalanobis distance-based association. |
0.25
|
lambda_shape
|
float
|
Weight for shape-based association. |
0.25
|
use_dlo_boost
|
bool
|
Whether to use DLO boost. |
True
|
use_duo_boost
|
bool
|
Whether to use DUO boost. |
True
|
dlo_boost_coef
|
float
|
Coefficient for DLO boost. |
0.65
|
s_sim_corr
|
bool
|
Whether to use shape similarity correction. |
False
|
use_rich_s
|
bool
|
Whether to use rich shape features. |
False
|
use_sb
|
bool
|
Whether to use soft-BIoU. |
False
|
use_vt
|
bool
|
Whether to use visual tracking. |
False
|
with_reid
|
bool
|
Whether to use re-identification. |
False
|
per_class
|
bool
|
If True, enables per-class tracking, where tracks are managed separately for each class. |
False
|
Source code in boxmot/trackers/boosttrack/boosttrack.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 |
|
update(dets, img, embs=None)
Update the tracker with detections and an image.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dets
|
ndarray
|
Detection boxes in the format [[x1,y1,x2,y2,score], ...] |
required |
img
|
ndarray
|
The current image frame. |
required |
embs
|
Optional[ndarray]
|
Optional precomputed embeddings. |
None
|
Returns:
Type | Description |
---|---|
ndarray
|
np.ndarray: Tracked objects in the format [x1, y1, x2, y2, id, confidence, cls, det_ind] (with cls and det_ind set to -1 if unused) |
Source code in boxmot/trackers/boosttrack/boosttrack.py
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
|