Arsey/keras-transfer-learning-for-oxford102
关于
Keras pretrained models (VGG16, InceptionV3, Resnet50, Resnet152) + Transfer Learning for predicting classes in the Oxford 102 flower dataset
学习与教育实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Keras pretrained models (VGG16, InceptionV3, Resnet50, Resnet152) + Transfer Learning for predicting classes in the Oxford 102 flower dataset (or any custom dataset)
This bootstraps the training of deep convolutional neural networks with Keras to classify images in the Oxford 102 category flower dataset.
Train process is fully automated and the best weights will be saved.
The code can be used for any dataset, just follow the original files structure in data/sorted directory after running bootstrap.py. If you want to store your dataset somewhere else, you can do it and run train.py with setting a path to dataset with a special parameter --data_dir==/full/path/to/your/sorted/data
Dataset directory's structure

Notice: for ResNet152 you should download weights manually here and put them under the project_directory/weights
Overview
bootstrap.py: downloads the Oxford 102 dataset and prepare image filestrain.py: starts end-to-end training processserver.py: a small python server based on sockets and designed to keep a model in memory for fast recognition requestsclient.py: a client that sends requests to server.py
Usage
Step 1: Bootstrap
python bootstrap.py
Step 2: Train
python train.py --model=resnet50
Step 3: Get predictions using predict.py or server.py + client.py
Using predict.py:
python predict.py --path "/full/path/to/image" --model=resnet50
Using server.py + client.py:
- run server and wait till model is loaded. Do not break server, it should be run and listen for incoming connections
python server.py --model=resnet50
- send requests using client
python client.py --path "/full/path/to/image"
探索相关项目
加载中…