← 开源
flyyufelix

cnn_finetune

Fine-tune CNN in Keras

TutorialsML/AI fundamentalsPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
941
Star
399
Fork
+0
本周
1
贡献者
创建于 2016-10-12 · 更新于 2026-09-16 · 今日第 12499 名
主要开发者
flyyufelix

flyyufelix/cnn_finetune 排名第 12,499,有 941 个星标。

同类别比较

flyyufelix/cnn_finetune 排名第 12,499,此处有 8 个同类条目;ml4a/ml4a.github.io 排名第 12,509。

同类别比较
名称排名指标
lansinuote/Huggingface_Toturials12,453
语言:
Jupyter Notebook
星标数:
948
分叉数:
247
简介:
bert-base-chinese example
tdpetrou/Machine-Learning-Books-With-Python12,475
语言:
Jupyter Notebook
星标数:
945
分叉数:
569
简介:
Chapter by Chapter notes, exercises and code for a variety of machine learning books using Python
jocicmarko/ultrasound-nerve-segmentation12,480
语言:
Python
星标数:
944
分叉数:
325
简介:
Deep Learning Tutorial for Kaggle Ultrasound Nerve Segmentation competition, using Keras
youssefHosni/Practical-Machine-Learning12,482
语言:
Jupyter Notebook
星标数:
944
分叉数:
202
简介:
Practical machine learning notebook & articles covers the machine learning end to end life cycle.
ml4a/ml4a.github.io12,509
语言:
HTML
星标数:
939
分叉数:
157
简介:
machine learning for artists
Machine-Learning-Tokyo/DL-workshop-series12,527
语言:
Jupyter Notebook
星标数:
936
分叉数:
251
简介:
Material used for Deep Learning related workshops for Machine Learning Tokyo (MLT)
ML-course/master12,535
语言:
Jupyter Notebook
星标数:
935
分叉数:
366
简介:
A machine learning course using Python, Jupyter Notebooks, and OpenML
keyvank/femtoGPT12,538
语言:
Rust
星标数:
935
分叉数:
69
简介:
Pure Rust implementation of a minimal Generative Pretrained Transformer
关键参数与规格
关键参数与规格
参数值
语言Python
类别Tutorials
子类别ML/AI fundamentals
星标数941
分叉数399
贡献者1
创建日期2016-10-12
更新日期2026-09-16
1 天星标数0
7 天星标数0
排名12,499
上次排名12,424
排名变化-75
7 天星标排名13,456
上次 7 天星标排名13,467
7 天星标排名变化11
总星标排名11,684
上次总星标排名11,666
总星标排名变化-18
README 摘录

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.

常见问题

记录了多少星标和分叉?

flyyufelix/cnn_finetune 有 941 个星标和 399 个分叉。

仓库排名是多少?

flyyufelix/cnn_finetune 排名第 12,499。

记录的语言和类别是什么?

flyyufelix/cnn_finetune 有 941 个星标,语言为 Python,类别为 Tutorials。

哪个仓库排名最接近?

flyyufelix/cnn_finetune 与 ml4a/ml4a.github.io 比较,后者排名第 12,509,有 939 个星标。

README

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

Network Theano Tensorflow
VGG-16 model (553 MB) -
VGG-19 model (575 MB) -
GoogLeNet (Inception-V1) model (54 MB) -
Inception-V3 model (95 MB) -
Inception-V4 model (172 MB) model (172 MB)
ResNet-50 model (103 MB) model (103 MB)
ResNet-101 model (179 MB) model (179 MB)
ResNet-152 model (243 MB) model (243 MB)
DenseNet-121 model (32 MB) model (32 MB)
DenseNet-169 model (56 MB) model (56 MB)
DenseNet-161 model (112 MB) model (112 MB)

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
排名相邻
同类项目