Skip to content

Commit

Permalink
update readme and change path to which the pretrained model will be d…
Browse files Browse the repository at this point in the history
…ownloaded
  • Loading branch information
yusuke-a-uchida committed Feb 28, 2018
1 parent 709b215 commit 534f485
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,14 @@ Tested on:

## Usage

### Use pretrained model
Download pretrained model weights for TensorFlow backend:

```sh
mkdir -p pretrained_models
wget -P pretrained_models https://www.dropbox.com/s/rf8hgoev8uqjv3z/weights.18-4.06.hdf5
```

Run demo script (requires web cam)
### Use pretrained model for demo
Run demo the script (requires web cam)

```sh
python3 demo.py
```

Model weights for Theano backend is also available from [here](https://drive.google.com/file/d/0B_cG1nzvVZlQWGJMc2JjdzkwcVk/view?usp=sharing).
The pretrained model for TensorFlow backend will be automatically downloaded to the `pretrained_models` directory.

### Train a model using the IMDB-WIKI dataset

Expand Down
4 changes: 2 additions & 2 deletions demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def main():
weight_file = args.weight_file

if not weight_file:
#weight_file = os.path.join("pretrained_models", "weights.18-4.06.hdf5")
weight_file = get_file("weights.18-4.06.hdf5", pretrained_model, cache_subdir="models", file_hash=modhash)
weight_file = get_file("weights.18-4.06.hdf5", pretrained_model, cache_subdir="pretrained_models",
file_hash=modhash, cache_dir=os.path.dirname(os.path.abspath(__file__)))

# for face detection
detector = dlib.get_frontal_face_detector()
Expand Down

0 comments on commit 534f485

Please sign in to comment.