Design an automated privacy blurring system (Google Street View)

    A privacy-blurring pipeline (Google Street View) detects and blurs faces and license plates across billions of panoramas. It's a high-throughput batch image-processing system where recall is paramount — a missed face is a privacy violation.

    AI & Machine Learning, 6 components, about 30 min

    1. Scope

    In scope

    • • Detect faces + plates
    • • Blur detections
    • • Process at massive scale
    • • Quality control

    Out of scope

    • • Capture/camera pipeline
    • • Map stitching
    • • Detection model training

    2. Functional requirements

    Must have

    • • Detect all faces/plates (high recall)
    • • Blur detected regions
    • • Process billions of images
    • • Sample for QA

    Nice to have

    • • Re-processing on model upgrade
    • • Manual blur requests
    • • Region-specific policies

    3. Non-functional requirements

    RecallExtremely high (privacy)
    ThroughputBillions of images
    PatternBatch / offline
    AuditabilityTrack what was blurred

    4. Back-of-envelope estimation

    Assumptions

    • • Billions of panoramas
    • • Tiled for parallel detection
    • • Thousands of workers
    • • Sampled QA

    Derived numbers

    Worker fleetThousands of nodes
    Detections/imageVariable (urban ≫ rural)
    QA sampleSmall %, human-reviewed

    5. API design

    BATCHprocess(panorama)

    Detect → blur → store processed image

    6. High-level design

    What each box in the reference diagram is responsible for:

    Work Orchestrator — Distributes panoramas across workers.
    Object Detector — Fast R-CNN/SSD detects faces + plates per tile.
    Blurring Engine — Applies Gaussian blur to detected boxes.
    Raw / Processed S3 — Input and output image stores.
    QA Dashboard — Human review of sampled outputs.

    7. Data model

    S3: panorama_id → raw + processed + detection boxes

    8. Deep dives

    Recall over precision

    The cost asymmetry is extreme: a false negative (missed face) is a privacy breach, while a false positive (blurring a poster) is harmless. So the detector is tuned for very high recall — over-blur rather than under-blur — accepting some unnecessary blurring as the safe trade-off.

    Tiling + distributed processing

    Panoramas are huge. Split each into tiles processed in parallel across thousands of workers; detections are mapped back to panorama coordinates. The orchestrator handles work distribution, retries, and tracking which images are done — a classic embarrassingly-parallel batch pipeline.

    Blurring

    For each detected bounding box, apply a localized Gaussian blur (irreversible) so the original face/plate can't be recovered from the published image. Keep the raw image access-controlled and separate from the public processed output.

    Quality control & re-processing

    Sample processed images to human reviewers to measure miss rate and catch systematic failures. When the detector improves, re-run the pipeline over historical imagery to blur previously-missed objects.

    9. Bottlenecks

    • Massive image volume → tiling + thousands of workers
    • Missed detections → high-recall tuning + QA sampling
    • Re-processing cost → only on model upgrades

    10. Trade-offs

    Recall versus precision

    Choose: Tune detectors for very high recall on faces and plates and accept over-blurring.

    Instead of: Balanced thresholds: fewer false blurs, more missed faces.

    A missed face is a privacy violation; an extra blur is cosmetic.

    Batch pipeline

    Choose: Offline batch over tiles with a distributed job framework, results written before publishing.

    Instead of: Blur on the fly at serve time: repeated compute on every view.

    Imagery is captured once and served many times.

    Handling user requests to blur

    Choose: A request flow that permanently blurs a region in all derived tiles.

    Instead of: Overlay at serve time: originals remain exposed.

    Requests are about permanence.

    11. Failure modes

    Detector misses faces at panorama seams

    Unblurred faces published.

    Mitigation: Overlapping tiles and detection in projected views, plus sampled QA.

    Pipeline partially fails

    Some tiles unprocessed.

    Mitigation: Publishing is gated on every tile of a panorama having a completed blur record.

    Raw imagery accessed internally

    Privacy breach.

    Mitigation: Strict access control and auditing on raw data, kept in a locked store because re-processing and blur requests need it; delete it only where the law requires, and re-process from the blurred copy there.

    12. What interviewers probe

    Answer each one yourself before opening it.

    How do you measure recall on billions of images?Show a strong answer

    Human-labelled stratified samples (urban, rural, night) and recall estimates with confidence intervals.

    How do you parallelize?Show a strong answer

    Tile panoramas, distribute tiles across workers, merge detections across tile borders.

    What about reflections and partial faces?Show a strong answer

    Train on hard examples and use lower thresholds; recall is the priority.

    How do you reprocess with a better model?Show a strong answer

    Re-run in the background and union blurs (never un-blur automatically).

    Sign in to track this guide in your curriculum progress.