Skip to content

Cat detector to shoo cat away using haar cascade classifier

Notifications You must be signed in to change notification settings

lianaling/cataclysm

Repository files navigation

Project Cataclysm

To detect cats using cat face detection with haar cascade classifier and alert user through Telegram.


Once running, the Cataclysm bot will alert you through Telegram that ff"Cataclysm Started {timestamp}" with a timestamp.


When it detects a cat, it will send f"CAT ALERT {timestamp}".


Upon termination, it will send f"Cataclysm Terminated {timestamp}".

Setup

  1. Clone repo
  2. pip install opencv-python python-telegram-bot python-dotenv
  3. Download IP Webcam on Android phone
  4. Get CAM_URL (append /video after the IP address)
  5. Subscribe to Cataclysm bot on Telegram (username: @CatSirenBot)
  6. Send a message to get CHAT_ID
  7. Create .env file
  8. Put phone outside

Note: Press Q while being on the camera active window to quit the program.

Things for improvement:

  • Cat face detection algorithm: to detect the entire cat body instead of frontal face (swap to CNN)
  • Add user controls from Telegram client
  • Deploy application