WasteWise Waste scanner Upload image

Two-stage detection pipeline

Scan waste.

YOLO26n finds every object, a ConvNeXt classifier verifies the material, and every number on this site survives a leakage-audited test set.

93.77%clean-test accuracy
7material classes
81kboxes trained on
Live demo · simulated STANDBY
Demo: floating plastic bottles
Decision Analyzing…

Live scanner

Upload a photo or pick a sample. The scan follows the exact pipeline order — localize, crop, verify, fuse, decide.

  1. S1Upload
  2. S2Localize
  3. S3Crop
  4. S4Verify
  5. S5Fuse
  6. S6Decide
No image selected Choose a sample below or upload your own photo.
Decision No scan yet
Confidence --
Bin route Waiting
Possible material
--
Waste state
Not scanned
Context
--
Latency
--
Class scores 7 classes
How it works Six steps, S1 to S6

Upload, localize, crop, verify, fuse, decide — with the full methodology diagram.

Evidence 93.77% — and how it was audited

Every metric is tied to a report in the repository, measured after leakage quarantine.

Limits What still breaks, honestly

Domain shift, tiny objects, and the conservative waste-state gate.

Methodology

Localize first, classify second.

Stage 1 finds objects — what YOLO is good at. Stage 2 verifies the material of each crop — what a dedicated classifier is good at — and filters false alarms.

S1
Upload image

A JPG, PNG, or WEBP photo of waste. Saved scans stay in browser history for review and hard-case collection.

S2
Stage 1 — YOLO26n localization

YOLO26n proposes a box around every candidate object. 100-epoch retrain, later hard-negative fine-tuned for field small-object recall: 70.9% mAP50, 77.8% precision on clean validation.

S3
Crop extraction & size filter

Each kept box is cropped with 10 px padding; boxes smaller than 24×24 px are rejected before classification.

S4
Stage 2 — crop verification

A ConvNeXt-Tiny + 637-handcrafted-feature classifier re-checks every crop across 7 classes, including a Background veto. Fine-tuned on the detector's own crops so training matches production.

S5
Score fusion & context prior

Per-box score fuses detector and classifier confidences, then a scene-context prior adjusts the class scores.

S6
Decision gate & bin routing

Class thresholds and the waste-state gate pick the final decision. Uncertain detections route to review instead of a bin — conservative by design.

Methodology workflow diagram S1 → S6
Two-stage localization-first pipeline workflow diagram

Audited results

Every number below is tied to a report in the repository.

The evaluation sets were audited with perceptual hashing; duplicated eval images were quarantined before these metrics were measured.

Classifier accuracy, clean test 93.77% ConvNeXt + 637-feature classifier, 2,151 quarantined-test images
Detector mAP50, clean val 70.9% YOLO26n, hard-negative fine-tuned, quarantined split
Eval leakage found & removed 2,406 43% of the old classifier test set
Cross-domain accuracy 39.8% Studio-trained features on real-world images
Evaluation audit completed 2026-07-02

We found our own evaluation bug and corrected the numbers.

The merged classifier dataset ingests the same photos through different sources. Perceptual hashing found 2,406 leaked test images (43%) in an earlier EfficientNetB0 classifier's evaluation set, correcting its accuracy from an inflated 94.30% to an honest 91.77%. The same audit method, applied to the deployed ConvNeXt's dataset, found a smaller leak and is the basis for the 93.77% figure above.

runs/audits/MODEL_RISK_AUDIT.md audit trail
Deployment truth live model active

The API serves the real classifier and YOLO26n localizer.

The classifier is fine-tuned on the detector's own crops: accuracy on real detector output rose from 76.9% to 88.9% without losing clean-crop accuracy. When the API is offline the page says so instead of pretending.

Detector precision 77.8%

Clean validation split. Tunable via confidence threshold.

Detector recall 62.6%

Down slightly from 65.0% studio recall after a hard-negative fine-tune that traded it for +16 points of field small-object recall (see Limits).

Detector mAP50-95 50.0%

Hard-negative mining checkpoint, promoted to the live localizer.

Classical ML baseline explainable evidence
73.8%

ExtraTrees on 637 handcrafted features per crop (8 spatial, 9 FFT, 44 color, 576 HOG). Kept for comparison and explainability evidence beside the deep pipeline.

Saved scans

Recent scans

Restore a saved scan to bring back the image, result, confidence, route, and boxes. History lives in your browser.

0 saved

Honesty section

Measured limits, and what was done about them.

Domain shift Partly fixed, partly open

Fixed: the classifier was fine-tuned on the detector's own crops, lifting production-distribution accuracy from 76.9% to 88.9%. The detector was re-tuned for the field domain too: lowering the confidence threshold and hard-negative mining on new field data (PlastOPol) lifted held-out field small-object recall from 38.6% to 54.7%, at a small cost to studio mAP50 (72.1% → 70.9%). Open: on fully unseen capture sessions the detector still drops to 0.444 mAP50; the gap is narrowing with new data, not fully closed.

Tiny objects Resolution ruled out; new data confirmed as the lever

A 960px training run was evaluated: validation unchanged, unseen-batch recall up 3.9 points — not enough to chase. A later hard-negative mining fine-tune on new field data confirmed the real lever: small-object recall on that held-out domain rose 38.6% to 54.7% from new data alone, no resolution or architecture change. Small objects remain the main source of misses; training-data diversity is the binding constraint.

Waste-state decision Conservative by design

The waste / not-waste / review decision applies conservative rules on top of the verified material class; uncertain detections route to review instead of a bin.

Method note — metrics on this site come from the leakage-audited evaluation sets. The audit scripts, quarantine manifest, and reports live in the project repository.

See the evidence

Final Year Project

WasteWise: waste detection and classification.

A Final Year Project for automated waste understanding. A two-stage deep-learning pipeline detects and classifies waste in real photos, backed by a classical machine-learning branch for explainable evidence. Every headline metric survives a leakage-audited evaluation set.

Live deployment

The real model, served publicly

The trained YOLO26n localizer and ConvNeXt classifier run behind a public API on Hugging Face Spaces.

khoaphung-wastewise-ai.hf.space ↗
Repository evidence

Where each claim lives

runs/audits/leakage audit trail
docs/01_final_report/FAILURES_AND_FIXES.mdfailure log
models/trained/promoted checkpoints
2pipeline stages
7material classes
637handcrafted features
80,993detector training boxes
Updated