top of page

TensorFlow Computer Vision Guided Project - 10 animal prediction 22 min level 5

Updated: Aug 21, 2023


free, Instruct, instructional, instructional education, free python learn,  Tensorflow guided project tensorflow project computer vision project deep learning project
Test Confusion Matrix TensorFlow Computer Vision Project Predictions

Zipped TensorFlow Sequential Animal Prediction Model


10AnimalPredictionep 19-val_acc 0.82
.zip
Download ZIP • 6.96MB


Zipped Folder of Zipped Train and Zipped test Images used in Video

10animals
.zip
Download ZIP • 613.03MB


Expanding our convolution network in this multi-class classification guided project with the Sequential model In TensorFlow with Python. Although you can get more complex with the Sequential model, training a model of this complexity takes a long long time, as in 4 hours with a GPU and those unfortunately those aren't free. Without a GPU it took me roughly 2 weeks of almost constant training for this model to be ready.


This project shows how to use two Convolutional layers in TensorFlow's Sequential model. Convolutional layers in our context are of the common architecture of 2 - 2D Convolutional Layers followed by a 2D Max Pooling layer and then the import Dropout Layer to help with regularization and prevent overfitting. The layers come from the keras sub library inside TensorFlow.


Although we use 2 Convolutional Layers with 4 sub-layers here a common pattern is to have 3 or 4 convolutional layers. Often the 4th layer is only made up of one convolutional.



The Series of convolutional layers is usually followed by a Dense layer but in this project, we wanted to test putting a recurrent layer and chose to use the LSTM recurrent layers in TensorFlow. However to do so we but first have the data pass thrount a Reshape layers simply to add the depth dimension or a , 1 as the z dimension.


A special theme of this problem is planning out how to train a model of this complex without a GPU. There are lots of people who don't have access to a GPU to train their neural networks but that shouldn't stop them from practicing and experimenting with more complex models.


If we're training a model for 10's of hours or days our workbook will often time out and we will loose our model in the middle of training. This could be frustrating but a simple solution is that we save our model on every epoch's end. And then when we eventually run into an area, remember this took 2 weeks training on a CPU, I was able to load up the last epoch


Here we will use ModelCheckpoint callback in TensorFlow to save our model at the end of each epoch or only if it evaluates to a higher accuracy or validation accuracy. In our situation of not using a GPU, it's best to save the model at the end of each epoch because although the score might not be higher the model is learning and the worse score is part of the learning process while layers deeper in our network learner and the latter layers need to adapt to this.












Follow Data Science Teacher Brandyn





dataGroups:










project guided tensorflow free, project computer vision project python free, data generator
TensorFlow Data Generator


project guided tensorflow free, project computer vision project python free, augmented images, image augment generator
Augmented Images with TesnorFlow Image Data Generator


project guided tensorflow free, project computer vision project python free, architecture project deep learning
Computer Vision Deep Learning Architecture


project guided tensorflow free, project computer vision project python free, computer vision save model
Model Checkpoint Save Model

project guided tensorflow free, project computer vision project python free
Fit Deep Learning Model

project guided tensorflow free, project computer vision project python free,  confusion matrix project
Train Confusion Matrix Computer Vision Classification Project



project guided tensorflow free, project computer vision project python free, confusion matrix guided project
Text Computer Vision Confusion Matrix







191 views0 comments
bottom of page