Fine-tune CNN in Keras.
flyyufelix/cnn_finetune is ranked 12,499 with 941 stars.
Same-category comparison
flyyufelix/cnn_finetune is ranked 12,499 among these 8 peers; ml4a/ml4a.github.io is ranked 12,509.
Same-category comparison| Name | Rank | Metrics |
|---|
| lansinuote/Huggingface_Toturials | 12,453 | - Language:
- Jupyter Notebook
- Stars:
- 948
- Forks:
- 247
- Description:
- bert-base-chinese example.
|
|---|
| tdpetrou/Machine-Learning-Books-With-Python | 12,475 | - Language:
- Jupyter Notebook
- Stars:
- 945
- Forks:
- 569
- Description:
- Chapter by Chapter notes, exercises and code for a variety of machine learning books using Python.
|
|---|
| jocicmarko/ultrasound-nerve-segmentation | 12,480 | - Language:
- Python
- Stars:
- 944
- Forks:
- 325
- Description:
- Deep Learning Tutorial for Kaggle Ultrasound Nerve Segmentation competition, using Keras.
|
|---|
| youssefHosni/Practical-Machine-Learning | 12,482 | - Language:
- Jupyter Notebook
- Stars:
- 944
- Forks:
- 202
- Description:
- Practical machine learning notebook & articles covers the machine learning end to end life cycle.
|
|---|
| ml4a/ml4a.github.io | 12,509 | - Language:
- HTML
- Stars:
- 939
- Forks:
- 157
- Description:
- machine learning for artists.
|
|---|
| Machine-Learning-Tokyo/DL-workshop-series | 12,527 | - Language:
- Jupyter Notebook
- Stars:
- 936
- Forks:
- 251
- Description:
- Material used for Deep Learning related workshops for Machine Learning Tokyo (MLT).
|
|---|
| ML-course/master | 12,535 | - Language:
- Jupyter Notebook
- Stars:
- 935
- Forks:
- 366
- Description:
- A machine learning course using Python, Jupyter Notebooks, and OpenML.
|
|---|
| keyvank/femtoGPT | 12,538 | - Language:
- Rust
- Stars:
- 935
- Forks:
- 69
- Description:
- Pure Rust implementation of a minimal Generative Pretrained Transformer.
|
|---|
Key parameters and specifications
Key parameters and specifications| Parameter | Value |
|---|
| Language | Python |
|---|
| Category | Tutorials |
|---|
| Subcategory | ML/AI fundamentals |
|---|
| Stars | 941 |
|---|
| Forks | 399 |
|---|
| Contributors | 1 |
|---|
| Created date | 2016-10-12 |
|---|
| Updated date | 2026-09-16 |
|---|
| Stars in 1 day | 0 |
|---|
| Stars in 7 days | 0 |
|---|
| Rank | 12,499 |
|---|
| Previous rank | 12,424 |
|---|
| Rank change | -75 |
|---|
| 7-day stars rank | 13,456 |
|---|
| Previous 7-day stars rank | 13,467 |
|---|
| 7-day stars rank change | 11 |
|---|
| Total stars rank | 11,684 |
|---|
| Previous total stars rank | 11,666 |
|---|
| Total stars rank change | -18 |
|---|
README summary
Fine-tune Convolutional Neural Network in Keras with ImageNet Pretrained Models The reason to create this repo is that there are not many online resources that provide sample codes for performing fine-tuning, and that there is not a centralized place where we can easily download ImageNet pretrained models for common ConvNet architectures such as VGG, Inception, ResNet, and DenseNet. This repo serves to fill this gap by providing working examples of fine-tuning on Cifar10 dataset with ImageNet pretrained
models on popular ConvNet implementations. See this for a comprehensive treatment of fine-tuning Deep Learning Models in Keras Usage For illustration purpose, let's say you want to perform fine-tuning with VGG-16. First, download the ImageNet pretrained weights for VGG-16 to the directory. The schema and sample code for fine-tuning on Cifar10 can be found in . Run the file: The code will automatically download Cifar10 dataset and performs fine-tuning with VGG-16. Please be aware
that it might take some time (up to minutes) for the model to compile and load the ImageNet weights. Finetune with your own dataset If you wish to perform fine-tuning on your own dataset, you have to replace the module which loads the Cifar10 dataset with your own load_data() module to load your own dataset.
Frequently asked questions
How many stars and forks are recorded?
flyyufelix/cnn_finetune has 941 stars and 399 forks.
What is the repository rank?
flyyufelix/cnn_finetune is ranked 12,499.
What language and category are recorded?
flyyufelix/cnn_finetune has 941 stars, uses Python and belongs to Tutorials.
Which repository is closest in rank?
flyyufelix/cnn_finetune is compared with ml4a/ml4a.github.io, ranked 12,509 with 939 stars.
Fine-tune Convolutional Neural Network in Keras with ImageNet Pretrained Models
The reason to create this repo is that there are not many online resources that provide sample codes for performing fine-tuning, and that there is not a centralized place where we can easily download ImageNet pretrained models for common ConvNet architectures such as VGG, Inception, ResNet, and DenseNet. This repo serves to fill this gap by providing working examples of fine-tuning on Cifar10 dataset with ImageNet pretrained models on popular ConvNet implementations.
See this for a comprehensive treatment of fine-tuning Deep Learning Models in Keras
Usage
For illustration purpose, let's say you want to perform fine-tuning with VGG-16. First, download the ImageNet pretrained weights for VGG-16 to the imagenet_models directory. The schema and sample code for fine-tuning on Cifar10 can be found in vgg16.py. Run the file:
python vgg16.py
The code will automatically download Cifar10 dataset and performs fine-tuning with VGG-16. Please be aware that it might take some time (up to minutes) for the model to compile and load the ImageNet weights.
Finetune with your own dataset
If you wish to perform fine-tuning on your own dataset, you have to replace the module which loads the Cifar10 dataset with your own load_data() module to load your own dataset.
X_train, Y_train, X_valid, Y_valid = load_data()
In particular, the following image preprocessing step have to be performed to get the format of the dataset compatible with the pretrained models:
# For Tensorflow
# Switch RGB to BGR order
x = x[:, :, :, ::-1]
# Subtract ImageNet mean pixel
x[:, :, :, 0] -= 103.939
x[:, :, :, 1] -= 116.779
x[:, :, :, 2] -= 123.68
# For Theano
# Switch RGB to BGR order
x = x[:, ::-1, :, :]
# Subtract ImageNet mean pixel
x[:, 0, :, :] -= 103.939
x[:, 1, :, :] -= 116.779
x[:, 2, :, :] -= 123.68
ImageNet Pretrained Models
Requirements
- Keras
1.2.2 2.0.5
- Theano 0.8.2 or TensorFlow
0.12.0 1.2.1
Updates
- Keras 2.0.5 and TensorFlow 1.2.1 are supported