Skip to content

Latest commit

 

History

History
88 lines (62 loc) · 5.3 KB

File metadata and controls

88 lines (62 loc) · 5.3 KB

Dog On Couch Detector 🐶🛋️

AI-powered pet detection for furniture protection 🤖

Implemented using:


Do remember to star ⭐ the repository if you like what you see!

Star Badge GitHub stars


Introduction 📚

Like many pet owners, I've faced a common problem:
every time I leave the house, my dogs jump on the sofa and leave behind a mess of fur 🐾🛋️.
I've tried countless methods to prevent this but to no avail.

Motivated to find a solution, I decided to leverage the power of technology to create a tool to manage this issue. This led to the development of a system that combines computer vision, machine learning, object detection, and real-time notifications to my personal Telegram account. The application alerts 🚨 whenever it detects one of the dogs on the sofa, and it even sends an immediate update to my phone, complete with an image of the mischievous dog, enabling me to take immediate action, no matter where I am. This use of technology not only ensures my furniture's cleanliness but also allows me to remotely monitor my pets' behavior.


Implementation 💻

The system utilizes the YOLOv8 pre-trained model from Ultralytics.
I made several modifications, computations, and conditions to tailor the model for this specific application.


Features ⭐

  • Real-time detection of a specific event: dog climbing on a couch.
  • Utilizes the powerful YOLOv8 model for object detection.
  • Triggers real-time alerts when the event is detected.
  • Sends real-time alerts with photos to a specified Telegram chat.

Installation and Usage 🛠️

  1. Clone this repository to your local machine.
  2. Install the required packages using 'pip install -r requirements.txt'
  3. Position your computer in front of the couch. It's preferable if the computer's camera is parallel to the couch.
  4. Set up a Telegram bot Update the telegram_key and chat_id variables in the code with your bot's API key and your chat ID.
  5. Run the script 'python detector.py'
  6. The tool will then use your computer's camera to monitor the couch.
  7. The tool has been programmed to specifically detect dogs, cats, sofas, and beds while ignoring other objects.

Setting Up the Telegram Bot 📲

  1. Message @BotFather on Telegram using the Telegram app.
  2. Type /newbot to create a new bot. Follow the instructions and set a name and username for your bot.
  3. After successfully creating the bot, BotFather will give you a token. This is your 'telegram_key' (keep it secret).
  4. Message @userinfobot on Telegram using the Telegram app.
  5. Press 'start'.
  6. The bot will reply to you with some personal information. The 'Id' is your 'chat_id' (keep it secret).

Conclusion and Request for Feedback 📝

I hope that this tool will solve my problem. But even if it doesn't fully work as expected, I've thoroughly enjoyed the learning journey and the deep dive into the world of computer vision and object detection.

This is my first project using the YOLO model, so I welcome any feedback regarding the implementation, the code quality, and any potential optimizations that could ensure efficient runtimes even on relatively weak hardware. Your time and insights are greatly appreciated.
Thank you! 🙏


Future Updates 🔮

Stay tuned for future updates, enhancements, and the results of this project. I'll be posting regular updates as we progress.
Thanks for stopping by! 👋


Acknowledgements 🙏

I'd like to express my gratitude to the creators of the YOLOv8 model, as their work served as the foundation for this project.


Do remember to star ⭐ the repository if you like what you see!


Made with ❤️ by Nadav Ishai