Code Monkey home page Code Monkey logo

functions-python-inceptionv3-inference's Introduction

page_type languages products description azureDeploy
sample
python
azure
azure-functions
This sample uses functions to classify an image from a pretrained Inception V3 model using tensorflow APIs.

Image Classification using Tensorflow

This sample uses functions to classify an image from a pretrained Inception V3 model using tensorflow API's

Getting Started

Deploy to Azure

Prerequisites

  • Install Python 3.6+
  • Install Functions Core Tools
  • Install Docker
  • Note: If run on Windows, use Ubuntu WSL to run deploy script

Steps

  • Click Deploy to Azure Button to deploy resources

Deploy to Azure

or

  • Deploy through Azure CLI

    • Open AZ CLI and run az group create -l [region] -n [resourceGroupName] to create a resource group in your Azure subscription (i.e. [region] could be westus2, eastus, etc.)
    • Run az group deployment create --name [deploymentName] --resource-group [resourceGroupName] --template-file azuredeploy.json
  • Download pretrained inception V3 model

    • Clone this repository and copy classify_image_graph_def.pb from here to the InceptionV3Classifier folder
  • Deploy Function App to Azure

    • Run func azure functionapp publish [functionAppName] --build-native-deps
  • Local Development

    • Refer links below to create/activate virtual environment for local development

Test

  • Send the following body in a HTTP POST request as a query param
http://[functionappname]/api/InceptionV3Classifier?img=[url of image]

Local Testing

For any local testing, use the sample local.settings.json and host.json, create virtual environment and run func host start

Example

http post https://[functionappname].azurewebsites.net/api/inceptionv3classifier\?img\=https://www.balisafarimarinepark.com/wp-content/uploads/2017/11/19437535_10154869044788931_4755399083724169206_n-671.jpg

[
    "tiger, Panthera tigris (score = 0.86580)"
]

Note: If using Postman, remove the escape characters from the query param of the URL.

References

functions-python-inceptionv3-inference's People

Contributors

ahmelsayed avatar maiqbal11 avatar microsoftopensource avatar msftgits avatar priyaananthasankar avatar supernova-eng avatar

Watchers

 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.