How I Built This

Architecture Overview

KarlCam pulls images from public webcams and scores them for fog using Gemini and in time a Convolutional Neural Network. It is built on Google Cloud Platform for about $10/month.

Data Flow

  1. 1
    Image Collection: Every half hour a Google Cloud Run job captures images from public webcams around San Francisco and scores them for fog using Gemini.
  2. 2
    Cloud Storage and SQL: Images are stored in Google Cloud Storage buckets and fog scores are stored in a Cloud SQL DB.
  3. 3
    Review: An admin site let's me review the fog scores and correct them if needed.
  4. 4
    Model Training: After enough images are collected from a range of conditions a supervised learning approach will be used to train the Convolutional Neural Network (CNN) and will replace Gemini. This should be cheaper, faster, and more accurate than Gemini but we shall see.
  5. 5
    KarlCam Website: The latest fog scores are displayed here.

Google Cloud Services Used

Cloud Storage

Stores webcam images with automatic lifecycle management

Cloud SQL

PostgreSQL database for metadata and analysis results

Gemini API

AI model for initial training data

Cloud Scheduler

Automates image collection every 30 minutes

Cloud Run

Containerized deployment with auto-scaling. Cheaper than always on containers in Kubernetes because of low volume.

Coming Soon

  • Train CNN: Train and deploy the CNN. Will the CNN beat Gemini? Should individual models be trained for each camera location to account for unique viewing angles, lighting conditions, and dirt on the lens.
  • Add more cameras: Windy has a list of SF cameras, I'll add a few more outside SF and keep looking for others in SF.

KarlCam - Real-time fog tracking for San Francisco