Skip to content

Commit

Permalink
Add instructions for pip install.
Browse files Browse the repository at this point in the history
  • Loading branch information
timesler committed Jul 2, 2019
1 parent babf1d3 commit 8a5c258
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ Also included in this repo is an efficient pytorch implementation of MTCNN for f

## Quick start

1. Clone this repo, removing the '-' to allow python imports:
1. Either install using pip:
```bash
pip install facenet-pytorch
```
or clone this repo, removing the '-' to allow python imports:
```git
git clone https://github.com/timesler/facenet-pytorch.git facenet_pytorch
```
Expand Down Expand Up @@ -64,7 +68,7 @@ The following models have been ported to pytorch (with links to download pytorch
There is no need to manually download the pretrained state_dict's; they are downloaded automatically on model instantiation and cached for future use in the torch cache. To use an Inception Resnet (V1) model for facial recognition/identification in pytorch, use:

```python
from models.inception_resnet_v1 import InceptionResnetV1
from facenet_pytorch import InceptionResnetV1
# For a model pretrained on VGGFace2
model = InceptionResnetV1(pretrained='vggface2').eval()
Expand Down Expand Up @@ -97,6 +101,10 @@ To use pretrained MTCNN and Inception Resnet V1 models in your own git repo, I r

`git submodule add https://github.com/timesler/facenet-pytorch.git facenet_pytorch`

Alternatively, the code can be installed as a packed using pip:

`pip install facenet-pytorch`

Models can then be instantiated simply with the following:

```python
Expand Down

0 comments on commit 8a5c258

Please sign in to comment.