This is a web application built with Flask that performs object detection using YOLOv8 model. It allows you to upload images or videos, or use the webcam for real-time object detection. The detected objects are labeled with bounding boxes and class names.
$ git clone https://github.com/egypt-metro/egypt-metro-ai.git
$ cd egypt-metro-ai
$ pip install -r requirements.txt
Follow the steps below to run the application:
- Make sure you have Python and pip installed.
- Install the required dependencies by running the following command in the project directory:
- Run the application using the following command:
- Open your web browser and visit
http://localhost:5000
. - Upload an image or video file, or use the webcam for real-time object detection.
- View the object detection results on the web page.
$ pip install -r requirements.txt
$ python main.py
- maln.py: The main Flask application file.
- infer.py: Contains functions for running YOLOv8 object detection.
- templates: Contains HTML templates for rendering the web pages.
- static/web_images: Contains static images used in the web application.
- yolo_assets: Contains the YOLOv8 model, class names file, and output directory for detections.
- README.md: The README file with instructions and information about the project.
- requirements.txt: Lists the required Python packages and their versions.
The project relies on the following dependencies:
Flask==2.3.2
Flask-WTF==1.1.1
opencv-python==4.7.0.72
ultralytics==8.0.99
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to create an issue or submit a pull request.