How shubhank-saxena/pothole-detection works
Project type and purpose
• This is an end-to-end pothole detection system combining:
• A mobile front-end (Apache Cordova Android/iOS app)
• A lightweight ingestion server (Server 1)
• A high-compute server running Mask RCNN (Server 2)
• Google Cloud Storage (GCS) bucket for file sharing
• Google Maps for visualization
• Purpose: collect geo-tagged road images from users, run Mask RCNN to detect potholes, encode results in filenames, and plot them on Google Maps.
File structure
• Root: Jupyter notebooks (development & demo), custom.py (train/infer CLI), search_bing_api.py (data-download helper).
• test_dataset, Download_data: raw/test data.
• cloud_files_gcp: likely scripts to push/pull from GCS.
• No database—state is encoded in file names.
• Cron jobs implied from README for nightly batch processing.
Pull architecture notes from README
• Two GCP VMs:
• VM1 (ingestion) gathers/uploads every 24 hr
• VM2 (compute) runs Mask RCNN once per day via cron
• Single GCS bucket shared between VMs
• Mobile app → VM1 via API → GCS → VM2 batch → GCS → Google Maps
Main components and their interactions
a. Mobile Application (Apache Cordova)
• Captures photo + GPS → uploads via REST API to Ingestion Server
b. Ingestion Server (Server 1)
• Receives images (filename = latitude‐longitude.jpg)
• Compresses & stores in GCS bucket
c. GCS Bucket
• Shared filesystem for both servers
• Raw images and processed images
d. Compute Server (Server 2)
• Cron‐scheduled job
• Pulls raw images from GCS
• Runs Mask RCNN on each image (via custom.py)
• Renames output with pothole count & size and GPS:
[count]-[size]-[lat]-[lon].jpg
• Writes results back to GCS
e. Google Maps API
• Reads processed filenames from GCS
f. Training Environment (optional component)
• Local or cloud VM running custom.py train ...
• Uses train/val dataset inside customImages
• Outputs weights (.h5) to GCS or logs folder
Architectural patterns and design principles
• Microservices style: ingestion vs. compute decoupled via shared storage
• Batch processing for compute‐heavy ML tasks (daily cron)
• No relational DB—metadata encoded in filenames
• Cloud‐native: uses GCS as a datastore, GCP VMs for compute
• RESTful API for mobile→server communication