Spaces:
Running
on
A10G
Running
on
A10G
Update inferencer_demo.py
Browse files- inferencer_demo.py +3 -13
inferencer_demo.py
CHANGED
@@ -3,6 +3,8 @@ from argparse import ArgumentParser
|
|
3 |
from typing import Dict
|
4 |
|
5 |
import sys
|
|
|
|
|
6 |
from mmpose.apis.inferencers import MMPoseInferencer, get_model_aliases
|
7 |
|
8 |
|
@@ -12,9 +14,6 @@ POSE2D_SPECIFIC_ARGS = dict(
|
|
12 |
rtmo=dict(bbox_thr=0.1, nms_thr=0.65, pose_based_nms=True),
|
13 |
)
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
def parse_args():
|
19 |
parser = ArgumentParser()
|
20 |
parser.add_argument(
|
@@ -207,9 +206,6 @@ def parse_args():
|
|
207 |
|
208 |
return init_args, call_args, display_alias
|
209 |
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
def display_model_aliases(model_aliases: Dict[str, str]) -> None:
|
214 |
"""Display the available model aliases and their corresponding model
|
215 |
names."""
|
@@ -219,9 +215,6 @@ def display_model_aliases(model_aliases: Dict[str, str]) -> None:
|
|
219 |
for alias in sorted(aliases):
|
220 |
print(f'{alias.ljust(max_alias_length+2)}{model_aliases[alias]}')
|
221 |
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
def main():
|
226 |
init_args, call_args, display_alias = parse_args()
|
227 |
if display_alias:
|
@@ -232,8 +225,5 @@ def main():
|
|
232 |
for _ in inferencer(**call_args):
|
233 |
pass
|
234 |
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
if __name__ == '__main__':
|
239 |
-
main()
|
|
|
3 |
from typing import Dict
|
4 |
|
5 |
import sys
|
6 |
+
sys.path.append("./")
|
7 |
+
sys.path.append("./mmpose")
|
8 |
from mmpose.apis.inferencers import MMPoseInferencer, get_model_aliases
|
9 |
|
10 |
|
|
|
14 |
rtmo=dict(bbox_thr=0.1, nms_thr=0.65, pose_based_nms=True),
|
15 |
)
|
16 |
|
|
|
|
|
|
|
17 |
def parse_args():
|
18 |
parser = ArgumentParser()
|
19 |
parser.add_argument(
|
|
|
206 |
|
207 |
return init_args, call_args, display_alias
|
208 |
|
|
|
|
|
|
|
209 |
def display_model_aliases(model_aliases: Dict[str, str]) -> None:
|
210 |
"""Display the available model aliases and their corresponding model
|
211 |
names."""
|
|
|
215 |
for alias in sorted(aliases):
|
216 |
print(f'{alias.ljust(max_alias_length+2)}{model_aliases[alias]}')
|
217 |
|
|
|
|
|
|
|
218 |
def main():
|
219 |
init_args, call_args, display_alias = parse_args()
|
220 |
if display_alias:
|
|
|
225 |
for _ in inferencer(**call_args):
|
226 |
pass
|
227 |
|
|
|
|
|
|
|
228 |
if __name__ == '__main__':
|
229 |
+
main()
|