GithubHelp home page GithubHelp logo

oxfordhack2022's Introduction

OxfordHack2022 Contest - The Helpful Cock

Devpost - https://devpost.com/software/helpfulcock

Made by joshuagornall, alicebarbe, yashbhalgat and nijinskyvich

Context

We had 24 hours to buil this in our Hackathon contest.

Inspirtation

What if those moments of frustration, joy, and emotion could launch a dazzling chain of events that spark joy in your life? How do we integrate a squeaking rubber chicken into a hackathon project? These are important questions that we've finally found answers to.

What it does

The Helpful Cock is a modular environment that creates chain reactions when you display certain emotions. In practice, we turn on a crown made of Monster can when you're happy, and make a rubber chicken squawk when you're angry.

How we built it

There is a pipeline that connects face detection to emotion detection. In video stream, for each image, we detect the largest face and pass that to the emotion detection neural network which classifies the face into one of six emotion attributes (angry, sad, happy, neutral, etc.). Every five seconds, the detected emotions are binned and sent to a Google Cloud Firebase database,

The motors that we have available are not sufficiently strong to be able to actuate the rubber chicken on their own, so we had to improvise. We use two motors to pull up a glass water bottle with string above the rubber chicken. The motors are mounted to the side of a chair, under which is this entire setup. We've attached an electromagnet to the top of the water bottle, so when it turns on, the electromagnet will stick to the metal bits on the bottom of the chair (more accurately... to a stainless steel cake lifter that we attached with tourist magnets to the bottom of the chair). When the electromagnet turns off and the motors have slackened the string, water bottle violently drops on the rubber chicken, which squawks loudly in response. We call the rubber chicken the Helpful Cock.

The Crown of Enlightenment is a spiralized can of Monster that we molded/hot-glued into the shape of a hairband, covered in delicate string lights.

Features:

  • Records video
  • Analysis of facial expressions
  • hardware lights up based on responses

Prerequisites:

One important thing is to properly install Python, since our program uses Tensorflow that has some requirements:

  • Install Python 3.6(64 Bit) from here for exact versions we used.
  • Install and upgrade pip:
python get-pip.py
python -m pip install --upgrade pip

If you already have Python and pip installed, check their versions with

python --version
pip --version

and make sure that your Python version is 3.6 โ€“ 3.9 and your pip version is at least 19.0 or later.

Now setup the Google Cloud SDK with this manual and install those Python Google libraries using pip:

pip install --upgrade google-api-python-client
pip install google-cloud

Finally setup the remaining Python-packages by running the command

pip install -r requirements.txt

from the folder this text file is located in, install pyaudio by following the instruction here and set the PATH environment variable for GOOGLE_APPLICATION_CREDENTIALS with this instruction

When everything is installed, change your directory to oxfordhack2022 and run the program:

cd to /oxfordhack2022
python emotion_recognition.py

External Sources:

Screenshot 2022-02-27 at 12 33 11

Screenshot 2022-02-27 at 12 33 16

Screenshot 2022-02-27 at 12 33 22

Screenshot 2022-02-27 at 12 33 26

Screenshot 2022-02-27 at 12 33 30

Screenshot 2022-02-27 at 12 33 06

Screenshot 2022-02-27 at 12 32 58

oxfordhack2022's People

Contributors

joshuagornall avatar alicebarbe avatar yashbhalgat avatar

Watchers

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