You are browsing as a guest. Sign up (or log in) to start making projects!

8h 16m 5s logged

MIRA Day 9: YOLO11 Migration, INT8 Issues, and Dataset Analysis

Over the last few days, I focused on improving the project structure, simplifying the codebase, and testing different approaches for the detection pipeline.

I made around 15 commits, added roughly 2,200 lines of code, and removed around 1,000 lines that were duplicated or no longer needed.

The main changes were migrating from YOLOv8n to YOLO11n, creating an automated benchmark script, and investigating why some dataset combinations performed worse than expected.

YOLO11 and Dataset Experiments

I moved from YOLOv8n to YOLO11n because it is better suited for edge deployment while keeping the model lightweight. Since MIRA is intended to run on limited hardware, inference speed and efficiency are important.

To test different training setups, I trained four model variants using Kaggle T4 GPUs. I compared several datasets:

  • TACO: Outdoor litter images.
  • TrashNet: Clean recycling images from controlled environments.
  • Roboflow Trash Detection: Waste images with bounding box annotations.
  • WaRP: Industrial recycling images from conveyor belt environments.

The best results came from combining TACO, TrashNet, and Roboflow. This combination performed better during live camera tests because it contained both clean object images and more realistic trash scenarios.

Why WaRP Reduced Performance

Adding WaRP unexpectedly reduced the performance of my general “Trash” class.

The reason was a dataset imbalance. WaRP contains many detailed recycling categories like plastic, glass, metal, and cardboard, but it has very few examples matching my general trash category.

After mapping WaRP’s classes into my five target classes, most additional training data was added to recyclable categories. This caused the model to become more focused on plastic, paper, and glass while becoming less reliable at detecting mixed waste.

This showed that more training data does not always mean better results. The distribution and relevance of the data are equally important.

INT8 Quantization Problem

While testing my INT8 TFLite model, I noticed that the detection rate was almost zero. The model itself was working, but my confidence filtering removed valid detections.

After INT8 conversion, the output confidence values changed compared to the original model. Some detections that previously passed a 0.50 confidence threshold were now below it.

Because my pipeline still used the old threshold, valid detections were discarded.

I updated the benchmark and live detector to automatically use a lower confidence threshold for INT8 models. After this change, detections worked correctly again.

Code Cleanup and Fixes

I found several duplicated parts in the project, especially multiple versions of the bounding box drawing logic. I centralized these functions and cleaned up configuration and path handling.

I also fixed two problems in the live detection system:

  1. Tracker dependency issue:
    The detector previously used BoT-SORT by default, which caused problems if the required package was missing. I changed the fallback system to use BYTETrack first.

  2. Double confidence filtering:
    Confidence filtering was happening both during prediction and again during visualization. I moved this into one centralized post-processing step to avoid removing valid detections.

Repository Cleanup

The project folder has grown to around 17 GB because of duplicated datasets, training results, logs, and model checkpoints.

Before pushing everything to GitHub, I need to clean the Git history, improve the .gitignore, and remove unnecessary files. The goal is to reduce the repository size to below 500 MB.

Next Steps

  • Clean the repository and remove large unused files.
  • Train the final model with the improved dataset combination.
  • Generate evaluation graphs and confusion matrices for the final documentation.
0
1

Comments 0

No comments yet. Be the first!