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 codeDrop 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.
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.
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.
| Stream | Images | Precision | Recall | F1 |
|---|---|---|---|---|
| E-waste | 2,543 | 0.984 | 0.982 | 0.983 |
| Metal | 2,247 | 0.953 | 0.949 | 0.951 |
| Paper / cardboard | 2,237 | 0.938 | 0.954 | 0.946 |
| Plastic | 2,217 | 0.918 | 0.908 | 0.913 |
| Glass | 2,035 | 0.944 | 0.931 | 0.937 |
| Organic | 172 | 0.815 | 0.948 | 0.876 |
| All | 11,451 | accuracy 0.946 · balanced accuracy 0.945 · macro F1 0.935 | ||
Most confusion is between plastic, paper and glass containers of similar shape. Organic is the smallest class; class weighting lifts its recall to 95%.
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.
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.
Everything that was trained fits in one small matrix you can inspect. The encoder is a public, documented model.
Browser demo on a free Space, or an offline Telegram bot on a laptop where photos never leave the machine.
Training images are mostly single items on plain backgrounds. Mixed, dirty or partially hidden port waste scores lower; predictions under 50% are flagged.
Wood, textiles, oily rags and hazardous cargo residues are not covered yet.
Started in the Omdena Ganges River plastic-interceptor challenge, then adapted to port waste streams within research on port sustainability at UFMA, Brazil.
Aligned with port environmental management practice and the segregation required for ship-generated waste under MARPOL Annex V.
Bottles, bags, packaging, film. Never to be discharged at sea.
Boxes, documents, packaging. Recyclable when clean and dry.
Bottles and jars. Keep whole where possible; broken glass in a rigid container.
Cans, cables, scrap. Segregated metal stream; MARPOL Annex V for ship-generated scrap.
Food waste and plant matter. Compost or organic stream; strict discharge rules at sea.
Boards, cables, devices. Licensed WEEE handler, never general waste.
Everything needed to reproduce the results is public: feature extraction, cross-validation, final weights and the demo app.
Training scripts, evaluation report, Telegram bot, MIT licence.
The live demo with the model card and metrics.
Offline field version. Runs when the host machine is on; see the repository to run your own.