Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
VGGFace implementation with Keras Framework
| Date | Stars |
|---|---|
| 2026-07-24 | 953 |
| 2026-07-25 | 953 |
| 2026-07-28 | 953 |
| 2026-07-30 | 953 |
| 2026-08-06 | 953 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# keras-vggface [](https://travis-ci.org/rcmalli/keras-vggface) [](https://badge.fury.io/py/keras-vggface) [](https://pepy.tech/project/keras-vggface)
Oxford VGGFace Implementation using Keras Functional Framework v2+
- Models are converted from original caffe networks.
- It supports only Tensorflow backend.
- You can also load only feature extraction layers with VGGFace(include_top=False) initiation.
- When you use it for the first time , weights are downloaded and stored in ~/.keras/models/vggface folder.
- If you don't know where to start check the [blog posts](https://github.com/rcmalli/keras-vggface#projects--blog-posts) that are using this library.
~~~bash
# Most Recent One (Suggested)
pip install git+https://github.com/rcmalli/keras-vggface.git
# Release Version
pip install keras_vggface
~~~
### Library Versions
- Keras v2.2.4
- Tensorflow v1.14.0
- **Warning: Theano backend is not supported/tested for now.**
### Example Usage
#### Available Models
```python
from keras_vggface.vggface import VGGFace
# Based on VGG16 architecture -> old paper(2015)
vggface = VGGFace(model='vgg16') # or VGGFace() as default
# Based on RESNET50 architecture -> new paper(2017)
vggface = VGGFace(model='resnet50')
# Based on SENET50 architecture -> new paper(2017)
vggface = VGGFace(model='senet50')
```
#### Feature Extraction
- Convolution Features
```python
from keras.engine import Model
from keras.layers import Input
from keras_vggface.vggface import VGGFace
# Convolution Features
vgg_features = VGGFace(include_top=False, input_shape=(224, 224, 3), pooling='avg') # pooling: None, avg or max
# After this point you can use your model to predict.
# ...
```
- Specific Layer Features
```python
from keras.engine import Model
from keras.layers import Input
from keras_vggface.vggface import VGGFace
# Layer Features
layer_name = 'layer_name' # edit this line
vgg_model = VGGFace() # pooling: None, avg or max
out = vgg_model.get_layer(layer_name).output
vgg_model_new = Model(vgg_model.input, out)
# After this point you can use your model to predict.
# ...
```
#### Finetuning
- VGG16
```python
from keras.engine import Model
from keras.layers import Flatten, Dense, Input
from keras_vggface.vggface import VGGFace
#custom parameters
nb_class = 2
hidden_dim = 512
vgg_model = VGGFace(include_top=False, input_shape=(224, 224, 3))
last_layer = vgg_model.get_layer('pool5').output
x = Flatten(name='flatten')(last_layer)
x = Dense(hidden_dim, activation='relu', name='fc6')(x)
x = Dense(hidden_dim, activation='relu', name='fc7')(x)
out = Dense(nb_class, activation='softmax', name='fc8')(x)
custom_vgg_model = Model(vgg_model.input, out)
# Train your model as usual.
# ...
```
- RESNET50 or SENET50
```python
from keras.engine import Model
from keras.layers import Flatten, Dense, Input
from keras_vggface.vggface import VGGFace
#custom parameters
nb_class = 2
vgg_model = VGGFace(include_top=False, input_shape=(224, 224, 3))
last_layer = vgg_model.get_layer('avg_pool').output
x = Flatten(name='flatten')(last_layer)
out = Dense(nb_class, activation='softmax', name='classifier')(x)
custom_vgg_model = Model(vgg_model.input, out)
# Train your model as usual.
# ...
```
#### Prediction
- Use `utils.preprocess_input(x, version=1)` for VGG16
- Use `utils.preprocess_input(x, version=2)` for RESNET50 or SENET50
```python
import numpy as np
from keras.preprocessing import image
from keras_vggface.vggface import VGGFace
from keras_vggface import utils
# tensorflow
model = VGGFace() # default : VGG16 , you can usExcerpt of 5,592 characters
Read on GitHub76
Anshuman Suri · DatologyAI · United States
2
Sebastián Ramírez · FastAPI Cloud · Germany
1
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:11cd725be4ba21de, topic:tensorflow