<?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 Frederic Branchaud Charron on Medium]]></title>
        <description><![CDATA[Stories by Frederic Branchaud Charron on Medium]]></description>
        <link>https://medium.com/@frederic.branchaud.charron?source=rss-21fe32aca74b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*dtInIpWdaAKWKBVk2AVtbA.jpeg</url>
            <title>Stories by Frederic Branchaud Charron on Medium</title>
            <link>https://medium.com/@frederic.branchaud.charron?source=rss-21fe32aca74b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 13:35:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@frederic.branchaud.charron/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[Road defect detection using deep active learning]]></title>
            <link>https://medium.com/pytorch/road-defect-detection-using-deep-active-learning-98d94fe854d?source=rss-21fe32aca74b------2</link>
            <guid isPermaLink="false">https://medium.com/p/98d94fe854d</guid>
            <category><![CDATA[semantic-segmentation]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[pytorch]]></category>
            <category><![CDATA[active-learning]]></category>
            <dc:creator><![CDATA[Frederic Branchaud Charron]]></dc:creator>
            <pubDate>Thu, 14 May 2020 21:04:41 GMT</pubDate>
            <atom:updated>2020-06-12T17:19:55.200Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kJSdnl_p0P00Zasq.png" /></figure><p>At <a href="https://www.elementai.com/">Element AI</a>, our teams use our active learning library <a href="https://github.com/ElementAI/baal/">BaaL</a> to quickly move from labelling to production models. If you would like to get a good introduction to active learning, we recommend that you read our initial release <a href="https://www.elementai.com/news/2019/element-ai-makes-its-bayesian-active-learning-library-open-source">blog post</a>. Recently, the ability to detect road surface defects was identified as an interesting use case for active learning. The end goal was to automatically determine if a segment of road needed to be resurfaced. More specifically, we needed a rough estimate of the defect area. For this reason, we treated this problem as a <strong>semantic segmentation problem</strong>.</p><h3>Data definition</h3><p>We were able to find a <a href="https://github.com/sekilab/RoadDamageDetector">public dataset</a>, but unfortunately, the labels provided were for bounding boxes only. Consequently, to generate the polygon labels required for semantic segmentation, we involved the Element AI data labelling team to help us define our task.</p><p>We identified three types of defects and another feature for detection:</p><ol><li>Cracks</li><li>Patches</li><li>Manholes</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YDhquvZYEyMBqJBmSwiIVw.png" /></figure><p><strong>Active learning model definition</strong></p><p>To perform active learning, we rely on MC-Dropout (Gal et al.) and BALD (Houlsby et al.) to estimate the uncertainty of each unlabelled sample.</p><p>Our model is a U-Net (Ronneberger et al.), to which we added a Dropout layer before the last convolution. This Dropout layer allows us to use MC-Dropout (more on that later). We trained our network using standard weighted cross-entropy. The weights are automatically detected by the proportion of pixels per class at each active learning step.</p><p><strong>Without Active Learning (traditional method)</strong></p><p>Linear process where labelling takes place before the model is trained.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QmWy4nq4qs6x8daWEejssw.png" /></figure><p><strong>With Active Learning (AI-enhanced method)</strong></p><p>AI model is always in the loop and learns throughout the labelling process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s8DH43mcNGCiolvjs16EcA.png" /></figure><h3>MC-Dropout and BALD</h3><p>Monte-Carlo Dropout-otherwise known as MC-Dropout is a technique proposed by Gal et al. in which they estimate the posterior distribution of the model using Dropout. It can be shown that Dropout acts practically like a Bayesian ensemble. By doing Monte-Carlo estimation of this prior distribution, we get a distribution of predictions that may have high variance if the model parameters are uncertain. This technique can only estimate the epistemic uncertainty.</p><p>Bayesian Active Learning by Disagreement (BALD) is a heuristic that can be used with MC-Dropout to quantify the uncertainty of a distribution. A nice property of BALD is that is doesn’t make a Gaussian assumption on the distribution like variance.</p><h3>Hyperparameters</h3><p>Something we need to remember when using active learning in a real-world project is that we need to recompute uncertainty as fast as possible. To do so, we need to limit the number of MC estimations because they slow down the process. In this case, we limited the number of MC samplings to 20. In our experiments, we saw that it created a good trade-off between speed and the quality of the uncertainties that were computed using our method.</p><h3>Labelling with active learning</h3><p>At Element AI, we have a team of labellers with whom the active learning team collaborates.</p><p>They work closely with the data scientist in charge of the project so that the data can be easily integrated into their machine learning pipeline. We believe that having a <strong>conversation</strong> with machine learning experts can help labellers produce high-impact labels and experts to better understand the data.</p><h3>Cold-start problem</h3><p>Active learning suffers from the cold-start problem, which means we can’t use it before many samples have been labelled. While some approaches such as coresets (Sener and Savarese) and few-shot learning (Snell et al.) have been proposed, we have not yet experimented with them. Consequently, we randomly label a small amount of data to create a test set and an initial training dataset. In our future work, we aim to integrate coresets as the first step of our active-learning pipeline.</p><h3>When to stop</h3><p>We monitored several metrics during labelling, including:</p><p>We explained the metrics to the labelling team and showed them what a converged process looked like.</p><p>This way, the labelling team can be autonomous and connect with the data science expert assigned to the project when the process converges or when the labelling budget is reached.</p><h3>Results</h3><p>After a few days of labelling, we decided to stop the labelling effort as the model converged. Here are our findings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zhNVNlSTPhsUY5nl4n-N6Q.png" /></figure><p><em>Left:</em> Precision and recall improved for cracks, patches and manhole covers as the number of labelled samples increased. <em>Right:</em> The model prioritized labelling the samples that would most maximize its performance, meaning the model trained in significantly less time and using fewer data points.</p><h3>Time saved</h3><p>There are 9,900 samples in this dataset; we labelled 900 for training as well as 90 for validation.</p><p>Based on a market study aggregating crowdsourced data with other data sources, the cost of labelling one image is estimated at 50 cents when requiring high-quality labelling.</p><p>Based on the public dataset used, we also estimate the time to label one image to be 30 seconds. In the end, because we only labelled 990 out of 9900 images, <strong>we saved $4,500 and 75 hours</strong>.</p><h3>Prediction</h3><p>Here are some predictions from the resulting models trained on less than 10% of the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Th7xxqV4lgnSMZfB4qDfZw.png" /></figure><p>We just released BaaL 1.2.0, which includes our new calibration module and more! See the changelist at <a href="https://github.com/elementai/baal/releases">https://github.com/elementai/baal/releases</a>.</p><h3>References</h3><ul><li><a href="https://arxiv.org/abs/1506.02142">MC-Dropout</a></li><li><a href="https://github.com/sekilab/RoadDamageDetector">Road Damage Dataset</a></li><li><a href="https://arxiv.org/abs/1505.04597">UNet</a></li><li><a href="https://arxiv.org/abs/1112.5745">BALD</a></li><li><a href="https://arxiv.org/abs/1703.02910">Deep bayesian active learning for images</a></li><li><a href="https://arxiv.org/abs/1708.00489">Coresets for active learning</a></li><li><a href="https://arxiv.org/abs/1703.05175">Few-Shot learning</a></li></ul><p><strong><em>Authors: Parmida Atighehchian, Frédéric Branchaud-Charron and Lorne Schell</em></strong></p><p><em>Originally published at </em><a href="https://www.elementai.com/news/2020/road-defect-detection-using-deep-active-learning"><em>https://www.elementai.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98d94fe854d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pytorch/road-defect-detection-using-deep-active-learning-98d94fe854d">Road defect detection using deep active learning</a> was originally published in <a href="https://medium.com/pytorch">PyTorch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Element AI makes its BAyesian Active Learning library open source]]></title>
            <link>https://medium.com/pytorch/element-ai-makes-its-bayesian-active-learning-library-open-source-a5ed43f053ac?source=rss-21fe32aca74b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5ed43f053ac</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[active-learning]]></category>
            <category><![CDATA[pytorch]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[bayesian-machine-learning]]></category>
            <dc:creator><![CDATA[Frederic Branchaud Charron]]></dc:creator>
            <pubDate>Wed, 15 Apr 2020 12:23:18 GMT</pubDate>
            <atom:updated>2020-04-15T12:23:18.399Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FegbZ2nr2BT4IkPF.jpg" /></figure><p>Element AI’s BAyesian Active Learning library (BaaL library) is now open source and <a href="https://github.com/ElementAI/baal/">available on GitHub</a>. In this article, we briefly describe active learning, its potential use with deep networks and the specific capabilities of our BaaL library.</p><h3>What is Active Learning?</h3><p>Machine learning applications generally require a huge amount of data, and in many cases, this data cannot be easily acquired. What’s more, even when data<em> is</em> readily available, it often is not possible to label it efficiently. Active learning aims at reducing the amount of labelled data needed to train machine learning models.</p><p>How it works is actually pretty simple: we allow the model to actively “query” examples to be labelled. This way, we’re able to label only the most effective samples for training the model, rather than labelling a random selection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*IRDmuOSBW_Q5iOreTn2kxA.png" /></figure><h3>Active Learning for Deep Learning</h3><p>Common active learning techniques such as Gaussian processes or kernel methods fall short when used on high-dimensional data. Recent advances in deep learning, however, propose training a deep neural network so that it is able to learn from a small amount of data and actively query the next sample on its own.</p><p>To select the next sample, the uncertainty of the model needs to be estimated. By identifying the data points about which the model is the least certain, we aim to label the points which are also the most useful for the model. Estimating uncertainty is a hard problem in deep learning. Most recent methods propose estimating the posterior distribution of the model, allowing for the selection of the most uncertain sample-which would have the highest predictive variance.</p><p>Using MCDropout (Gal et al. 2015) and BALD (Houlsby et al. 2011), we present our results on CIFAR100 using a VGG16. By using active learning, we get the same performance with half of the samples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*ZCouksOH7fr6JIE0v7i3xw.png" /><figcaption>Comparison between active learning and random selection on CIFAR100</figcaption></figure><p>Next, we present the t-SNE representation of a custom version of CIFAR10 where we only keep the classes “airplane”, “cat” and “truck”. This allows us to compare active learning versus standard random labelling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9WKZ9hkZsItIGbhpvwlj7A.gif" /><figcaption><strong>Difference in results using active learning (left) versus standard random labelling (right)</strong></figcaption></figure><p>We can clearly see that active learning selects samples where the decision is less certain, thus making it more efficient compared to random selection.</p><h3>BaaL at Element AI</h3><p>While active learning is itself an active area of research, we found that a lack of good libraries was slowing down both our own research and the use of active learning in enterprise software. For this reason, we at Element AI created an opinionated library that tries to solve both of these issues.</p><p>Today, we’re making that library free and open to the community. Our BaaL library proposes a unified API that is easy to use by AI practitioners and researchers alike. Check it out and let us know what you think!</p><p><strong><em>Authors: Parmida Atighehchian, Frédéric Branchaud-Charron, Jan Freyberg, and Lorne Schell</em></strong></p><h3>Sources</h3><ul><li><a href="https://papers.nips.cc/paper/1011-active-learning-with-statistical-models.pdf">Active Learning with Statistical Models</a> <a href="https://arxiv.org/pdf/1703.02910.pdf">Deep Bayesian Active Learning with Image Data</a> <a href="https://arxiv.org/abs/1506.02142">Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning (Gal et al. 2015)</a></li><li><a href="https://arxiv.org/abs/1901.02731">Bayesian layers (Shridhar et al. 2019)</a></li><li><a href="https://arxiv.org/abs/1902.10350">Deeper Connections between Neural Networks and Gaussian Processes Speed-up Active Learning (Panov et al. 2019)</a></li><li><a href="https://arxiv.org/abs/1902.02476">A Simple Baseline for Bayesian Uncertainty in Deep Learning (Zellers et al. 2018)</a></li><li><a href="https://arxiv.org/abs/1112.5745">Bayesian Active Learning for Classification and Preference …</a></li></ul><p><em>Originally published at </em><a href="https://www.elementai.com/news/2019/element-ai-makes-its-bayesian-active-learning-library-open-source"><em>https://www.elementai.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5ed43f053ac" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pytorch/element-ai-makes-its-bayesian-active-learning-library-open-source-a5ed43f053ac">Element AI makes its BAyesian Active Learning library open source</a> was originally published in <a href="https://medium.com/pytorch">PyTorch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>