Classification Classify Images of Clothing - ALI LAZIM
Classification Classify Images of Clothing - ALI LAZIM
Trains a neural network model to classify images of clothing, like sneakers and shirts.
Introduction
TensorFlow is a free and open-source software library for machine learning. It can
be used across a range of tasks but has a particular focus on training and inference
of deep neural networks
TensorFlow was developed by the Google Brain team for internal Google use. It was
released under the Apache License 2.0 in 2015
tf.keras models are optimized to make predictions on a batch, or collection, of examples at
once.
NumPy is an essential component in the burgeoning Python visualization landscape, which
includes Matplotlib, Seaborn, Plotly, Altair, Bokeh, Holoviz, Vispy, Napari, and PyVista, to
name a few. NumPy's accelerated processing of large arrays allows researchers to visualize
datasets far larger than native Python could handle.
Before the model is ready for training, it needs a few more settings. These are added during the model's
compile step:
Loss function —This measures how accurate the model is during training. You want to minimize this
function to "steer" the model in the right direction.
Optimizer —This is how the model is updated based on the data it sees and its loss function.
Metrics —Used to monitor the training and testing steps. The following example uses accuracy, the fraction of
the images that are correctly classified
Work Overview
Train the model
For 10 epochs – each epoch the accuracy increased in total accuracy has been up 10 %
Work Overview
Evaluate accuracy
Work Overview
Make predictions
Work Overview
A prediction is an array of 10 numbers. They represent the model's "confidence" that the image corresponds to
each of the 10 different articles of clothing. You can see which label has the highest confidence value:
Work Overview
Verify predictions
Work Overview
Let's plot several images
with their predictions.
Note that the model can
be wrong even when
very confident.
Work Overview
With the model trained, you can use it to make predictions about some images.
Let's look at the 0th image, predictions, and prediction array. Correct prediction labels are blue and
incorrect prediction labels are red. The number gives the percentage (out of 100) for the predicted
label.
Work Overview
use the trained model