Skip to content

Commit 7c42fb4

Browse files
committed
only import deepsort if needed
1 parent 1c0db22 commit 7c42fb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sports2D/process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878

7979
from rtmlib import PoseTracker, BodyWithFeet, Wholebody, Body, Hand, Custom
8080
from rtmlib.tools.object_detection.post_processings import nms
81-
from deep_sort_realtime.deepsort_tracker import DeepSort
8281

8382
from Sports2D.Utilities.common import *
8483
from Pose2Sim.common import *
@@ -1459,6 +1458,7 @@ def process_fun(config_dict, video_file, time_range, frame_rate, result_dir):
14591458
tracking_mode = config_dict.get('pose').get('tracking_mode')
14601459
max_distance = config_dict.get('pose').get('max_distance', None)
14611460
if tracking_mode == 'deepsort':
1461+
from deep_sort_realtime.deepsort_tracker import DeepSort
14621462
deepsort_params = config_dict.get('pose').get('deepsort_params')
14631463
try:
14641464
deepsort_params = ast.literal_eval(deepsort_params)

0 commit comments

Comments
 (0)