Skip to content

The project implements a YOLOv8 model to detect forensic evidence, including Blood, Handguns, Illegal Substances, Rifles, and Knives, from digital electronic devices (media). It aids investigators by speeding up forensic analysis and ensuring high accuracy along with maintaining integrity during crime investigations.

Notifications You must be signed in to change notification settings

Yaz070/Forensic_Detection_Model

Repository files navigation

Forensic Detection Model

This project implements a YOLO (You Only Look Once) model to detect evidence from digital media 🔍, focusing on forensic analysis 🕵️‍♂️ and crime scene investigation 🚔. The model is trained to detect key types of physical evidence Blood, Handguns, Illegal Substances, Rifles, and Knives (🩸🔫💊🔪) that could be found in media, aiding investigators in identifying critical elements in real-time ⚡. The main goal of the model was to speed up the process of detection along with achieve high accuracy.

Dataset Stage 🗂️:

We ensured that our dataset consisted of high quality and diverse images to train the model effectively. The images were collected to meet the necessary standards for clarity and variation, ensuring that the model could generalize well across different environments and scenarios.

To streamline the preparation process, we used Roboflow for image labeling, augmentation, and dataset splitting. This platform enabled us to efficiently label the images and split them into training, validation, and testing sets. In total, approximately 28,000 images were used across the different versions of the dataset.

Training Stage

Before starting the training process, we conducted a thorough analysis to determine the best optimizer for our model. After evaluating several options, we concluded that Stochastic Gradient Descent (SGD) was the most suitable choice, offering improved generalization and stability.

1️⃣ Initial Training:

The first stage of training involved the YOLOv8l model trained on Dataset_V1, which consisted of approximately 27,721 images over the course of 100 epochs. While the model showed promising improvements in performance metrics, the results did not fully meet our expected goals, particularly in detecting certain evidence classes.

2️⃣ Retraining:

To enhance accuracy in specific classes, we retrained the model using a refined dataset, Dataset_V2, which contained 421 images. The retraining was conducted over a reduced period of 15 epochs to fine-tune the model's performance. This smaller, focused dataset allowed us to target and improve the detection of critical evidence classes. We also incorporated early stopping to prevent overfitting and employed data augmentation techniques to improve the model’s robustness.

confusion matrix

results results-2

🔸 Training Loss: Both box loss and class loss decreased significantly during training. After fine-tuning the model with Dataset_V2 (15 epochs), the losses showed even faster convergence compared to the initial training on Dataset_V1 (100 epochs). This demonstrates that the model became more efficient at classifying objects after fine-tuning.

🔸 Validation Loss: Validation loss also dropped more rapidly after fine-tuning with Dataset_V2, indicating improved generalization on unseen data. The fine-tuned model became more accurate in predicting both object locations (box loss) and classifications (class loss) within fewer epochs, thanks to the focused adjustment on specific classes.

🔸 Key Insight: Fine-tuning with Dataset_V2 helped the model achieve faster convergence and better detection accuracy for certain classes. This refinement allowed the model to perform more efficiently.

Model Predictions on Real Images 🎯

After training and fine-tuning the model, we tested it on real-world forensic images to evaluate its performance in detecting evidence in real scenarios. Below are some examples showcasing the model's predictions:

1️⃣ Test Image

Blood

Prediction: Blood detected 🩸

2️⃣ Test Image

Illegal Substances detected

Prediction: Illegal Substances detected 💊

3️⃣ Test Image

Illegal Substances detected

Prediction: Rifle 🪖

4️⃣ Test Image

Illegal Substances detected

Prediction: Handgun 🔫

5️⃣ Test Image

Illegal Substances detected

Prediction: Knife 🔪

6️⃣ Test Image

Illegal Substances detected

Prediction: Multiple Predictions 🔫🔪

Test Video

Illegal Substances detected

Prediction: Handgun 🔫

About

The project implements a YOLOv8 model to detect forensic evidence, including Blood, Handguns, Illegal Substances, Rifles, and Knives, from digital electronic devices (media). It aids investigators by speeding up forensic analysis and ensuring high accuracy along with maintaining integrity during crime investigations.

Topics

Resources

Stars

Watchers

Forks