Skip to content

Commit

Permalink
mmdet dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
yysijie committed Sep 23, 2019
1 parent 502a255 commit 652ff88
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 1 addition & 2 deletions configs/pose_estimation/hrnet/demo.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
processor_cfg:
name: ".processor.image2skeleton.inference"
gpus: 1
worker_per_gpu: 1
dataset_cfg:
video_file: resource/media/skateboarding.mp4
Expand Down Expand Up @@ -28,8 +29,6 @@ processor_cfg:
save_video: true
save_dir: "work_dir/pose_estimation_demo"

gpus: 8

argparse_cfg:
gpus:
bind_to: processor_cfg.gpus
Expand Down
6 changes: 5 additions & 1 deletion mmskeleton/processor/image2skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def inference(
p.start()
procs.append(p)
all_result = []
print('\nPose estimation start:')
prog_bar = ProgressBar(num_frames)
for i in range(num_frames):
t = result_queue.get()
Expand All @@ -142,6 +143,9 @@ def inference(
for p in procs:
p.join()
if len(all_result) == num_frames and data_cfg.save_video:
print('\n\nGenerate video:')
video_path = os.path.join(data_cfg.save_dir, video_name)
mmcv.frames2video(data_cfg.img_dir,
os.path.join(data_cfg.save_dir, video_name),
video_path,
filename_tmpl='{:01d}.png')
print('Video was saved to {}'.format(video_path))
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
torch
mmcv
mmdet @ https://github.com/open-mmlab/mmdetection/archive/master.zip
mmdet>=1.0rc0
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,8 @@ def get_requirements(filename='requirements.txt'):
license='Apache License 2.0',
setup_requires=['pytest-runner'],
tests_require=['pytest'],
dependency_links=[
'git+https://github.com/open-mmlab/mmdetection#egg=mmdet'
],
install_requires=get_requirements(),
zip_safe=False)

0 comments on commit 652ff88

Please sign in to comment.