We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b1a98ad + 8941ca6 commit 217b32eCopy full SHA for 217b32e
trackers/core/deepsort/feature_extractor.py
@@ -6,7 +6,6 @@
6
import torch
7
import torch.nn as nn
8
import torchvision.transforms as transforms
9
-import validators
10
from firerequests import FireRequests
11
12
from trackers.utils.torch_utils import parse_device_spec
@@ -106,6 +105,8 @@ def _initialize_model(
106
105
self, model_or_checkpoint_path: Union[str, torch.nn.Module, None]
107
):
108
if isinstance(model_or_checkpoint_path, str):
+ import validators
109
+
110
if validators.url(model_or_checkpoint_path):
111
checkpoint_path = FireRequests().download(model_or_checkpoint_path)[0]
112
self._load_model_from_path(checkpoint_path)
0 commit comments