<?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 Santosh Kumar Jami on Medium]]></title>
        <description><![CDATA[Stories by Santosh Kumar Jami on Medium]]></description>
        <link>https://medium.com/@santoshkumar.j0403?source=rss-301cf5e057f4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*WEZmzNxgcwV2Bq2y.</url>
            <title>Stories by Santosh Kumar Jami on Medium</title>
            <link>https://medium.com/@santoshkumar.j0403?source=rss-301cf5e057f4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 12:16:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@santoshkumar.j0403/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[UNet — Explaining in Simple Terms]]></title>
            <link>https://medium.com/minds-of-machine-computer-vision/unet-explaining-in-simple-terms-4a407b1edea6?source=rss-301cf5e057f4------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a407b1edea6</guid>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[evaluation-metric]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[unet]]></category>
            <category><![CDATA[segmentation]]></category>
            <dc:creator><![CDATA[Santosh Kumar Jami]]></dc:creator>
            <pubDate>Mon, 07 Jul 2025 08:09:22 GMT</pubDate>
            <atom:updated>2025-07-07T08:23:24.126Z</atom:updated>
            <content:encoded><![CDATA[<h3>UNet — Explaining in Simple Terms</h3><p>Unet is one of the famous and most used segmentation alogorim in computer vision. Lets undertand this network in detail with code. I have referred most of this content from original paper published in <a href="https://arxiv.org/abs/1505.04597">Arxiv</a>.</p><p>U-Net architecture efficiently segments biomedical images using data augmentation and a unique contracting-expanding network design. U-Net consists of a contracting path for context extraction and an expansive path for precise localization.</p><p><strong><em>Main Considerations:</em></strong></p><ul><li>It employs repeated 3x3 convolutions and 2x2 max pooling for down-sampling, doubling feature channels at each step.</li><li>Pooling layers are replaced by up sampling in expansive path to increase the resolution of the output image.</li><li>High resolution features from contracting path are combined with up-sampled features to get better localization.</li><li>A successive convolution layer to assemble more precise output based on the information.</li><li>As we have large number of feature channels which allows the network to propagate the context information to higher resolution layers.</li><li>As a result, the expansive path will be more or less resembles the contraction path and provides a U-type architecture.</li><li>The network does not have any full connected layers and only uses a valid of part of the convolution, i.e. the segmentation map contains only the pixels, for which the full context is available in the input image.</li><li>This strategy allows the seamless segmentation of arbitrary large images by an over-lap tile strategy. To predict the pixels in the boarder of the image, the missing context is extrapolated by mirroring the input image. The tiling strategy is important to apply the network to large images, since otherwise the resolution would be limited by the GPU memory.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*JaMkzk3tjbFPf2H5Zf2Mig.jpeg" /><figcaption>Concept of Pixel mirroring Source [<a href="https://arxiv.org/abs/1505.04597">Unet</a>]</figcaption></figure><ul><li>Used excessing data augmentation by applying elastic deformations to the available training images. This allows the network to learn invariance to such deformations. This is important for biomedical image segmentation as these types of deformations are more common in this domain.</li><li>Another challenge is that separation of touching objects of same class. A weighted loss approach where separating background labels between touching cells obtain a large weight in the loss function solved this issue.</li></ul><p><strong><em>Network Architecture:</em></strong></p><p>Unet is a U-shaped network with first half as contracting path (encoder) that concentrates on context extraction and second half as expansive path (decoder) that concentrates on accurate pixel localization based on the classes.</p><p><strong>Contracting Path (Encoder):</strong></p><ul><li><strong>Purpose</strong>: A typical CNN network that captures context and extracts features from the input image.</li><li><strong>Structure</strong>:</li><li>Repeated application of two <strong>3x3 convolutions</strong> (unpadded), each followed by a <strong>ReLU activation</strong>. ​</li><li>A <strong>2x2 max pooling operation</strong> with stride 2 is used for down-sampling, reducing the spatial dimensions while doubling the number of feature channels at each step. ​</li><li><strong>Feature Channels</strong>: The number of feature channels increases progressively as the spatial resolution decreases.</li></ul><p><strong>Expansive Path (Decoder):</strong></p><ul><li><strong>Purpose</strong>: Enables precise localization by reconstructing the spatial dimensions of the input image. ​</li><li><strong>Structure</strong>:</li><li>Each step begins with <strong>up-sampling</strong> the feature map, followed by a <strong>2x2 up-convolution</strong> that halves the number of feature channels. ​</li><li>The up-sampled feature map is concatenated with the correspondingly cropped feature map from the contracting path (to preserve high-resolution features). ​</li><li>Two <strong>3x3 convolutions</strong> are applied, each followed by a <strong>ReLU activation</strong>. ​</li><li><strong>Cropping</strong>: Necessary due to the loss of border pixels in unpadded convolutions.</li><li><strong>Final Layer: </strong>A 1x1 convolution is used to map the 64-component feature vector at each pixel to the desired number of classes (e.g., foreground and background).</li></ul><p>In total there are 23 convolutional layers. It is important to select the input tile size such that all 2X2 max pooling operations can be applied to a layer with an even x and y size.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*14hKLaSkA9grIt084vQETA.jpeg" /><figcaption>UNet Architecture — Source [<a href="https://arxiv.org/abs/1505.04597">Unet</a>]</figcaption></figure><p><strong><em>Training Procedure</em></strong></p><ul><li>The input image and corresponding segmentation maps are used to train the network with stochastic gradient descent implementation using Caffe.</li><li>Due to the unpadded convolutions, the output image size is lesser than the input by constant boarder width.</li><li>To minimize the overhead, and maximize the GPU usage, they have used large input tiles rather than large batch size and hence reduced the batch size to a single image.</li><li>They have used large momentum size (0.99) such that a large number of previously seen training sample determine the update in the current optimization step.</li><li>The energy function is a weighted cross entropy loss function that pushes the model to separate touching instances. In other words, the loss function is augmented with weight maps that emphasize object boarders, especially between touching objects of the same class.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*6tx5UnpYI2neytmgdwoEXA.jpeg" /><figcaption>Unet Loss Function — Weighted Binary Cross Entropy</figcaption></figure><ul><li>The weight function is designed to give higher importance (weight) to pixels that are on boarders between touching objects of the same class.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5EzaQcY802wBfnI4erQIbA.jpeg" /><figcaption>Weight Map Formula</figcaption></figure><ul><li>- For the pixels lie between two close objects, both d1 and d2 are small and hence the weight will be high, and hence model pays more attention on these pixels.</li><li>- For pixels far from the boarders, d1 and d2 are large and then weight will be low.</li><li>- wc​(x) ensures that small objects are not ignored due to dominance of background.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n_-nwCbO0_Nu3II6eebwwQ.jpeg" /><figcaption>Weight-map example: a) original image b) segmentation mask c) segmentation d) weight map example — Source [<a href="https://arxiv.org/abs/1505.04597">Unet</a>]</figcaption></figure><ul><li>· For a network with most of ReLU activations, to avoid the gradient vanishing or gradient exploding we generally use He Weight normalization, in which we draw initial weights from a Gaussian distribution with standard deviation of square-root(2/N), where N is number of incoming nodes of one neuron (fan-in).</li></ul><p><strong><em>Data Augmentation</em></strong></p><ul><li>For biomedical applications we need to consider shift and rotation variance, deformations (Especially random elastic deformations) and gray value variations.</li><li>generated smooth deformations using random displacement vectors on a coarse 3 by 3 grid.</li><li>The displacements are sampled from a Gaussian distribution with 10 pixels standard deviation.</li><li>Per-pixel displacements are then computed using bicubic interpolation.</li><li>Drop-out layers at the end of the contracting path perform further implicit data augmentation.</li></ul><p>Code Explanantion:</p><p>We have used the code that has been provided by <a href="https://github.com/milesial/Pytorch-UNet/">source</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a407b1edea6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/minds-of-machine-computer-vision/unet-explaining-in-simple-terms-4a407b1edea6">UNet — Explaining in Simple Terms</a> was originally published in <a href="https://medium.com/minds-of-machine-computer-vision">Minds of Machine — Computer Vision</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hypothesis Testing]]></title>
            <link>https://medium.com/@santoshkumar.j0403/hypothesis-testing-6701d2c03f69?source=rss-301cf5e057f4------2</link>
            <guid isPermaLink="false">https://medium.com/p/6701d2c03f69</guid>
            <category><![CDATA[significance-level]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[hypothesis-testing]]></category>
            <category><![CDATA[confidence-interval]]></category>
            <category><![CDATA[central-limit-theorem]]></category>
            <dc:creator><![CDATA[Santosh Kumar Jami]]></dc:creator>
            <pubDate>Tue, 05 Nov 2024 08:09:51 GMT</pubDate>
            <atom:updated>2024-11-09T02:24:46.861Z</atom:updated>
            <content:encoded><![CDATA[<p>We often encounter the concept of hypothesis testing while studying Data Science, yet it can still be confusing. Let’s clarify what hypothesis testing is and how it works.</p><p><strong>What is hypothesis testing?</strong></p><p>Hypothesis testing is a statistical approach used to make inferences or decisions about a population based on sample data. Conducting analysis directly on the entire population data can be challenging — if not impossible — so we use sample data instead to draw conclusions. This reverse approach allows us to infer information about the larger population without having to collect all of its data.</p><p>Before diving deeper into hypothesis testing, it’s essential to understand the <strong>Central Limit Theorem (CLT)</strong>. According to the CLT, the distribution of sample means (calculated from multiple random samples drawn from a population) tends to follow a Gaussian (normal) distribution, regardless of the original population’s distribution. In other words, if we repeatedly take random samples from a population, calculate the mean of each sample, and then plot these sample means, we will observe a bell-shaped curve — a normal distribution.</p><p>If the population itself follows a Gaussian distribution, the distribution of sample means will also be a proper Gaussian distribution. However, even if the population follows a different distribution, the distribution of sample means will still approximate a Gaussian distribution, given a large enough sample size.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/0*WNRU_iC7K0atMyd1" /><figcaption>Central Limit Theorem (<a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FCentral_limit_theorem&amp;psig=AOvVaw0WeWnwyLwmTcC2KyNKx1ZV&amp;ust=1730874311011000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBcQjhxqFwoTCLD-p7_HxIkDFQAAAAAdAAAAABAE">Wikipidia</a>)</figcaption></figure><p>If the sample statistic falls at the extreme ends of this Gaussian distribution, we can assume that the sample may contain some rare values from the population. Our goal is to determine whether our sample statistic falls at the edges or in the center of the distribution. To make this decision, we use the following key factors:</p><ul><li><strong>Confidence Interval</strong>: This is the range of values calculated from the sample data that is likely to contain the true population parameter with a certain level of confidence. Commonly used confidence levels are 95% and 99%.</li><li><strong>Significance Level</strong>: This is the probability of rejecting the null hypothesis when it is actually true, also known as a Type I error. Typical significance levels are 0.05 (5%) or 0.01 (1%).</li><li><strong>P-Value</strong>: This is the probability of observing a sample statistic as extreme as, or more extreme than, the one observed, assuming the null hypothesis is true. The p-value supports the null hypothesis. If the p-value is less than the significance level, there is not enough evidence to support the null hypothesis, so we reject it. Conversely, if the p-value is greater than the significance level, we fail to reject the null hypothesis.</li></ul><p>We determine the p-value using statistical tests like the z-test and t-test, depending on sample size and assumptions about the population distribution.</p><p>Let’s understand how this works in detail. Suppose our significance level is 0.05, and we obtain a p-value of 0.03, which is less than the significance level. This lower p-value indicates that the probability of our statistic falling in the extreme region is low, meaning it likely falls within the normal range. Since the p-value supports the null hypothesis, it should ideally be high if we want to avoid rejecting the null hypothesis. In this case, however, the p-value is low, so we reject the null hypothesis.</p><p>On the other hand, if the p-value is greater than the significance level, then the probability of the statistic falling in the extreme region is high, which supports the null hypothesis, and we fail to reject it.</p><p><strong>Note</strong>: The null hypothesis (H0) assumes there is no effect or no relationship between the sample data and the population.</p><p>In summary, hypothesis testing follows a reverse approach where we start with a “negative” assumption (the null hypothesis) and use the sample data decide whether to reject or accept it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6701d2c03f69" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>