Inspiration

We're a team of Temple University students, and Philadelphia's rivers and creeks are part of our everyday lives. We run the Schuylkill River Trail, cross the Delaware, and study near Wissahickon and Cobbs Creek. Litter in those waterways is easy to notice but hard to act on. People who see it rarely know who to report it to, and the groups who clean it up have no shared picture of where it builds up. The moment that sparked this project was [e.g. seeing plastic bottles and bags caught along the Schuylkill bank and realizing none of us knew who to tell]. We asked a simple question: what if anyone could snap a photo of trash in the water and instantly know how bad it is, who to contact, and add it to a live map that cleanup crews can act on? That question became Philly Water Watch.

What it does

Philly Water Watch helps Philadelphia residents, community cleanup groups and city teams find and act on visible litter in local waterways by:

  • Detecting trash automatically: users upload a photo and see every piece of floating litter highlighted with bounding boxes by our fine-tuned object detection model, with no manual tagging.
  • Scoring and routing each report: each photo gets an experimental 0–100 visible-litter severity score, and the app recommends who to contact, from volunteer cleanups and Philly311 up to the Philadelphia Water Department and state environmental regulators. A separate "I see oil, chemicals or sewage" flag sends urgent cases straight to emergency contacts. The score describes only the litter visible in the photo; it is not a measure of chemical pollution or water safety.
  • Mapping hotspots: users confirm the location on a map. A heat map shows where litter is concentrated, and a bubble map uses color for average severity and size for the number of reports.
  • Tracking cleanups: a dashboard lets organizations filter reports by severity, sort the worst first, and move each one from reported to scheduled to cleaned, with a full history.
  • Supporting research: every report stores the photo, location, timestamp, detections and score, and can be exported as CSV, JSON, COCO labels or a full ZIP for researchers and future model training.

How we built it

We split the work across our team of three so each of us owned one piece of the product:

  • Machine learning: we fine-tuned a pretrained Faster R-CNN (PyTorch/torchvision) object detector on a labeled floating-litter dataset of 5,490 images and about 17,000 annotated pieces of trash.
  • Frontend: [e.g. React / HTML, CSS, JavaScript] with [e.g. Leaflet] for the upload flow, results screen, maps and cleanup dashboard.
  • Backend: Python with FastAPI handles uploads, scoring, recommendations, map data and status tracking. The detector is pluggable: the same backend can load our Faster R-CNN checkpoint directly, call the model as a separate GPU-hosted service, or run in a mock mode so frontend work never had to wait on training.
  • Data: SQLite plus a photo archive store every report and its full status history. The map endpoints return standard GeoJSON, and photo GPS metadata is read automatically when available.
  • Deployment: we compared the hackathon's GoDaddy option with Render and chose [Render] because [e.g. it deploys straight from our GitHub repo and runs a Python backend on its free tier].

[Teammate 1] trained and tested the Faster R-CNN model, [Teammate 2] built the backend API and data pipeline, and [Teammate 3] designed the user experience and built the frontend. We agreed on a shared API contract early, so all three pieces could be built in parallel.

At its core, the app calculates an experimental visible-litter severity score from the model's detections:

$$ \text{Score} = 60\left(1 - e^{-N_w/5}\right) + 40 \cdot \min\left(1, \frac{C}{0.10}\right) $$

where $N_w$ is the confidence-weighted number of detected items and $C$ is the fraction of the photo covered by litter. The first term rewards how many items there are but levels off, so a handful of pieces already counts as significant. The second rewards how much of the scene the trash covers. Scores map to five severity levels (none, low, moderate, high, severe), and each level points to the right authority to contact.

Challenges we ran into

  • Training without a GPU: our laptops had no dedicated graphics cards, and training on thousands of 1920×1080 images on a laptop processor would have taken the whole hackathon. We moved training to a cloud GPU and designed the backend so the model could be plugged in whenever it was ready.
  • Model hand-off between teammates: the model was being trained while the backend was being built, so we didn't know its final format. We defined one detection contract that accepts several checkpoint formats and bounding-box formats. When the model was ready, connecting it meant dropping in a file instead of rewriting code.
  • A 2.2 GB dataset versus GitHub: our first commit of the dataset blew past GitHub's large-file limits and blocked pushes. We rewrote our local history to remove it, kept data out of the repo, and shared it separately.
  • Honest scoring: it was tempting to call the score a "pollution" or "water quality" rating, but a photo can't show chemicals or bacteria. We deliberately framed it as an experimental visible-litter score, put that disclaimer on every result, and gave hazard reports their own escalation path that never changes the score.
  • Time pressure: with only [number] hours, we cut [e.g. user accounts and multi-class trash types] and focused on the core loop of photo → detection → score → map, so we could ship something that works end to end.

Accomplishments that we're proud of

  • Shipped a working end-to-end version in [number] hours, from photo upload to detection, scoring, map and cleanup tracking
  • Fine-tuned a Faster R-CNN detector on 5,490 labeled images of floating litter
  • Built a backend with 38 automated tests covering scoring, recommendations, maps, status tracking and every way of connecting the model
  • Designed data that's useful beyond the hackathon: every report is exportable in formats researchers and future models can use directly

What we learned

  • Technical: how to fine-tune an object detection model and serve it behind an API, how to split a machine-learning app so the model, backend and frontend can be built at the same time, and how to turn raw detections into map-ready data.
  • Product: building for a real user means prioritizing the one feature that matters most over five that are half finished. For us, that was making a report take seconds and point to a clear next step. We also learned how much careful wording matters when a number could be mistaken for a safety rating.
  • Teamwork: agreeing on a shared contract up front (what the model returns, what the API sends the frontend) let three people work in parallel without blocking each other, and made fast decisions easier because everyone knew where their piece fit.

What's next for Philly Water Watch

  • Accounts and verification: logins for cleanup organizations so only trusted teams can mark reports cleaned, plus a way for residents to follow their own reports.
  • A better model: separate trash categories (bottles, bags, cans, tires) and retraining on photos submitted through the app, using the COCO export we already built.
  • City partnerships: sending reports directly to Philly311 and sharing hotspot data with watershed groups and the Philadelphia Water Department to plan cleanups.

Built With

Share this project:

Updates

Submission history