Skip to content

Commit

Permalink
Tracker only initialized if tracker argument is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
sovit-123 committed Aug 23, 2023
1 parent e5f8961 commit b417188
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions inference_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def main(args):
# For same annotation colors each time.
np.random.seed(42)

# Initialize Deep SORT tracker if tracker is selected.
tracker = DeepSort(max_age=30)
if args['track']: # Initialize Deep SORT tracker if tracker is selected.
tracker = DeepSort(max_age=30)

# Load the data configurations.
data_configs = None
Expand Down
4 changes: 2 additions & 2 deletions onnx_inference_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ def parse_opt():

def main(args):
np.random.seed(42)
# Initialize Deep SORT tracker if tracker is selected.
tracker = DeepSort(max_age=30)
if args['track']: # Initialize Deep SORT tracker if tracker is selected.
tracker = DeepSort(max_age=30)
# Load model.
ort_session = onnxruntime.InferenceSession(
args['weights'], providers=['CUDAExecutionProvider', 'CPUExecutionProvider']
Expand Down

0 comments on commit b417188

Please sign in to comment.