Skip to content

Commit

Permalink
[Fix] Fix Internet demo (#2717)
Browse files Browse the repository at this point in the history
  • Loading branch information
LareinaM committed Sep 22, 2023
1 parent 26f3688 commit 676bbdb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions demo/docs/en/3d_hand_demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ python demo/hand3d_internet_demo.py \
[--device ${GPU_ID or CPU}] \
[--kpt-thr ${KPT_THR}] \
[--show-kpt-idx] \
[--show-interval] \
[--radius ${RADIUS}] \
[--thickness ${THICKNESS}]
```
Expand Down
5 changes: 4 additions & 1 deletion demo/hand3d_internet_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def parse_args():
action='store_true',
default=False,
help='Whether to show the index of keypoints')
parser.add_argument(
'--show-interval', type=int, default=0, help='Sleep seconds per frame')
parser.add_argument(
'--radius',
type=int,
Expand Down Expand Up @@ -170,7 +172,8 @@ def main():
f'{os.path.splitext(os.path.basename(args.input))[0]}.json'

# build the model from a config file and a checkpoint file
model = init_model(args.config, args.checkpoint, device=args.device)
model = init_model(
args.config, args.checkpoint, device=args.device.lower())

# init visualizer
model.cfg.visualizer.radius = args.radius
Expand Down
1 change: 1 addition & 0 deletions mmpose/datasets/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
from .face import * # noqa: F401, F403
from .fashion import * # noqa: F401, F403
from .hand import * # noqa: F401, F403
from .hand3d import * # noqa: F401, F403
from .wholebody import * # noqa: F401, F403
from .wholebody3d import * # noqa: F401, F403

0 comments on commit 676bbdb

Please sign in to comment.