GithubHelp home page GithubHelp logo

node-vision's Introduction

Node Vision

This is a ExpressJS application that provides the framework on top of which you can implement multiple backends to detect labels in images.

What is the purpose of this exercise?

The purpose of this exercise is to assess the following,

  • ability to work with an existing code
  • integrate new backends to existing code
  • attention to detail
  • code quality
  • error handling

What you will be implementing?

You will be implementing a backend to detect label in images using AWS Rekognition API. You will be shared temporary AWS access keys for authenticating with the Rekognintion API.

Optionally, you can implement any additional backends of your choice, for example Google Vision.

How to run the code

  • You need to have NodeJS 10.x or higher installed
  • Get the code and extract it to any directory in your system
  • Switch to that directory in command prompt
  • Run npm install to install all dependencies
  • Run the app with npm start

Instructions

  • You will have to modify routes/vision.js to implement your backend code for detecting labels in images. The file will have comments to show you where your code goes.
  • The file uploaded from the UI can be accessed using req.files.file & it will have the following properties,
    • data - A JS buffer that represent the uploaded file, returns empty buffer in case useTempFiles option was set to true.
    • name - Example: car.jpg.
    • mv - A function to move the file elsewhere on your server. Can take a callback or return a promise.
    • mimetype - The mimetype of your file.
    • tempFilePath - A path to the temporary file in case useTempFiles option was set to true.
    • truncated - A boolean that represents if the file is over the size limit.
    • size - Uploaded size in bytes.
    • md5 - MD5 checksum of the uploaded file
  • Once implement your backend, call it, get the response, process and return the attributes in JSON format as below,
    {
      "labels": ["shoe", "red", "nike"]
    }
    
  • Handle any errors that occur while calling your backend or procesesing the response, set the appropriate HTTP status code and return the error in JSON format as below (might want to check out the ExpressJS documentation!).
    {
      "error": "Unable to process the request"
    }
    

NOTE: You would only have to modify routes/vision.js, package.json & package-lock.json (if you install any additional NodeJS packages).

Sample

Sample

node-vision's People

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.