Coder Social home page Coder Social logo

khesualdo / ms-azure-ai-hackathon-s19 Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 7.16 MB

:cherries: :lemon: :watermelon: FRÜT utilizes the Azure Cognitive Vision API to assist Border Service Officers in identifying different fruits as well as provides information associated with the identified fruit.

C# 34.65% HTML 35.10% JavaScript 30.25%
azure-functions azure-cognitive-services azure-custom-vision nodejs expressjs html css javascript

ms-azure-ai-hackathon-s19's Introduction

FRÜT 🍒 🍋 🍉

🍒 🍋 🍉 FRÜT utilizes Azure Cognitive Vision API to assist Border Service Officers in identifying different fruits as well as provides information associated with the identified fruit.

Inspiration

The inspiration comes from this video. In the video it shows how hard the Border Service Officers work to protect the American wild life from illegal imports of produce.

While, it is easy to spot rotten fruits, if the fruits are in perfect condition, the agent may or may not know if the fruit is allowed into the country. Also, it is definitely easy to identify common fruits, such as bananas or oranges, however, it is more difficult to identify more exotic fruits, such as cherimoyas, sweetsops, etc... It gets worse when fruits look very similar, for example - strawberry guavas and cranberries, lima and (large) limes or even unripe oranges.

Strawberry guavas on the left / Cranberries on the right

Limas on the left / Limes on the right

An agent may make a mistake by confiscating permitted items, in this case the people are negatively affected by having to pay a fine. On the other hand, an agent may make a mistake by not confiscating non-permitted items, in this case the entire country is negatively affected by having to pay an even bigger "fine" to treat unknown insects and plant diseases.

About

FRÜT could assist Border Service Officers in identifing different fruits, along with their attributes - such as fruit type, history, origin, as well as whether the fruit is allowed into the country.

FRÜT could also be used by regular citizens during their shopping trips.

Implementation

Screenshots of the application: 1, 2

Run

Create a Function App resource on Azure portal

  • Select HTTP trigger as type
  • Copy code from function.csx
  • Set FUNCTION_URL in index.js

Go to Custom Vision Portal and create a new project

  • Set Project Type as Classification
  • Set Classification Types as Multiclass
  • Set Domains as Food
  • Set COGNITIVE_URL in index.js for image file (available after publishing the project)
  • Set COGNITIVE_KEY in index.js (available after publishing the project)

If you get the We only support publishing to a prediction resource in the same region as the training resource the project resides in. error, create a Custom Vision resource. Make sure it is in the same region as all of your other resources. Tutorial on how to use the Custom Vision Portal.

Run Client

> cd client/
> http-server -c-1

http-server on npm

Run Server

> cd server/
> node index.js

Challenges

Surprisingly the biggest challenge was capturing and then sending the image to the back-end. Working so closely with Base64 Encoding, Data URIs, as well as, byte arrays was new for me. I am glad I figured it out in the end!

Technologies

  • Azure Cognitive Services (Custom Vision API)
  • Azure Functions
  • HTML, CSS, JS
  • NodeJS, ExpressJS
  • Fruits 360 Dataset

ms-azure-ai-hackathon-s19's People

Stargazers

Khesualdo Condori avatar

Watchers

James Cloos avatar Khesualdo Condori 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.