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.
- Tensorflow-cpu 1.3 for Linux
- opencv-python-dev, numpy and some common 3rd party modules for python
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
- ReadData.py: Load gray images of shape [h,w,1] (types supported: jpg/jpeg/png)
- Augement.py: Contain image augement operators.
- SubNet.py: Main class of the SubNet model.
- Draw_ROC_iteration.py: A function for computing multi-iteration ROC results
- Modify ReadData.py to fit your dataset
- Modify the input shape to match your image dimension
- Warn that do not change the output prediction's shape
- Run 'train_gray.py' to start the training process.
- Mark GRAY_net.train() as comment, uncomment RGB_net.test_single_threshold() and rerun 'train_gray.py' to start the test process.
Feel free to share your doubts with me.