The Problem
Listing secondhand inventory on eBay is repetitive, manual work: sorting hundreds of product photos, writing an accurate title and description for each item, estimating a fair price, and tracking every listing through to sale. This pipeline was built to remove that manual step almost entirely — turning a folder of raw photos into structured, ready-to-post listings with no data entry required.
How the Pipeline Works
Every stage of this pipeline runs without manual intervention, from the moment a photo batch hits cloud storage to the moment a Power BI report reflects the sale.
Extraction
Batches of up to 200+ raw product photos sync to a Google Cloud Storage bucket. Individual items are separated during photography with a simple "blackout" photo — the lens covered by hand between items. A Cloud Scheduler job triggers a processing run every minute.
Sorting & Segmentation
A Python Flask app on Cloud Run sorts files strictly by numerical timestamp, bypassing naming quirks like camera "Night Mode" prefixes that would break a naive alphabetical sort. It then scans for the blackout divider photos — flagging any frame with average brightness below a set threshold — to slice the batch into individual items.
AI Analysis & Image Processing
Up to 4 photos per item are sent to the Gemini API with instructions to return a strict JSON payload: SEO title (including exact part numbers or sizes), condition, description, estimated value, and estimated shipping. In parallel, the rembg library strips the background from the primary photo.
Loading & Warehousing
Processed images and listing JSON are zipped and pushed to an output bucket, then loaded into a Databricks SQL warehouse under a single wide ebay.inventory_tracker table — including sale-tracking fields like is_sold, sold_price, and sold_at.
Tooling & Business Intelligence
A Streamlit CRUD app serves as the warehouse terminal for marking items sold and recording final sale prices. Power BI connects directly to Databricks to track inventory velocity (days from staging to sale) and compare the AI's estimated value against actual market performance.
Engineering safeguards: Cloud Run is provisioned with 2GiB of memory and deployed behind Gunicorn with an explicit 900-second (15-minute) timeout — tuned specifically so a 200+ photo batch can finish processing without the server dropping the connection mid-run.
What This Demonstrates
- Serverless Architecture Design: Google Cloud Storage, Cloud Run, and Cloud Scheduler working together as an event-driven, self-triggering pipeline with no servers to manage.
- Applied Computer Vision: Using image-brightness analysis to physically segment a photo stream into items — a low-tech capture technique paired with a precise processing rule.
- Prompt Engineering for Structured Output: Directing a multimodal LLM to return strict, schema-consistent JSON suitable for direct loading into a warehouse table.
- Cloud Data Warehousing: Designing a wide transactional Databricks SQL table that supports both operational updates (via Streamlit) and analytical queries (via Power BI).
- Full-Stack Internal Tooling: Building the Streamlit terminal that lets a non-technical operator manage inventory state without touching SQL directly.
Databricks
Power BI