Code Monkey home page Code Monkey logo

smartviz's Introduction

Manufacture Instrument Recognition: SmartViz's Google Cloud Function Backend

This repo contains the testing files for the individual algorithms employed in the backend, as well as gcloud_function.py to track the exact code in the Cloud Function.

Release Notes

New Features

  • Created gcloud_function.py, which reflects code in cloud
  • Encapsulated size detection code into an object for easy use in cloud function
  • Encapsulated FFT code into an object for easy use in cloud function
  • Created bridge between size detection and FFT to extract necessary details

Bug Fixes

  • Removed hardcoded length-per-pixel
  • Tuned threshold calculation to prevent crashes

Known Bugs

  • Bad error-handling: crash results in no message being sent back to the client
  • Objects without threads cause the backend to crash due to lack of peaks in FFT spectrum

Install/Testing Guide

Pre-requisits

This backend runs on Python 3. Please note that you cannot test gcloud_function.py on local machines, since it is only compatible with the cloud function environment. You can, however, test using identify.py, which is a local version that plots the results into a graph.

Dependencies

Python dependencies:

google-cloud-storage
opencv-python
numpy
scipy
imutils
firebase_admin
pyfcm

Local Testing

Download

Simply clone this repo.

Run

Run:

python identify.py

Cloud deployment

Upload

  • Navigate to the Cloud Console for this project (To request access, contact [email protected])
  • Upload the contents of gcloud_function.py to the cloud function called function1
  • Click Deploy

Run

The backend is now deployed. To test it with the UI, please download and run the UI from https://github.com/TimQiu20/Manufacture-Instrument-Recognition-UI. Please keep in mind that the backend is likely already deployed to the console, as the latest release published here would already have been uploaded. If this is the case, you can simply test by testing the UI.

smartviz's People

Contributors

callmejoebob avatar carpediem98 avatar

Stargazers

Siyu Li avatar

Watchers

 avatar Siyu Li 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.