Skip to content

A complete project for image classifier with an interface provided for ROC test.

License

Notifications You must be signed in to change notification settings

wonderseen/SubNet-One-Shot-Learning-for-Image-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SubNet: One-Shot-Learning-for-Image-Classification

This is a complete project using my SubNet which is a tiny model designed for image classification. Besides, an interface is provided for ROC test.
In my testset, after training for 600 iteration, I achieve an mean-accuracy of 98.21% and the AUC approximately equals to 1.

Environment Configuration

  1. Tensorflow-cpu 1.3 for Linux
  2. opencv-python-dev, numpy and some common 3rd party modules for python

Project Structure

SubNet
|
|--SubNet.py: the definition of SubNet and important operations
|--train_gray.py: script for training and testing
|
|__dataset: dictionary of your image dataset
|__model: dictionary to place the saved-model
|__tools:
  |--Augement.py
  |--Draw_ROC_iteration.py
  |--ReadData.py

Scripts Description

  1. ReadData.py: Load gray images of shape [h,w,1] (types supported: jpg/jpeg/png)
  2. Augement.py: Contain image augement operators.
  3. SubNet.py: Main class of the SubNet model.
  4. Draw_ROC_iteration.py: A function for computing multi-iteration ROC results

Classify Your Dataset

  1. Modify ReadData.py to fit your dataset
  2. Modify the input shape to match your image dimension
  3. Warn that do not change the output prediction's shape
  4. Run 'train_gray.py' to start the training process.
  5. Mark GRAY_net.train() as comment, uncomment RGB_net.test_single_threshold() and rerun 'train_gray.py' to start the test process.

Contact

Feel free to share your doubts with me.

About

A complete project for image classifier with an interface provided for ROC test.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages