Giter Club home page Giter Club logo

hyperdrivedeeplearning's Introduction

Build Status

Author: Fidan Boylu Uz

Training of Python Deep Learning Models on Azure

Overview

This scenario shows how to tune an object detection Mask RCNN model that can be deployed as a web service to provide predictions for empty spaces on store shelves. For this scenario, "Input Data" in the architecture diagram refers to images of retailer store shelves filled with products and empty spaces to be predicted by the model. The scenario is designed for Pytorch's torchvision library but can be generalized to any scenario to tune the hyperparameters of the models that use pytorch deep learning libraries.

Design

alt text The scenario uses a dataset which includes images of 4 and 8 ft retail store shelves filled with grocery products and bounding box annotations for empty spaces on the shelves in xml format (This dataset is distributed under the CC-BY 4.0 license.) It tunes a torchvision Mask RCNN model to predict the bounding box coordinates and probabilities of empty spaces on the shelves. The application flow of this architecture is as follows:

  1. Configure Azure Machine Learning (Azure ML) service.
  2. Create an Azure ML Compute cluster.
  3. Upload training and test data to Azure Storage.
  4. Configure a HyperDrive random parameter search.
  5. Submit the search and monitor until complete.
  6. Retrieve the best set of hyperparameters.
  7. Register the best model.

Prerequisites

  1. Linux (x64) with GPU enabled.
  2. Anaconda Python installed.
  3. Azure account.

The tutorial was developed on an NC series Azure Ubuntu DSVM, which addresses the first three prerequisites.

Setup

To set up your environment to run these notebooks, please follow these steps. They setup the notebooks to use Azure seamlessly.

  1. Create a Linux Ubuntu DSVM.

  2. Add your user to the docker group:

    sudo usermod -aG docker $USER
    newgrp docker
    
  3. Clone, fork, or download the zip file for this repository:

    git clone https://github.com/microsoft/HyperdriveDeepLearning.git
    
  4. Enter the local repository:

    cd HyperdriveDeepLearning
    
  5. Create the Python virtual environment using the environment.yml:

    conda env create -f environment.yml
    
  6. Activate the TorchDetectAML virtual environment:

    conda activate TorchDetectAML
    
  7. Clone COCO API under scripts folder and install:

    cd scripts
    git clone https://github.com/cocodataset/cocoapi.git
    cd cocoapi/PythonAPI
    make
    cd ../../..
    
  8. Login to Azure:

    az login
    
  9. If you have more than one Azure subscription, select it:

    az account set --subscription <Your Azure Subscription>
    
  10. Start the Jupyter notebook server in the virtual environment:

    jupyter notebook
    

Steps

After following the setup instructions above, run the Jupyter notebooks in order starting with first notebook.

Cleaning up

The last Jupyter notebook describes how to delete the Azure resources created for running the tutorial. Consult the conda documentation for information on how to remove the conda environment created during the setup.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

hyperdrivedeeplearning's People

Contributors

dciborow avatar fboylu avatar grecoe avatar marabout2015 avatar microsoftopensource avatar msftgits avatar praneet22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.