Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
yysijie committed Jan 21, 2020
1 parent 883a927 commit 9f2dc17
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
16 changes: 9 additions & 7 deletions doc/GETTING_STARTED.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
## Getting Started

**Create** a [conda](www.anaconda.com/distribution/) virtual environment and activate it:
### Installation

a. Create a [conda](www.anaconda.com/distribution/) virtual environment and activate it:

``` shell
conda create -n open-mmlab python=3.7 -y
conda activate open-mmlab
```

Install **PyTorch** and torchvision following the [official instructions](https://pytorch.org/), e.g.,
b. Install PyTorch and torchvision following the [official instructions](https://pytorch.org/), e.g.,
``` shell
conda install pytorch torchvision -c pytorch
```

**Clone** mmskeleton from github:
c. Clone mmskeleton from github:

``` shell
git clone https://github.com/open-mmlab/mmskeleton.git
cd mmskeleton
```

**Install** mmskeleton:
d. Install mmskeleton:

``` shell
python setup.py develop
```

[Option] **Install** mmdetection for person detection:
e. Install mmdetection for person detection [Option]:
``` shell
python setup.py develop --mmdet
```
Sometimes `mmdetection` can not be installed successfully. In that case, please install [mmdet](https://github.com/open-mmlab/mmdetection/blob/master/docs/INSTALL.md) manually.
In the event of a failure installation, please install [mmdetection](https://github.com/open-mmlab/mmdetection/blob/master/docs/INSTALL.md) manually.

To **verify** that mmskeleton and mmdetection installed correctly, use:
f. To verify that mmskeleton and mmdetection installed correctly, use:
```shell
python mmskl.py pose_demo [--gpus $GPUS]
# or "python mmskl.py pose_demo_HD [--gpus $GPUS]" for a higher accuracy
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import time

from setuptools import find_packages, setup, Extension, dist
from setuptools.command.install import install
dist.Distribution().fetch_build_eggs(['Cython', 'numpy>=1.11.1', 'torch'])

import numpy as np
Expand Down Expand Up @@ -144,6 +145,9 @@ def make_cuda_ext(name, module, sources, include_dirs=[]):
sys.argv.remove("--mmdet")
install_requires += ['mmdet']

import subprocess
subprocess.check_call([sys.executable, "-m", "pip", "install", 'https://github.com/open-mmlab/mmdetection/archive/v1.0rc1.zip', '-v'])

write_version_py()
setup(
name='mmskeleton',
Expand All @@ -170,7 +174,7 @@ def make_cuda_ext(name, module, sources, include_dirs=[]):
setup_requires=['pytest-runner'],
tests_require=['pytest'],
dependency_links=[
'https://github.com/open-mmlab/mmdetection/tarball/master/#egg=mmdet'
'https://github.com/open-mmlab/mmdetection/tarball/v1.0rc1/#egg=mmdet-v1.0rc1'
],
install_requires=install_requires,
ext_modules=[
Expand Down

0 comments on commit 9f2dc17

Please sign in to comment.