initial classification work
This commit is contained in:
Родитель
6831a28485
Коммит
2b1859a0f0
40
README.md
40
README.md
|
@ -1,3 +1,43 @@
|
|||
(This document is up-to-date as of 1/29/2019)
|
||||
|
||||
# Overview of Azure's Computer Vision Offerings
|
||||
Microsoft provides a variety of options when it comes to computer vision. The outline below provides an overview of such services, starting with the highest level service where you simply consume an API to the lowest level service where you develop the model and the infrastructure required to deploy it.
|
||||
|
||||
## Cognitive Services API
|
||||
Cognitive Services API allow you to consume machine learning hosted services. Within Cognitive Services API, there are several computer vision services:
|
||||
|
||||
- [Face API](https://azure.microsoft.com/en-us/services/cognitive-services/face/) (for face detection and recognition)
|
||||
- [Content Moderator](https://azure.microsoft.com/en-us/services/cognitive-services/content-moderator/) (for image, text and video moderation)
|
||||
- [Computer Vision](https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/) (for analyzing images, reading text and handwriting, identifying celebrities, and intelligently generating thumbnails)
|
||||
- [Video Indexer](https://azure.microsoft.com/en-us/services/media-services/video-indexer/) (for analyzing videos)
|
||||
|
||||
Targeting popular and specific use cases, these services can be consumed with easy to use APIs. Users do no have to do any modeling or understand any machine learning concepts. They simply need to pass an image or video to the hosted endpoint, and consume the results that are returned.
|
||||
|
||||
For these Cognitive Services, the models are used are pretrained and cannot be modified.
|
||||
|
||||
## Custom Vision Service
|
||||
Custom Vision Service is a SaaS service where you can train your own vision models with minimal machine learning knowledge. Upload labelled training images through the browser application or through their APIs and the Custom Vision Service will help you train and evaluate your model. Once you are satisfied with your model's performance, the model will be ready for consumption as an endpoint.
|
||||
|
||||
Currently, the Custom Vision Service can do image classification (multi-class + multi-label) and object detection scenarios.
|
||||
|
||||
Learn more about the Custom Vision Service [here](https://azure.microsoft.com/en-us/services/cognitive-services/custom-vision-service/).
|
||||
|
||||
## Azure Machine Learning
|
||||
Azure Machine Learning (AML) is a scenario-agnostic machine learning service that will help users accelerate training and deploying machine learning models. Use automated machine learning to identify suitable algorithms and tune hyperparameters faster. Improve productivity and reduce costs with autoscaling compute and DevOps for machine learning. Seamlessly deploy to the cloud and the edge with one click. Access all these capabilities from your favorite Python environment using the latest open-source frameworks, such as PyTorch, TensorFlow, and scikit-learn.
|
||||
|
||||
Learn more about Azure Machine Learning [here](https://azure.microsoft.com/en-us/services/machine-learning-service/).
|
||||
|
||||
---
|
||||
|
||||
# What Should I Use?
|
||||
When it comes to doing computer vision on Azure, there are many options and it can be confusing to figure out what services to use.
|
||||
|
||||
One approach is see if the scenario you are solving for is one that is covered by one of the Cognitive Services APIs. If so, you can start by using those APIs and determine if the results are performant enough. If they are not, you may consider customizing the model with the Custom Vision Service, or building your own model using Azure Machine Learning.
|
||||
|
||||
Another approach is to determine the degree of customizability and fine tuning you want. Cognitive Services APIs provide no flexibility. The Custom Vision Service provides flexibility insofar as being able to choose what kind of training data to use (it is also only limited so solving classification and object detection problems). Azure Machine Learning provides complete flexibility, letting you set hyperparameters, select model architectures (or build your own), and perform any manipulation needed at the framework (pytorch, tensorflow, cntk, etc) level.
|
||||
|
||||
One consideration is that more customizability also translates to more responsibility. When using Azure Machine Learning, you get the most flexibility, but you will be responsible for making sure the models are performant and deploying them on Azure.
|
||||
|
||||
|
||||
# Contributing
|
||||
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
# Image Classification
|
||||
A large number of problems in the computer vision domain can be solved using image classification. These problems include building models to answer questions such as:
|
||||
- Is an object present in the image? For example "dog", "cat", "ship", etc...
|
||||
- What kind of geographic land (forest? desert? river?) is in this satelite image?
|
||||
|
||||
In these notebooks, we learn how to use fast.ai and Azure to train, test, and deploy an image classification model. We will start with multi-class classification and then go into multi-label classification.
|
||||
|
||||
To build and deploy an image classification model using fast.ai and Azure, you go through the following steps:
|
||||
|
||||
__Model development__
|
||||
1. Preparing the data (getting images and labels into the correct format)
|
||||
1. Create data loaders
|
||||
1. Explore your data
|
||||
1. Data augmentation
|
||||
1. Building and iterating on the model (architecture selection, hyperparameter tuning, evaluating results, etc)
|
||||
|
||||
__Model deployment__
|
||||
1. Deploying the model
|
||||
|
||||
## Prerequisites
|
||||
|
||||
__Model development__
|
||||
|
||||
1. fastai>=1.0
|
||||
1. GPU enabled machine
|
||||
|
||||
__Model deployment__
|
||||
|
||||
1. If you don't have an Azure subscription, create a free account before you begin.
|
||||
1. Set up an Azure Machine Learning workspace
|
||||
|
||||
## Notebooks
|
||||
|
||||
1. [Multiclass Classification - Classifying Dog Breeds](multiclass_classification.ipynb)
|
||||
1. [Multilabel Classification - Classifying MET Lithographs](multilabel_classification.ipynb)
|
||||
1. [Deploying our classification model](.)
|
||||
|
||||
## Appendix
|
||||
|
||||
1. [Fastai course v3](https://github.com/fastai/course-v3)
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
name: cvbp
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- nb_conda=2.2.1
|
||||
- nb_conda_kernels=2.1.1
|
||||
- nbconvert=5.3.1
|
||||
- pip=10.0.1
|
||||
- python=3.6.7
|
||||
- prompt_toolkit=1.0.15
|
||||
- pip:
|
||||
- azure==4.0.0
|
||||
- azure.mgmt.common==0.20.0
|
||||
- azure-cli==2.0.55
|
||||
- torch==0.4.1
|
||||
- torchvision==0.2.1
|
||||
- fastai==1.0.42
|
||||
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Загрузка…
Ссылка в новой задаче