This repository aims to implement a alexnet with tensorflow . it gives a pretrain weight (bvlc_alexnet.npy), you can download from here.the train file contains 25000 images (cat and dog). We built this AlexNet in Windows , it's very convenient for most of you to train the net.
- Python 3.5
- TensorFlow 1.0
- Numpy
- cat and dog images here
-
image_generator: it can generate imageurl from your image file.
example:
/path/to/train/image1.png 0
/path/to/train/image2.png 1
/path/to/train/image3.png 2
/path/to/train/image4.png 0
- The alexnet.py and datagenerator.py files have been builded, you don't have to modify it. But if you have more concise or effective codes, please do share them with us.
- finetune.py is aimed to tune the weights and bias in the full connected layer, you must define some varibles,functions,and class numbers according to your own classification projects.
We choosed ten pictures from the internet to validate the AlexNet, there were three being misidentified, the accuracy is about 70%, which is similar to the accuracy we tested before. But, On the whole, the AlexNet is not as good as we expected, the reason may have something to do with the datesets. If you have more than One hundred thousand dataset, the accuracy must be better than we trained. See the results below: