The problem
The project explored using image recognition to identify unfamiliar warehouse tools and materials. The motivation was to help people recognize potentially useful items rather than discard them simply because their identity or purpose was unclear.
Explanatory model of inspected source
My contribution: image to ranked categories
Locate a region, then classify its contents. These controls explain the code; they do not run inference or display a recorded prediction.
Schematic only — no inference or recorded prediction
One region, chosen by area—not confidence.
- Largest cropOne selected region
- ResizePrepare classifier input
- Custom CNNScore categories
- Ranked categoriesUp to five; no predictions shown
Selected branch: detected regions
Read an image, not a sample shown here
The script gathers image files recursively from IMAGES_ROOT. Folder names provide class labels for evaluation. No input photo or same-image prediction trace is retained in the reviewed archive.
Inspected source: test.py:20–26, 45–47, 69–71, 110
Contribution & scope
- Developed the YOLO_test detector-to-classifier prototype and evaluation workflow as my contribution to the team project.
- Implemented a PyTorch CNN training loop with GPU support, mixed precision, early stopping, and best-model checkpoint saving.
- Added CPU fallback and Top-1/Top-5 evaluation reporting.
How it fits together
- YOLOv8 locates candidate regions. The largest detected region by area—not the highest-confidence detection—is selected for classification.
- The selected crop or whole-image fallback is resized and passed to the same custom CNN, whose scores produce up to five ranked categories.
- A separate evaluation script compares predictions with directory-based class labels and saves a report and chart.
What I learned
- Detection and classification are different tasks; using a pretrained detector does not mean training that detector from scratch.
- Selecting one largest region keeps the pipeline simple, but assumes that region contains the item we want to classify.
- A saved accuracy report must be tied to its evaluation population. The script traverses the configured image directory rather than explicitly selecting an independent held-out test set.
- Related team experiments should not be merged into the same accuracy claim or attributed entirely to one contributor.
Outcome & boundaries
- Scope: Team project / YOLO_test contribution
- Evaluation boundary: Historical report available; unseen-data performance has not been established by the reviewed evaluation script.