mikel-brostrom / boxmot

BoxMOT: pluggable SOTA tracking modules for segmentation, object detection and pose estimation models
GNU Affero General Public License v3.0
6.79k stars 1.72k forks source link

Custom Detection Model Tracking #905

Closed Mersen130 closed 1 year ago

Mersen130 commented 1 year ago

Search before asking

Yolv8 Tracking Component

Tracking

Bug

Hi,

I'm trying out your tracker with Custom Detection Model

But I get this error when initializing the tracker: TypeError: OCSort.init() missing 4 required positional arguments: 'model_weights', 'device', 'fp16', and 'det_thresh'

Could you please elaborate on what arguments values should be filled in there, I couldn't find any related examples online

Environment

Not environmental related

Minimal Reproducible Example

from boxmot import DeepOCSORT

tracker = DeepOCSORT()
mikel-brostrom commented 1 year ago

Check the README example. There you have the explanation for all the required arguments

mikel-brostrom commented 1 year ago
from boxmot import DeepOCSORT
from pathlib import Path

tracker = DeepOCSORT(
  model_weights=Path('mobilenetv2_x1_4_dukemtmcreid.pt'),  # which ReID model to use, when applicable
  device='cuda:0',  # 'cpu', 'cuda:0', 'cuda:1', ... 'cuda:N'
  fp16=True,  # wether to run the ReID model with half precision or not
  det_thresh=0.2  # minimum valid detection confidence
)