This repository uses tensorflow to train on 4268 Non copyrighted images obtained after scraping duckduckgo searches to classify live using the camera into 6 different categories Sitting, Standing, Walking, Walking on Stairs and Control.
Issues? Email Me: 308rwe3oa@relay.firefox.com
Feel free to use the code, make sure you give us credits everytime you use the code.
Dataset divided into 6 categories of 150x150x3 ie the image of size 150x150 and a 3 channel(RGB). Category Control used to prevent Random images to be classified into any of the remaining 5 categories. Use of Augmentation to have more number of images to train the model. The dataset involved humans of various backgrounds, ages, skin tone, time of day.
**Please do give me credits everytime you use it.**
Using InceptionV3 transfer learning model, along with mixed7 layer, 1024 neuron Selu with activation, 0.1 Dropout, 512 neuron with Selu activation, 0.1 dropout and 6 Neuron with softmax Activation.
Use of RMSprop optimizer with learning rate 0.0001 and loss function as categorical crossentropy.
Block Diagram of the Project
Training Accuracy Training Loss
You can run this program on colab.research.google.com with a TPU or GPU for faster processing. THe code is attached here in .ipynb format, just copy the code to the colab website. Click runtime and change runtime type to GPU or TPU for faster processing
from google.colab import drive
drive.mount('/content/drive')
or you could do this and also specify the exact folder where you want it to take from:
- Runtime -> Change runtime type -> GPU or TPU
- Click on Files from the left toolbar
- Click Mount drive
- Copy the path of the dataset folder (and assign them to the train_dir and val_dir)
-
https://www.tensorflow.org/tutorials/keras/overfit_and_underfit
-
https://www.tensorflow.org/tutorials/keras/save_and_load
-
https://www.tensorflow.org/tutorials/images/classification (Super useful)
-
https://www.tensorflow.org/tutorials/images/transfer_learning
-
https://www.tensorflow.org/api_docs/python/tf/keras/losses
-
https://www.tensorflow.org/api_docs/python/tf/keras/layers