<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pranshusharma on Medium]]></title>
        <description><![CDATA[Stories by Pranshusharma on Medium]]></description>
        <link>https://medium.com/@pranshusharma5136?source=rss-f162a6732c3f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*n6coEpjWkxWCgqzX</url>
            <title>Stories by Pranshusharma on Medium</title>
            <link>https://medium.com/@pranshusharma5136?source=rss-f162a6732c3f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 09:02:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pranshusharma5136/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What Is Image Classification? A Beginner’s Guide to How AI Understands Images]]></title>
            <link>https://medium.com/@pranshusharma5136/what-is-image-classification-a-beginners-guide-to-how-ai-understands-images-f20c03e4cd29?source=rss-f162a6732c3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f20c03e4cd29</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Pranshusharma]]></dc:creator>
            <pubDate>Thu, 24 Sep 2026 10:42:18 GMT</pubDate>
            <atom:updated>2026-09-24T10:42:18.258Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>What Is Image Classification?</strong></h3><p>Image classification is the process of taking an image as input and assigning it to one or more predefined categories. It enables a model to automatically recognize patterns such as shapes, textures, and objects to categorize images into learned classes.</p><p><em>(Definition adapted from GeeksforGeeks.)</em></p><p>In simple terms, image classification is the process of taking an image as input and assigning it to one or more predefined categories.</p><p>The important thing to understand is that the model isn’t simply “looking” at the image like a human does — it is processing numerical representations of the image and learning patterns from examples.</p><p>For example, in my project <strong>AgriRakshak</strong>, I used image classification to identify crop diseases from leaf images. But crop disease detection is only one application of image classification — the same fundamental idea is used across computer vision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1FBW4XsReUqiDjo7jg1f9A.png" /><figcaption><strong>Image classification workflow: Image → Model → Class.</strong></figcaption></figure><h3><strong>How Does a Computer See an Image?</strong></h3><p>When we look at an image, we can easily understand what is in it — a leaf, a person, a car, a dog. But a computer doesn’t see an image like we do. For a computer, an image is a collection of tiny pixels represented by numbers.</p><p>An image goes through this process:</p><p><strong>Image → Pixels → RGB values → Numbers</strong></p><p>Each pixel contains color information, typically represented using Red, Green, and Blue (RGB) values. For example, one pixel might be represented as:</p><p>(124, 180, 72)</p><p>These numbers tell the computer how much red, green, and blue are present in that pixel. When millions of these pixels are combined, they form the complete image. Machine learning models use these numerical patterns to learn things like <strong>shapes, textures, and other visual features</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6_C33BS0todvO0BE5Vsj_Q.png" /><figcaption>How a computer represents an image as numerical data.</figcaption></figure><h3><strong>How Does AI Learn From Images?</strong></h3><p>We know a computer represents an image as numbers — but how does AI use those numbers to understand what an image contains?</p><p>The answer is <strong>training</strong>.</p><p>AI learns from images by looking at many examples and finding patterns in them. During training, the model is given images along with their correct labels. For example, to build a model that identifies crop diseases, we might give it thousands of images labeled <em>Healthy</em>, <em>Rust</em>, <em>Leaf Spot</em>, and so on.</p><p>The model doesn’t memorize every image. Instead, it gradually learns visual patterns that help distinguish one class from another, including:</p><ul><li><strong>Edges</strong> — boundaries and outlines of objects</li><li><strong>Shapes</strong> — the structure of objects</li><li><strong>Colors</strong> — differences in color and intensity</li><li><strong>Textures</strong> — repeated or surface-level patterns</li><li><strong>More complex features</strong> — combinations of the patterns learned earlier</li></ul><p>The basic process looks like this:</p><p><em>Images + Labels → Training → Learned Patterns → Trained Model</em></p><p>Once training is complete, the model can classify a new image it hasn’t seen before:</p><p><em>New Leaf Image → Trained Model → “Leaf Spot”</em></p><p>The model analyzes the numerical patterns in the new image and uses what it learned during training to predict the most likely class.</p><h3>What Is a CNN?</h3><p><strong>Convolutional Neural Network (CNN)</strong> is a type of deep learning model specially designed to work with images.</p><p>Instead of looking at the entire image at once, a CNN looks for <strong>small visual patterns</strong> and gradually combines them to understand the bigger picture.</p><p>For example, when analyzing a leaf, a CNN may learn patterns such as:</p><p><strong>Edges → Shapes → Textures → Complex Features → Class</strong></p><p>A CNN is made up of several layers that process the image step by step. The <strong>convolutional layers</strong> are particularly important because they help the model detect useful features such as edges, textures, and shapes.</p><p>For example, in a crop disease detection system, a CNN could learn that certain <strong>spots, color changes, or textures</strong> are associated with a particular disease.</p><p>In simple terms:</p><p><strong><em>A CNN learns visual features from images and uses those features to recognize and classify what is in the image.</em></strong></p><p>This is why CNNs have been widely used for tasks such as <strong>image classification, object detection, facial recognition, and medical image analysis</strong>.</p><h3><strong>What Is EfficientNet?</strong></h3><p>A basic CNN built from scratch needs a lot of data and training time to learn good visual features. Since I didn’t have millions of images, I used EfficientNetB0 — a model that already knows general visual features and just needed fine-tuning for crop diseases. This saved both time and data.</p><p>While building AgriRakshak, I used <strong>EfficientNetB0</strong> for image classification.</p><p>EfficientNet is a family of deep learning models designed to achieve strong image-recognition performance while staying computationally efficient. It learns useful visual features — edges, shapes, textures, and patterns — from images.</p><p>Instead of training a model completely from scratch, I used a <strong>pre-trained model</strong>. A pre-trained model has already learned general visual features from a large dataset, so it can be adapted to a new task with less training.</p><h4>What does “B0” mean?</h4><p>B0 is the base version of the EfficientNet family — smaller and computationally efficient, making it a practical choice for many image-classification applications.</p><h4>Fine-Tuning</h4><p>For AgriRakshak, the pre-trained EfficientNetB0 was fine-tuned using crop disease images. The model reused the visual knowledge it had already learned and adapted it to recognize different crop disease classes.</p><p><em>Pre-trained EfficientNetB0 → Fine-tuning → Crop Disease Classifier</em></p><p>Here’s a simplified version of how that fine-tuning looks in code:</p><pre>from tensorflow.keras.applications import EfficientNetB0<br>from tensorflow.keras.layers import Dense, GlobalAveragePooling2D<br>from tensorflow.keras.models import Model<br><br>base_model = EfficientNetB0(weights=&#39;imagenet&#39;, include_top=False)<br>x = GlobalAveragePooling2D()(base_model.output)<br>output = Dense(num_classes, activation=&#39;softmax&#39;)(x)<br><br>model = Model(inputs=base_model.input, outputs=output)<br>model.compile(optimizer=&#39;adam&#39;, loss=&#39;categorical_crossentropy&#39;, metrics=[&#39;accuracy&#39;])<br>model.fit(train_data, validation_data=val_data, epochs=20)</pre><p>This approach made it possible to build an image-classification model without starting from scratch.</p><p><em>[Images: EfficientNetB0 training/validation accuracy over epochs; validation loss over epochs; training vs. validation accuracy comparison]</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rnelzNFoPlEsUhS2SfQIlw.png" /><figcaption>Training and validation accuracy improve steadily across epochs, showing the model is learning effectively.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VLrHiYWMODXq9tFVV12Mfg.png" /><figcaption>Validation loss decreases and plateaus, suggesting the model converged without major overfitting.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*UkilisNvhS9ao72braPf0A.png" /><figcaption>Training and validation accuracy stay close together, indicating good generalization rather than memorization.</figcaption></figure><h3>What Are the Limitations of Image Classification?</h3><p>Image classification is powerful, but not perfect. Its performance depends on the data it learns from and the quality of the images it receives.</p><ul><li><strong>Poor-quality images</strong> — blurry, dark, or low-resolution images can lead to wrong predictions</li><li><strong>Training data</strong> — limited or non-diverse data can cause the model to struggle with new situations</li><li><strong>Class imbalance</strong> — if some classes have far more images than others, the model may perform better on those classes</li><li><strong>Overfitting</strong> — the model may learn training images too closely and perform poorly on new ones</li><li><strong>Unseen classes</strong> — if the model sees something it was never trained on, it may still incorrectly pick one of its known classes</li><li><strong>Domain shift</strong> — a model trained in one environment (e.g., clear lab images) may perform differently in another (e.g., real-world photos)</li><li><strong>False predictions</strong> — even a well-trained model can sometimes make mistakes</li><li><strong>Confidence ≠ correctness</strong> — a model can be highly confident about a prediction and still be wrong</li></ul><p>A good computer-vision system needs more than high accuracy — it needs to work reliably on real-world, unseen data.</p><h3>What’s Next?</h3><p>If you want to try this yourself, start with a small labeled image dataset and fine-tune a pre-trained model like EfficientNetB0. To tackle class imbalance (mentioned above), look into <strong>data augmentation</strong> — techniques like rotation, flipping, and brightness adjustment that help the model generalize better with limited data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f20c03e4cd29" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>