This repository contains an Object Detection App built using yolo11n, a state-of-the-art object detection model. The app achieves an impressive accuracy of 99.63% π― and includes functionalities for detecting and recognizing objects such as πΎ animals, π¦ birds, π€ humans, π transport, and more. It supports real-time object detection through a live webcam feed π·.itβs the perfect resource for developers and researchers looking to enhance their projects with advanced detection capabilities. ππ
βββ model/
β βββ yolo11n.pt # yolo11n model file
βββ video/
β βββ sample_video.mp4 # Sample video for testing the application
βββ app.py # Main application file
βββ requirements.txt # List of required libraries and dependencies
- π§ yolo11n Model: Utilizes the latest yolo11n model for high-accuracy object detection.
- π₯ Real-Time Detection: Detects and recognizes objects from a live webcam feed.
- π Logging: Comprehensive logging for better understanding and debugging.
- π Code Documentation: Clear and concise comments to ensure readability and understanding of the code.
-
Clone the repository:
git clone https://github.com/MohammadAshmir786/Object_Detection_with_YOLO.git cd Object_Detection_with_YOLO
-
Install the required libraries:
pip install -r requirements.txt
-
Ensure the
yolo11n.pt
model file is located in themodel
directory. -
Place your sample video file in the
video
directory if you wish to test with custom videos.
-
Run the Application:
python app.py
-
The application will start detecting objects in real-time using the webcam.
-
Optionally, test the model using the sample video provided in the
video
directory.
The main application script. Features include:
- Live webcam object detection.
- Sample video testing.
- Detailed logging for debugging.
- Inline comments to explain the workflow.
A list of libraries and dependencies required to run the application. Install them using:
pip install -r requirements.txt
The yolo11n model file used for object detection.
A sample video file containing various objects such as πΎ animals, π¦ birds, π€ humans, and π transport for testing purposes.
Ensure you have the following installed:
- π Python 3.7 or higher
- π¦ Libraries listed in
requirements.txt
When running app.py
, the application will:
- Use yolo11n for object detection.
- Display real-time webcam footage with bounding boxes and labels around detected objects.
- Log the detection details for review and debugging.
Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.
- YOLO Algorithm - for the yolo11n model.
- Ultralytics - for the yolo11n model documentation.
If you encounter issues while running the application, consider the following steps:
-
Verify Dependencies: Ensure all required libraries are installed correctly by running:
pip install -r requirements.txt
-
Model File Check: Confirm that the
yolo11n.pt
model file is located in themodel
directory. -
Webcam Issues: Ensure your webcam is functioning properly and accessible by Python.
-
Logging: Use the logs generated during the application's runtime to identify errors and debug the program.
-
Python Version: Ensure you are using Python 3.7 or higher.
Planned improvements for the app include:
- Adding support for additional object categories.
- Enhancing the GUI for better user interaction.
- Integrating support for GPU acceleration for faster processing.
- Providing a feature for saving detection results as video or image files.
For any questions or feedback, feel free to contact:
- Author: Mohammad Ashmir Abbasi
- Email: [email protected]
- Social: Connect with me for professional networking click π
π
- Initial release with YOLOv11n integration.
- Support for real-time webcam detection.
- Sample video testing included.
- Logging and documentation added for clarity.