Frédéric Branchaud-Charron
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Road defect detection using deep active learning At [Element AI](https://www.elementai.com/), our teams use our active learning library [Baal](github.com/ElementAI/baal) 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 [blog post](https://www.elementai.com/news/2019/element-ai-makes-its-bayesian-active-learning-library-open-source). 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 **semantic segmentation problem**. ## Data definition We were able to find a [public dataset](https://github.com/sekilab/RoadDamageDetector), 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. We identified three types of defects and another feature for detection: 1. Cracks 2. Potholes 3. Patches 4. Manholes | Cracks | Potholes | Patches | Manholes | | -------- | -------- | -------- | -------- | | Img | Img | Img | Img | ## Active learning model definition 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. 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. ## MC-Dropout and BALD 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. 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. ## Hyperparameters 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. ## Labelling with active learning At Element AI, we have a team of labellers with whom the active learning team collaborates. 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 **conversation** with machine learning experts can help labellers produce high-impact labels and experts to better understand the data. ### Cold-start problem Active learning suffers from the cold-start problem, which means we can't use it before many samples have been labelled. While some approches 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. ### When to stop We monitored several metrics during labelling, including: * Precision * Recall * Validation Loss * Accuracy We explained the metrics to the labelling team and showed them what a converged process looked like. 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. ## Results After a few days of labelling, we decided to stop the labelling effort as the model converged. Here are our findings. ### Time saved There are 9,900 samples in this dataset; we labelled 900 for training as well as 90 for validation. We estimate the cost of labelling one image to be 50 cents when requiring high-quality labelling. 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, **we saved $4,500 and 75 hours**. ### Prediction Here are some predictions from the resulting models trained on less than 10% of the data. [Pretty pred on pretty image.]() ## References [MC-Dropout](https://arxiv.org/abs/1506.02142) [Road Damage Dataset](https://github.com/sekilab/RoadDamageDetector) [UNet](https://arxiv.org/abs/1505.04597) [BALD](https://arxiv.org/abs/1112.5745) [Deep bayesian active learning for images](https://arxiv.org/abs/1703.02910) [Coresets for active learning](https://arxiv.org/abs/1708.00489) [Few-Shot learning](https://arxiv.org/abs/1703.05175)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully