Skip to content

Construct Alexnet with tensorflow and test with flowerimage

Notifications You must be signed in to change notification settings

Sangkwun/Alexnet

Repository files navigation

Alexnet with Tensorflow.

This project is based on Alexnet.
Tensorflow is used to build alexnet network and used Pillow and numpy to load and convert dataset.

https://www.nvidia.cn/content/tesla/pdf/machine-learning/imagenet-classification-with-deep-convolutional-nn.pdf

Requirements

This project used pipenv so you can check pipfile in repository.
you can just install all requirements with pipenv install.

  • numpy: 1.14.5
  • pandas: 0.23.1
  • pillow: 5.1.0
  • tensorflow: 1.8.0

Dataset

For training alexnet flower dataset used. There are 4242 images about 5 classes of flowers.
It's divided in directory of flower names so easy to handle it.

Training

You can train model with train.py. Before execute train you have to prepare dataset. So download it into resources then unzip it. training_dataset.csv and valid_dataset, etc are splitted dataset with ratio. train.py train model with above csv file.

  • you can change dropout rate and when model is creating.
  • tensorboard log will be saved in logdir
  • weights will be saved in weights

alt text

alt text

Inference

It doesn't have command yet. so modify image_path in inference.py then execute it.

  • first output: [[ -9.98178387 -14.03773689 8.21770668 -0.54801857 -3.23122072]]
  • index of class: 2
  • The class of image is rose

About

Construct Alexnet with tensorflow and test with flowerimage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages