A personal project that combines MQTT messaging protocol with image recognition capabilities to create an IoT-based computer vision system.
This project enables real-time image analysis through MQTT communication, making it ideal for:
- Security Monitoring: Identify intruders or suspicious activities and send alerts via MQTT
- IoT Edge Computing: Process images locally and communicate results through lightweight MQTT messages
- Pet/Wildlife Monitoring: Detect and classify animals or pets in camera feeds
The system can receive images via MQTT topics, perform image recognition using LLM, and publish the results back to MQTT topics for consumption by other IoT devices or services.
- MQTT Protocol: Lightweight messaging protocol for IoT communication
- Python: Primary development language (assumed based on common patterns)
- Paho MQTT: Python MQTT client library
- Python 3.8+
- MQTT Broker (e.g., Mosquitto, HiveMQ, or cloud-based broker)
- Camera or image source (ESP32-CAM Module)
- Required Python packages (see requirements.txt)
-
Clone the repository
git clone https://github.com/frabru99/MQTTImageRecognition.git cd MQTTImageRecognition -
Install dependencies
cd TelegramBot python -m venv venv pip install -r requirements.txtDo the same with ServerPython folder.
For arduino code, make sure to install all the required libraries.
-
Configure MQTT broker
- Update MQTT broker configuration in the config file, in order to allow remote connections.
-
Create a Telegram Bot Key
- Create a telegram bot with @BotFather and add the Key in a .env file in TelegramBot folder.
-
Setup Gemini Key for ServerPython:
- Generate an API Key into Gemini web page and put it in a .env file in ServerPython folder.
-
Setup variables (IP, port and WiFi credentials) for .ino scripts
-
Start the MQTT Broker on your PC
-
Start the Server and the Telegram Bot
cd MQTTImageRecognizer/TelegramBot python bot.pyDo the same for the server.py file.
-
Flash the ESP32-CAM and ESP32-HUB (ESP with an LCD Screen)
-
Require a photo from Telegram Bot and wait for the results!
This is a personal project developed for learning and experimentation purposes. Please note:
- Limited error handling and edge case management
- Basic documentation and code comments
- Minimal testing coverage
- Configuration may require manual adjustments for different environments
- Comprehensive error handling
- Unit tests
- Web interface for monitoring and configuration
- Performance optimization and resource management
- Detailed API documentation
- Security enhancements (encryption, authentication)
- Scalability improvements for high-throughput scenarios
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For questions, suggestions, or collaboration opportunities, feel free to reach out through GitHub issues or contact the repository owner.
This README will be updated as the project evolves and new features are implemented.
