Skip to content
프로젝트

Arsey/keras-transfer-learning-for-oxford102

GitHub에서 보기

소개

Keras pretrained models (VGG16, InceptionV3, Resnet50, Resnet152) + Transfer Learning for predicting classes in the Oxford 102 flower dataset

학습 및 교육

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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

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 files
  • train.py: starts end-to-end training process
  • server.py: a small python server based on sockets and designed to keep a model in memory for fast recognition requests
  • client.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:

  1. 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
  1. send requests using client
python client.py --path "/full/path/to/image"

관련 프로젝트 살펴보기

불러오는 중…