jonalvarez01's picture
Update README.md
8ecc39e verified
---
language:
- en
base_model:
- Ultralytics/YOLOv8
datasets:
- jonalvarez01/reto2g2-dataset
---
# Mobile and Hat Detection Model - YOLOv8
This repository contains a YOLOv8 model trained to detect mobile phones and hats in images.
## Model Description
The model was trained using YOLOv8n architecture to detect two classes:
- Mobile phones
- Hats
### Training Details
- Base model: YOLOv8n
- Training epochs: 100
- Hardware: CUDA-enabled GPU
- Framework: Ultralytics YOLO
## Usage
```python
from ultralytics import YOLO
# Load the model
model = YOLO('path_to_model.pt')
# Perform detection on an image
results = model('path_to_image.jpg')
```
## Training Code
The model was trained using the following script:
```python
from ultralytics import YOLO
# Load a model
model = YOLO("yolov8n.pt").to('cuda')
# Train the model
results = model.train(data="data.yaml", epochs=100)
```
## Dataset
The model was trained on a custom dataset containing images of mobile phones and caps. The dataset was structured following YOLO format requirements.
## Model Performance Metrics
The model's performance was evaluated over 100 epochs of training. Here are the key metrics:
<img src="metrics/results.png" width="600" />
### Confusion Matrix
<img src="metrics/confusion_matrix.png" width="400" />
### Precision-Recall Curve
<img src="metrics/P_curve.png" width="400" />
<img src="metrics/R_curve.png" width="400" />
### F1-Score Curve
<img src="metrics/F1_curve.png" width="400" />