This repository contains a real-time forklift detection model implemented using YOLOv8. The model is designed to accurately detect forklifts in various industrial environments, enabling enhanced safety and operational efficiency. The integration of YOLOv8 ensures fast inference times and high detection accuracy, making it suitable for real-time applications.
The model was trained on a curated dataset containing forklift images sourced from diverse environments, including warehouses, loading docks, and industrial facilities. The dataset includes:
- Training Set: Annotated forklift images with bounding boxes.
- Validation Set: Images for evaluating the model during training.
- Test Set: Independent images for final evaluation.
Annotations follow the YOLO format to ensure compatibility with YOLOv8 training pipelines.
The performance of the trained YOLOv8 model was evaluated using standard metrics:
- Precision (P): π Measures the percentage of correct positive detections.
- Recall (R): π Evaluates the ability to detect all forklifts in the images.
- F1-Score: βοΈ The harmonic mean of Precision and Recall, providing a balanced performance metric.
Detailed results:
Metric | Value |
---|---|
Precision | 0.95 |
Recall | 0.93 |
F1-Score | 0.94 |
Below are some examples of the model's detection capabilities. The images showcase the bounding boxes around forklifts detected in real-world scenarios:
These results demonstrate the robustness of the model in various lighting and occlusion conditions.
The YOLOv8 model has been integrated into a real-time monitoring system to enhance operational safety. Key features include:
- Live Video Stream Detection: π₯ Real-time forklift detection from live camera feeds.
- Alert System:
β οΈ Automatic alerts triggered when forklifts enter restricted zones. - Data Logging: π Storing detection logs for further analysis and auditing.
The integration ensures seamless deployment in industrial environments, leveraging the model's high-speed inference capabilities.
- Python 3.8+
- Ultralytics YOLOv8
- Required libraries:
torch
,opencv-python
,numpy
- Clone the repository:
git clone https://github.com/yourusername/forklift.git cd forklift
- Install dependencies:
pip install -r requirements.txt
Use the following command to train the model:
python train.py --data forklift_data.yaml --epochs 50 --img 640
To run inference on test images or video streams:
python detect.py --weights best.pt --source path/to/images_or_video
Contributions are welcome! Please submit issues or pull requests for improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for more details.