Computer vision · Port sustainability · Open source

Point a camera at waste.
Get the right recycling stream.

BluePort AI classifies photos of waste into six streams used in port environmental management. A frozen CLIP encoder and a tiny trained head do the work, so it runs on any laptop and is easy to audit.

Try it in the browser View the code
94.6%cross-validated accuracy
11,451labelled training images
6waste streams
3,078trained parameters

Try it

Drop a photo, paste one, or pick an example. The model runs inside your browser: the first use downloads it once (about 90 MB, then cached) and no photo is ever uploaded.

Drop a photo here
or click to choose · or paste from the clipboard
plastic bag aluminium can glass bottle newspaper USB cable strawberries
Model not loaded yet. It downloads when you pick or drop a photo, or .

Runs on CLIP ViT-B/32 exported to ONNX (Transformers.js) with the same 6-class head as the evaluation below. Quantised for the browser, so probabilities can differ by a few points from the Python version. A copy of the demo also lives on Hugging Face.

Results

Evaluated with 5-fold stratified cross-validation on all 11,451 images: every image is predicted by a model that never saw it during training.

StreamImagesPrecisionRecallF1
E-waste2,5430.9840.9820.983
Metal2,2470.9530.9490.951
Paper / cardboard2,2370.9380.9540.946
Plastic2,2170.9180.9080.913
Glass2,0350.9440.9310.937
Organic1720.8150.9480.876
All11,451accuracy 0.946 · balanced accuracy 0.945 · macro F1 0.935
Row-normalised confusion matrix of the six classes

Most confusion is between plastic, paper and glass containers of similar shape. Organic is the smallest class; class weighting lifts its recall to 95%.

How it works

No fine-tuning of a large model. CLIP turns the photo into a 512-number embedding; a logistic-regression head trained on that embedding assigns the stream. Training takes seconds and the head is 16 KB.

Photo→CLIP ViT-B/32 encoder (frozen)→512-d embedding→Linear probe, 6 classes→Stream + confidence
Honest metrics

Held-out evaluation

The number on this page is cross-validated. The first version reported 95.2% measured on training images; the honest figure is 94.6%, and it is the one we quote.

Auditable

3,078 parameters

Everything that was trained fits in one small matrix you can inspect. The encoder is a public, documented model.

Practical

Runs anywhere

Browser demo on a free Space, or an offline Telegram bot on a laptop where photos never leave the machine.

Limitation

Clean-item photos

Training images are mostly single items on plain backgrounds. Mixed, dirty or partially hidden port waste scores lower; predictions under 50% are flagged.

Limitation

Six streams only

Wood, textiles, oily rags and hazardous cargo residues are not covered yet.

Origin

From river to port

Started in the Omdena Ganges River plastic-interceptor challenge, then adapted to port waste streams within research on port sustainability at UFMA, Brazil.

Six waste streams

Aligned with port environmental management practice and the segregation required for ship-generated waste under MARPOL Annex V.

Plastic

Bottles, bags, packaging, film. Never to be discharged at sea.

Paper and cardboard

Boxes, documents, packaging. Recyclable when clean and dry.

Glass

Bottles and jars. Keep whole where possible; broken glass in a rigid container.

Metal

Cans, cables, scrap. Segregated metal stream; MARPOL Annex V for ship-generated scrap.

Organic

Food waste and plant matter. Compost or organic stream; strict discharge rules at sea.

E-waste

Boards, cables, devices. Licensed WEEE handler, never general waste.

Code, weights and citation

Everything needed to reproduce the results is public: feature extraction, cross-validation, final weights and the demo app.

blueport-ai2 on GitHub

Training scripts, evaluation report, Telegram bot, MIT licence.

Hugging Face Space

The live demo with the model card and metrics.

Telegram bot

Offline field version. Runs when the host machine is on; see the repository to run your own.