Skip to content

SatyaFebi/Scroll-Alarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📱 Scroll Alarm - Computer Vision Edition

A productivity tool designed to stop your doom-scrolling habit. Using real-time Computer Vision, this app detects if you're holding a smartphone while working and triggers an annoying alarm + meme popup until you put it down.

Python OpenCV MediaPipe

✨ Features

  • Real-time Detection: Uses Google's MediaPipe Object Detection (EfficientDet Lite0).
  • Confidence Timer: Requires the phone to be detected for at least 2 consecutive seconds to trigger (avoids false alarms).
  • Annoying Alarm: Plays a loud sound through Windows native MCI (no extra audio libs needed).
  • Meme Interruption: Shows a random "Always on Top" meme window that stays focused until you confirm you'll stop.
  • Auto-Setup: Automatically downloads the required TFLite model on the first run.

🚀 Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/Scroll_Alarm_Computer_Vision.git
    cd Scroll_Alarm_Computer_Vision
  2. Create and activate a Virtual Environment:

    python -m venv venv
    # Windows
    .\venv\Scripts\activate
    # Linux/macOS
    source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt

🛠️ Usage

Simply run the main script:

python app.py
  • Press 'q' on the camera feed window to quit the application.
  • When a phone is detected, the status bar in the feed will change and a timer will start.
  • Once the alarm triggered, click the button in the popup to stop the sound and resume monitoring.

📂 Project Structure

.
├── assets/
│   └── memes/         # Store your alarm sound and meme images here
│       ├── alarm.mp3
│       └── ...
├── app.py            # Core application logic
├── requirements.txt   # Python dependencies
└── efficientdet_lite0.tflite (auto-downloaded)

⚙️ Configuration

You can tweak settings in app.py under the --- CONFIGURATION --- section:

  • CONFIDENCE_THRESHOLD: Time in seconds before the alarm triggers (default: 2.0).
  • MODEL_PATH: Change the TFLite model used.
  • MEMES_DIR: Path to your meme images folder.

📝 License

MIT License. Feel free to use and modify for your own productivity!

About

A productivity tool designed to stop your doom-scrolling habit. Using real-time Computer Vision, this app detects if you're holding a smartphone while working and triggers an annoying alarm + meme popup until you put it down.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages