A human detection and tracking app using YOLO to identify and track people through a camera. It automatically sends images to Telegram when a new person is detected.
- 📦 Human detection using YOLOv11
- 🧍 Multi-person tracking (multi-id)
- 🤖 Send images via Telegram bot when a new person is detected
- 🐳 Can run with either Python (venv) or Docker
CameraTracking/
├── main.py # Main entry point
├── telegram_bot.py # Controls the Telegram bot
├── human_tracker.py # YOLO + tracking handling class
├── requirements.txt # Required libraries
├── Dockerfile # For running with Docker
├── .dockerignore # Files to ignore during Docker build
└── HumanImage/ # Folder to store detected human images- Create a bot through @BotFather
- Retrieve the token and insert it into the code (.env)
- Get your chat_id by either chatting with the bot or using the Bot API
python -m venv venv
source venv/bin/activate # For Linux/macOS
venv\Scripts\activate # For Windowspip install -r requirements.txtpython main.pydocker build -t human-tracker-botdocker run --rm human-tracker-bot👉 If you’re using a camera on Linux:
docker run --rm --device=/dev/video0 human-tracker-bot- Detected images are saved in the HumanImage/ folder.
- Press q in the display window to exit the program.