Skip to content

Commit

Permalink
Documentation and minor changes (MVIG-SJTU#713)
Browse files Browse the repository at this point in the history
* Install howto seems incomplete - still gives me an error though.

* Print that is friendly to more versions of Python.

* Update INSTALL.md

* Update INSTALL.md

* Update INSTALL.md

Co-authored-by: lb1programmer <luke@linuxpc>
Co-authored-by: Fred Fang <[email protected]>
  • Loading branch information
3 people authored Jan 21, 2021
1 parent bbdc444 commit 1fcd6fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
## Installation

### Requirements
* Nvidia device with CUDA, [example for Ubuntu 20.04](https://linuxconfig.org/how-to-install-cuda-on-ubuntu-20-04-focal-fossa-linux)
(if you have no nvidia device, delete [this line](https://github.com/MVIG-SJTU/AlphaPose/blob/master/setup.py#L211) from setup.py
* Python 3.5+
* Cython
* PyTorch 1.1+, for users with PyTorch 1.5 and 1.5+, please merge the pull request #592 by:
`git pull origin pull/592/head`
* torchvision 0.3.0+
* numpy
* Linux, [Windows user check here](#Windows)

### Code installation

#### (Recommended) Install with conda

Install conda from [here](https://repo.anaconda.com/miniconda/).
Install conda from [here](https://repo.anaconda.com/miniconda/), Miniconda3-latest-(OS)-(platform).
```shell
# 1. Create a conda virtual environment.
conda create -n alphapose python=3.6 -y
Expand All @@ -26,6 +29,7 @@ git clone https://github.com/MVIG-SJTU/AlphaPose.git
# git pull origin pull/592/head if you use PyTorch>=1.5
cd AlphaPose


# 4. install
export PATH=/usr/local/cuda/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH
Expand All @@ -45,6 +49,8 @@ python setup.py build develop
# 1. Install PyTorch
pip3 install torch==1.1.0 torchvision==0.3.0

# Check torch environment by: python3 -m torch.utils.collect_env

# 2. Get AlphaPose
git clone https://github.com/MVIG-SJTU/AlphaPose.git
# git pull origin pull/592/head if you use PyTorch>=1.5
Expand All @@ -55,7 +61,7 @@ export PATH=/usr/local/cuda/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH
pip install cython
sudo apt-get install libyaml-dev
python setup.py build develop --user
python3 setup.py build develop --user
```

#### Windows
Expand Down
2 changes: 1 addition & 1 deletion scripts/demo_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def loop():
# Load pose model
pose_model = builder.build_sppe(cfg.MODEL, preset_cfg=cfg.DATA_PRESET)

print(f'Loading pose model from {args.checkpoint}...')
print('Loading pose model from %s...' % (args.checkpoint,))
pose_model.load_state_dict(torch.load(args.checkpoint, map_location=args.device))
pose_dataset = builder.retrieve_dataset(cfg.DATASET.TRAIN)
if args.pose_track:
Expand Down

0 comments on commit 1fcd6fa

Please sign in to comment.