Files
aicheckv2-api/apps/business/deepsort/service.py
2025-06-11 16:19:38 +08:00

16 lines
384 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from algo import DeepSortModel
def run_deepsort(
detect_id: int,
weights_pt: str,
idx_to_class: {},
url
):
"""
deep_sort追踪先经过yolo对目标进行识别
再调用deepsort对目标进行追踪
"""
deep_sort = DeepSortModel(weights_pt)
deep_sort.sort_video(url=url, detect_id=detect_id, idx_to_class=idx_to_class)