• Stars
    star
    146
  • Rank 251,250 (Top 5 %)
  • Language
    Jupyter Notebook
  • Created over 5 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Control your lights with dab and t-pose, duh

Dab and T-Pose Controlled Lights

Control your lights by dabbing and t-pose'ing, duh

Dab and T-Pose Controlled Lights

Check out the full blog post here.

Getting the ZWave Controller working on the TX2

By default, I couldn't write to the /dev/ttyACM0 device that the ZWave USB controller came up on with my NVDIA Tegra TX2.

You'll need to do something along the following to get permissions:

$ sudoedit /etc/udev/rules.d/50-myusb.rules

Followed by inserting the following lines to add perms to the /dev/ttyUSB* and /dev/ttyACM*:

KERNEL=="ttyUSB[0-9]*",MODE="0666"
KERNEL=="ttyACM[0-9]*",MODE="0666"

Getting an OpenPose Model running on the TX2

There are two ways, I started out by using the original OpenPose repo to get a build and proof of concept running.

I got probably half a frame 1.4(ish) frames per second out of that. You can see how I initialize and use the built in devboard camera in the 01_body_from_image.py file in this repo. That comes directly out of the included Python examples.

Because I wanted better response time, I ended up searching for a better model. I found tf-pose-estimation.

It requires Tensorflow, so be sure to grab the latest Jetpack release from NVIDIA here when installing.

After that, it should run with the included run_webcam.py, just be sure to run it with the right model. Mobilenet_v2_large was the bare minimum for an acceptable detection for me:

$ python3 run_webcam.py --model=mobilenet_v2_large --resize=432x368

With this model, I get 4(ish) frames per second on the TX2, much better for detection latency. I may try seeing if I can optimize further after getting a full proof of concept running.

Exploring OpenPose Data and Training a New Classifier

We'll use some saved examples of T-Poses and Dabs in order to train our classifier. You can see the Jupyter notebook here with examples of labeling and converting our raw npy Numpy exports to CSVs and Pandas datasets, along with cleanup and training.

The current (working) architecture looks like this:

Dab and T-Pose Neural Network Architecture

Running the Project Itself

Dab and T-Pose Architecture

You'll need to get OpenPose up and running, along with the Python libraries for OpenCV and ZWave. After that, you can use the included program, just run it under the openpose/examples/tutorial_api_python directory.

If you want to grab more example poses for retraining, just replace the 01_body_from_image.py with the one included in this repo's src/ directory.

Known bugs

For some reason, the model test I run on my original X and y dataset doesn't seem to work. I think I messed the data up somewhere along the way in the Jupyter Notebook. If you figure out where that happens, open a PR please. :)

More Repositories

1

poor-mans-deep-learning-camera

Build a thin client deep learning camera with the Raspberry Pi, Flask, and YOLO
Python
438
star
2

automatic-memes

Automatic Memes in Python with Face Detection
Python
157
star
3

rich-mans-deep-learning-camera

Building a Self Contained Deep Learning Camera with the NVIDIA Jetson and Python
Python
49
star
4

daily-sketches

Daily Sketches in Python
Python
45
star
5

break-glass-with-resonant-frequency

Breaking A Wine Glass By Detecting Resonant Frequency in Python
Python
37
star
6

make-art-with-python-code

Python 3 code for Make Art with Python
Python
32
star
7

sorting-visualized

Sorting Algorithms Visualized in Python
Python
31
star
8

pygame-video-synthesizer

Video Synthesizer in Pygame and Python 3
Python
30
star
9

deepdreamtutorial

Deep Dream Tutorial
Python
24
star
10

nvidia-accelerated-pytorch-ffmpeg-opencv

Hardware Accelerated Pytorch Container with (also accelerated) ffmpeg & OpenCV 4
Python
21
star
11

snapchat-lens-effect-in-python

Recreating real time face effects in Python with Dlib
Python
20
star
12

deep-learning-bird-camera

NVIDIA Jetson Powered Deep Learning Bird Camera
Python
20
star
13

critter-and-guitari-etc-programs

Example Programs in Pygame for the Critter and Guitari ETC
Python
19
star
14

ecommerce-observability

Example eCommerce App for learning observability principles
Ruby
17
star
15

crappy-product-generator

Generate crappy products and reviews using Amazon's dataset
Lua
17
star
16

singy-bird

Voice Controlled Flappy Bird
Python
16
star
17

slitscan-images-python

Generating slit scan images from videos in Python
Python
11
star
18

firefox-splinter-docker

Docker image with Firefox, Splinter, and Selenium for headless browser
Python
10
star
19

ecs-fargate-deployment-tutorial

Deploying a Test Flask Web App to Fargate
Python
10
star
20

10-print-python-pygame

Recreating 10 PRINT in Python 3 and Pygame
Python
9
star
21

automatic-gifs

Automatic Gifs in Python with Mask R-CNN
Python
9
star
22

distributed-tracing-with-apm-workshop

Distributed Tracing with APM Workshop
JavaScript
9
star
23

demo-gpt-4-temporal

A demo using Gitpod and Temporal to demonstrate workflows
Python
8
star
24

deepgraffiti

Python
8
star
25

Flask-Dotcloud

Bare minimum setup to get Flask working on DotCloud
Python
6
star
26

elasticAPI

Example project using Tornado and Elasticsearch to build an API
Python
6
star
27

correlation-tracking-playground

Playground for correlation tracking in dlib with Pygame
Python
5
star
28

minimum-viable-christmas-lights

Christmas lights controlled via Z-Wave and Flask
Python
5
star
29

dash-apm-workshop

Microservices in Python and Docker for an APM Workshop hosted at DASH (2018)
Jupyter Notebook
5
star
30

self-driving-skate-ramp

Self Driving Skateboard Ramp
Python
4
star
31

dance-and-plant-controlled-smarthome

My smarthome controlled via sweet dance moves and plants
Jupyter Notebook
3
star
32

dance-catch-dance-catch

Dance and Catch, with AI (lol)
Python
3
star
33

birding-with-python-pycon-2018-slides

Slides for my Pycon 2018 talk, Birding with Python and Machine Learning
Jupyter Notebook
3
star
34

bling-bling-api

An API to add GIF *Bling* to Your Images
Python
3
star
35

elasticChef

Chef scripts to deploy an elasticsearch and tornado web server with nginx
Ruby
2
star
36

arduino-fio-xbee-accel-osc

Hooking up an Arduino Fio and ADXL345 Accelerometer to OSC Output
C++
1
star
37

example-note-taking-app

An example note taking app to showcase observability
HTML
1
star
38

nanowrimo-2019-visualization

Visualizing my 2019 NaNoWriMo
Python
1
star
39

golang-playground

A playground of small, fun, and observable go applications
Go
1
star
40

openai-playground

Python
1
star
41

katacoda-tracing-datadog

Distributed Tracing with Datadog
Shell
1
star
42

robotBongos

robotBongos man
Arduino
1
star
43

kubernetes-datadog-monitoring-example

Example project showing monitoring kubernetes with Datadog
Python
1
star
44

FractalPresents

Processing Code to Generate Presents
Java
1
star
45

anagram

Ruby
1
star
46

super-unofficial-arm64-datadog

A super unofficial deb build of the Datadog Agent v6.11 for ARM64
1
star
47

guitar-jammer

Connect to the Spotify API and control the playback of music with your feet so you can jam
Python
1
star
48

Convert-NABirds-to-VOC-XML

Convert the NABirds Dataset to VOC XML for Darknet / Darkflow
Python
1
star
49

Cinder-RGBDKinectUncompressed

Uncompress all of the depth data PNGs that come from RGBDToolkit back to depth images
C++
1
star
50

github-repo-explorer

Exploring Pull Requests Using Requests
Python
1
star