Skip to content

abneeeees/FUshut_down

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ– Hand Gesture Controlled Shutdown

This project lets you shut down your computer using a hand gesture detected via your webcam. Built with Python, OpenCV, and MediaPipe, it identifies a specific gesture (middle finger up, others folded) and executes an immediate shutdown.


πŸ“¦ Requirements

Install the required Python packages using:

pip install -r requirements.txt

The requirements.txt file contains:

opencv-python
mediapipe
numpy

πŸš€ How It Works

  • Captures real-time hand landmarks using MediaPipe.
  • Detects if:
    • Middle finger is extended.
    • Index, Ring, and Pinky fingers are folded.
  • If the gesture matches, triggers a system shutdown.

β›˜οΈ Warning: Shutdown is immediate once the gesture is recognized. Test carefully!


πŸ“‹ Usage

  1. Clone the repository and navigate into the project folder.
  2. (Optional but recommended) Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate  # On Linux/Mac
venv\Scripts\activate    # On Windows
  1. Install the dependencies:
pip install -r requirements.txt
  1. Run the script:
python main.py
or
python3 main.py
  1. Allow webcam access.
  2. Make the ultimate savage gesture:
    • Raise your middle finger high like you're flipping off your PC ✌️.
    • Keep the rest of your fingers tucked down like they know who's boss.
  3. Watch your computer surrender and shut down immediately.
  4. Press Q if you want to exit like a "civilized" human without nuking your machine.

πŸ›  Developer Notes

  • To test without shutting down, comment shut_down_computer() and uncomment print("shutdown").
  • Landmark detection follows MediaPipe's index for hand joints.

🧹 Extra Details

  • Image Flip:

    • Makes webcam act like a mirror.
  • Y-Axis for Detection:

    • In MediaPipe, y increases downward.
    • If fingertip y is higher (smaller) than the PIP joint y, the finger is pointing upward.

🧹 Author's Note

"Left # print("shutdown") commented out... because I'm cool like that. 😎"

Stay savage. πŸ‘‘


πŸ”— License

GPL-3.0

About

shutdowns your system when you flip it off

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages