Skip to content

nishijima13/hand-gesture-operation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample code for operating home appliances with hand gestures

Sample code to control home appliances using hand gestures (Mediapipe) and Nature Remo API (Python).

Build environment

  1. Fix the timezone in the Dockerfile to match yours.
    build/Dockerfile
  2. Create the docker image.
    docker build --no-cache -t nature_remo ./build
    
  3. Connect your USB camera.
  4. Start Docker container.
    xhost +local:
    docker run --name nature_remo --device /dev/video0:/dev/video0:mwr --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --env="DISPLAY=$DISPLAY" -v [Absolute path of the cloned folder]:/home/workspace -it nature_remo /bin/bash
    
    Change the --device and the camera ID in the config file if necessary.

Run sample code

  1. Change the button name and the state in the code to match your environment.
    If you don't know the button name and the state, run the sample code with the DEBUG flag set to True and check "Your appliances".
  2. Execute sample code.
    python3 src/main.py -c config/settings.yaml
    
    The code is designed to power on with Thumb_Up and power off with Thumb_Down.

Result

result/result_short.gif

About

Sample code to control home appliances using hand gestures (Mediapipe) and Nature Remo API (Python).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published