Skip to content

Live video pose recognition game alike JustDance with WrnchAI. An Arduino and LEDs responding to user interaction are used to enhance the experience. Made by Tayseer, Zéphir, James, and Jacob @ Hack McWics 2020.

Notifications You must be signed in to change notification settings

zephirl/mcwics-app

 
 

Repository files navigation

McWics-2020

Dance Dance Revolution Mini :)


The goal of our project is to have a Hack McWicks version of Just Dance with the dance moves being recognized through wrnch's SDK via the computer's live webcam. If the dance move is correct, the LED strip outputs a green color, otherwise yellow if it is almost correct, and red if it's incorrect.


We used an Arduino to power the LED strip and the python library pyserial to send commands from the python script to the arduino to trigger the correct color sequences for the LED strip.

Demo

Check out this demo video: https://www.youtube.com/watch?v=V5fuObj5YHY

Wrnch Computer Vision Correct pose = Green Almost correct pose = Orange Wrong pose = Red
Wrnch Computer Vision Correct pose = Green Almost correct pose = Orange Wrong pose = Red

Techincal details

The live camera feed gets processed through wrnch's SDK [which we obtained as part of the hackathon event], compares it to the data of the correct move (from a picture we took and processed). Using vector calculations we can get an estimate of the resemblance of the two dance poses (live webcam feed and saved image). A number between 0 (high similarity) and 2 (low similarity) gets outputed and updated multiple times per second. If this number gets below a certain threshold, the python script sends the command to the arduino to trigger color sequence : orange if below than 1 and green if below than 0.8. Otherwise, red flashes.


To connect Arduino and python code via pyserial:

  • Install pyserial

    • pip install pyserial
  • Configure pyserial

    • go in python file
      • insert the following code at the beginning, COMx being the serial port connecting your computer to Arduino
        • Import serial
        • ser1 = serial.Serial('COM1', 9600)
      • insert the following code to send command to Arduino, replace 'a' by any single character you want
        • ser1.write(’a’.encode())

About

Live video pose recognition game alike JustDance with WrnchAI. An Arduino and LEDs responding to user interaction are used to enhance the experience. Made by Tayseer, Zéphir, James, and Jacob @ Hack McWics 2020.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 93.1%
  • C++ 6.9%