hysts commited on
Commit
a717902
1 Parent(s): 37c10df
Files changed (1) hide show
  1. model.py +4 -1
model.py CHANGED
@@ -1,6 +1,7 @@
1
  from __future__ import annotations
2
 
3
  import os
 
4
  import subprocess
5
  import sys
6
 
@@ -19,7 +20,9 @@ import numpy as np
19
  import torch
20
  import torch.nn as nn
21
 
22
- sys.path.insert(0, 'ViTPose/')
 
 
23
 
24
  from mmdet.apis import inference_detector, init_detector
25
  from mmpose.apis import (inference_top_down_pose_model, init_pose_model,
 
1
  from __future__ import annotations
2
 
3
  import os
4
+ import pathlib
5
  import subprocess
6
  import sys
7
 
 
20
  import torch
21
  import torch.nn as nn
22
 
23
+ app_dir = pathlib.Path(__file__).parent
24
+ submodule_dir = app_dir / 'ViTPose/'
25
+ sys.path.insert(0, submodule_dir.as_posix())
26
 
27
  from mmdet.apis import inference_detector, init_detector
28
  from mmpose.apis import (inference_top_down_pose_model, init_pose_model,