DEMO of the project: https://youtu.be/sXNZxZoMnJQ?si=AmSlUtXPQIIc7Nx6
For the project, I used the Self-Driving Cars Image Dataset(https://universe.roboflow.com/selfdriving-car-qtywx/self-driving-cars-lfjou/dataset/6), a comprehensive collection of images featuring various traffic signs in diverse conditions. This dataset includes thousands of images, each annotated with the type and location of traffic signs, making it ideal for training our object detection model.
1. Data Preparation: The dataset was split into training, validation, and test sets. Each image was paired with annotation files in YOLO format, specifying the class and bounding box coordinates for each traffic sign.
2. Model Initialization: Started with the YOLOv8n model, pre-trained on the COCO dataset. This model was chosen for its balance between speed and accuracy.
3. Training Configuration: Modified the model to detect the specific classes in our dataset. The data.yaml
file was configured to point to our training and validation data, with the number of classes set to match the traffic signs.
4. Fine-tuning: The model was trained for 100 epochs with an image size of 416x416 pixels, using an optimized learning rate and batch size. During training, I monitored performance metrics such as precision, recall, and mean Average Precision (mAP).
5. Evaluation: Post-training, the model was evaluated on the test set, demonstrating its ability to accurately detect and classify traffic signs in various conditions.
1. Training (Fine-Tuning)Forward Pass: The model processes input images to make predictions. It tries to identify and locate objects (traffic signs) in each image.
2. Loss Calculation: The model calculates how far off its predictions are from the actual labels (ground truth).
The loss has three parts:
Localization Loss: Measures errors in predicting the exact positions of the bounding boxes.
Confidence Loss: Measures how confident the model is that an object is present.
Loss: Measures errors in predicting the correct class of the object.
3. Backward Pass: The model calculates how to adjust its internal settings (parameters) to reduce the loss. This step involves computing gradients, which are like directions on how to adjust parameters to improve predictions.
4. Parameter Update: The model updates its parameters using an optimization algorithm (like Adam optimizer) based on the computed gradients. This is like fine-tuning the settings to improve performance. Hyperparameters Learning Rate: Determines how much to adjust the model's parameters during training. Too high can cause instability, and too low can make training slow.
5. Batch Size: Number of images processed at once. Larger batches can be more stable but require more memory.
6. Number of Epochs: Number of times the entire training dataset is passed through the model. More epochs mean more training but can lead to overfitting if too many.
TEST DATASET
REAL LIFE SITUATION