Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mikel.brostrom committed May 16, 2023
1 parent 068a358 commit 023999b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions trackers/deep/reid_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
from torch.utils.mobile_optimizer import optimize_for_mobile
import logging

FILE = Path(__file__).resolve()
ROOT = FILE.parents[0].parents[0].parents[0] # root dir
WEIGHTS = ROOT / 'weights'

if str(ROOT) not in sys.path:
sys.path.append(str(ROOT)) # add ROOT to PATH
if str(ROOT / 'trackers') not in sys.path:
sys.path.append(str(ROOT / 'trackers')) # add yolov5 ROOT to PATH

from trackers.deep.models import build_model
from trackers.deep.reid_model_factory import get_model_name, load_pretrained_weights

Expand All @@ -20,10 +29,6 @@
from ultralytics.yolo.utils.checks import check_requirements, check_version


FILE = Path(__file__).resolve()
ROOT = FILE.parents[0] # root dir
WEIGHTS = ROOT / 'weights'


def file_size(path):
# Return file/dir size (MB)
Expand Down

0 comments on commit 023999b

Please sign in to comment.