Happiness
unpack
Published in
2 min readMar 8, 2021

--

Just like Joe will tell Adams “meet my friend John”. Adam will recognize John by taking one or more looks at him, this, way he can describe John anytime and even fish him out from the crowd. That is machine learning for you, it does image classification. My mouth was wide open when I realized I can classify or identify an image by just training my computer. Image classification is used for identifying objects or non-numeric data types.

During image classification vision models containing functions and classes are imported to enable the creation of different types of images. Then datasets containing desired images (like John and Adams) are downloaded. The next thing is to define the image you wish to classify (is it John or Adam?) and specify structural descriptions. Do not worry this is simply done using a data loader. Next, the loaded data is transformed to standard or desired size, where increased size is at the expense of speed and memory usage. At this stage, the raw data has been loaded and its features have also been specified.

The next phase is image recognition. Here a particular neural network is applied while specifying the data type to train, the type of model you want to create, and the model prediction quality. This step is followed by fine-tuning or fitting the model generated by the network. (fine-tuning is just like taking a close look at your bedroom and memorizing the color, settings, distance from the bed to the wardrobe, the height of the door, how all your household items are arranged and interrelated in case you go blind). This way our model has learned to recognize the image it was given.

Now, if you are inquisitive like me, you will really want to know what happens during image classification. You just got lucky I found out today. In image classification, multiple layers of a neural network are trained by employing algorithms. Each layer takes its input data from the previous layer and refines it. The steps are as follows: The layers refine or reconstruct the images in terms of weights and similar weights are matched together. The weighted images can be called building blocks. Subsequently, each layer contains a set of similar weights. Next, the network looks for feature detectors like corners, repeating lines, circles, and other simple patterns, and matches them together to form the next layer. What fine-tuning does is that we adapt our model to focus on what the layers focused on (John, Adams, Peter, Paul) to specialize on fishing out or identifying John.

This is my journey so far with UnpackAi and fast.ai.

--

--