Skip to content

Commit 81a22c6

Browse files
committed
Fix sys.path imports -> proper module references
1 parent 077eaa6 commit 81a22c6

4 files changed

Lines changed: 2 additions & 13 deletions

File tree

animals/demo/vis_animals.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"""
99

1010
# SuperAnimal Demo: https://github.com/DeepLabCut/DeepLabCut/blob/main/examples/COLAB/COLAB_YOURDATA_SuperAnimal.ipynb
11-
import sys
1211
import os
1312
import numpy as np
1413
import glob
@@ -25,8 +24,6 @@
2524
from fmpose3d.animals.common.arguments import opts as parse_args
2625
from fmpose3d.common.camera import normalize_screen_coordinates, camera_to_world
2726

28-
sys.path.append(os.getcwd())
29-
3027
args = parse_args().parse()
3128
os.environ["CUDA_VISIBLE_DEVICES"] = args.gpu
3229

demo/vis_in_the_wild.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
Licensed under Apache 2.0
88
"""
99

10-
import sys
1110
import cv2
1211
import os
1312
import numpy as np
@@ -16,8 +15,6 @@
1615
from tqdm import tqdm
1716
import copy
1817

19-
sys.path.append(os.getcwd())
20-
2118
# Auto-download checkpoint files if missing
2219
from fmpose3d.lib.checkpoint.download_checkpoints import ensure_checkpoints
2320
ensure_checkpoints()

fmpose3d/animals/common/arber_dataset.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import glob
1313
import os
1414
import random
15-
import sys
1615

1716
import cv2
1817
import matplotlib.pyplot as plt
@@ -23,10 +22,8 @@
2322
from torch.utils.data import Dataset
2423
from tqdm import tqdm
2524

26-
sys.path.append(os.path.dirname(sys.path[0]))
27-
28-
from common.camera import normalize_screen_coordinates
29-
from common.lifter3d import load_camera_params, load_h5_keypoints
25+
from fmpose3d.common.camera import normalize_screen_coordinates
26+
from fmpose3d.animals.common.lifter3d import load_camera_params, load_h5_keypoints
3027

3128

3229
class ArberDataset(Dataset):

fmpose3d/models/model_GAMLP.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
Licensed under Apache 2.0
88
"""
99

10-
import sys
11-
sys.path.append("..")
1210
import torch
1311
import torch.nn as nn
1412
import math

0 commit comments

Comments
 (0)