← Back to Dashboards

Case Study

RarezWarez AI Inventory Pipeline

A serverless Google Cloud pipeline that turns raw product photography into ready-to-list eBay inventory — automatically segmented, priced, and described by Gemini AI.

Google Cloud Run Cloud Scheduler PythonPython / Flask Gemini APIGemini AI DatabricksDatabricks Streamlit Power BIPower BI

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.

200+
Photos per Batch
1 min
Scheduler Trigger Interval
900s
Cloud Run Timeout

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.

1

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.

2

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.

3

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.

4

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.

5

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

Back to Dashboards