GithubHelp home page GithubHelp logo

brentonjackson / fruit-price-adjustor Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 56.33 MB

IoT app that adjusts price of fruit based on its ripeness built with ImageZMQ, TensorFlow, Python, Express, and React

Python 24.83% JavaScript 63.69% HTML 5.30% CSS 6.19%
iot machine-learning nodejs raspberry-pi

fruit-price-adjustor's Introduction

pic pic

Fruit-Price-Adjustor

pic pic ⭐️ Winner of Best Hardware Hack, HackGSU 2022 ⭐️

Fruit-Price-Adjustor is an IOT app that monitors fruit in stores and adjusts the price of the fruit real-time based on its ripeness. This is an effort to reduce the amount of food waste as well as maximize profits. It is implemented with a camera and machine learning, paired with a full-stack web app and sms messaging.

Table Of Contents

Technology Used

  • Camera Input: Webcam (I used a Raspberry Pi but you can also use your standard laptop webcam)
  • Messaging software: ImageZMQ (Python)
  • Machine Learning Framework: TensorFlow (Python)
  • Web App: MERN Stack
  • SMS Messaging: Twilio

Installation

Pre-work

The main functionality is all in Python. The web app portion is in Node. So you need both pip and npm.

  • After forking this repo, first get all the python files up and running. If you are using two different computers, you'll want to have the repo on both machines. Keep in mind that the server uses TensorFlow. So you'll probably want a Windows machine for that, if possible. This caused me more headache than necessary trying to get it up and running with the M1 chip.
  • On your server machine (the machine without the camera feed), grab your ip address. You'll need it because that's how the client will send the image feed.

Setup and Running App

  1. On client machine, start client from the /server folder: python client.py -s [ip_address_of_server]
    • I suggest either looking at the code to determine what pip packages you're missing, or looking at the error feedback and installing the packages then, if they aren't already installed.
  2. Install all npm packages on both computers (in both client and server folders, npm install)
  3. cd server && npm run dev. This script will run the python server and webserver concurrently and launch the web app. You can view the front end on http://localhost:3000/ by default. Note that nothing will really happen until the client is running as well.
    • Again, there will likely be Python packages you don't have that are needed, so the errors may come from that. Install all the needed packages for the server using pip.

sms service (optional)

  1. To setup Twilio messaging, create a number on Twilio then tunnel tunnel your localhost port 5000 (the web server) as a webhook.
    1. To do this, install ngrok.
    2. Then run the command ngrok http 5000 in the /server folder. Take that http forwarding address and add it to your twilio handler.

Credits

Fruit-Price-Adjustor was created by Brenton Jackson and Md Reazul Islam. Thanks to the HackGSU organizors, mentors, and sponsors!

*If there is anything unclear or could be better worded, we welcome all forms of feedback

fruit-price-adjustor's People

Contributors

brentonjackson avatar mdreazul avatar

Watchers

James Cloos 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.