Reweave
Turns a photo of factory fabric scraps into sorted, priced lots that recyclers and makers can claim.
- When
- Jul 2026
- Built with
- Python, FastAPI, OpenCV, SAM, Vision LLMs, SQLAlchemy, React, Vite
- Layers
Touches: Backend, Frontend
- Code
- GitHub


What it does
Fabric offcuts are usually a factory's disposal cost. Reweave turns them into a tracked raw material: a worker photographs a table of scraps. Computer vision finds every piece, identifies its color, fiber and weight, and sorts it into bins. Each bin becomes a priced marketplace lot with its measured impact attached: kilograms kept out of landfill, and CO₂ and water saved.
The scan pipeline
An ArUco marker (or a ruler) in the frame sets the scale. Segment Anything, run on Replicate, produces a mask for each piece. The masks are filtered, then each piece gets color and pattern analysis and a material call from a vision LLM, with fallback across Gemini, Claude and GPT-4o. Weight is estimated from area and fabric type, and pieces are grouped into bins with an annotated sorting plan for the worker.
The end-to-end test runs the whole pipeline on a synthetic 12-piece scene with the SAM and LLM calls stubbed, so it checks the pipeline's logic without paying for model calls.
Pricing
A lot's base price comes entirely from what the camera measured: a per-kilogram rate for each of 10 fabric types, multiplied by factors for purity, color, lot weight and piece count. Unsold lots are marked down when they're read, never in storage: after a 7-day grace period the price decays about 1.5% a day, with a floor at 35% of base. Turnover is rewarded without rewriting history.
Try it
The demo has three portals: factory, buyer and admin, each with its own role-based access. Sign in to the live demo as the demo buyer (buyer@demo.com, password buyer123) to browse the marketplace.