Dress2Draft

Inspiration

The garment industry and custom tailoring often rely on manual, time-consuming, and error-prone measurement processes. We realized there was a massive disconnect between visual inspiration—a simple photo of a dress—and the precise, actionable specifications needed to draft a pattern. We wanted to build a bridge between modern computer vision and fashion design, empowering designers, manufacturers, and hobbyists to instantly digitize garments.

What it does

Dress2Draft is an intelligent garment specification plotter. Users simply upload an image of a garment, and the system automatically processes the image through a multi-stage AI pipeline to classify the garment, segment it from its background, and identify critical landmark points. It then overlays these visual landmarks onto a standardized A-J by 1-10 reference grid, returning derived measurements and coordinates that give pattern makers instant, usable data to draft their designs.

How we built it

We initially experimented with a basic OpenCV approach to process images, but recognizing its brittleness with real-world lighting and diverse backgrounds, we evolved to a powerful end-to-end AI architecture utilizing the GarmentIQ tailor pipeline.

Our intelligent pipeline operates in five cascading stages:

  1. Classification: We use a fine-tuned lightweight vision transformer (TinyViT) to instantly categorize the garment type.
  2. Segmentation: To extract a pristine silhouette regardless of chaotic backgrounds, we run advanced background-matting via robust segmentation networks. We primarily leverage BiRefNet for fast, accurate edge detection, but can seamlessly swap to Meta's Zero-Shot SAM (Segment Anything Model) as a heavily parameterized alternative.
  3. Landmark Detection: Instead of generic pose-estimation, we utilize HRNet (High-Resolution Net) configured specifically for garment topologies. This accurately maps stylistic structural points across the high-res silhouette.
  4. Refinement & Derivation: The pipeline computationally refines the raw keypoints and automatically derives crucial garment metrics (sweep, waistline, shoulder slope, etc.).
  5. Grid Mapping: Using OpenCV, we generate a high-contrast alphanumeric factory grid and superimpose the alpha-composited garment onto it matching the derived AI metrics, bridging the gap between pixel data and physical pattern drafting.

Challenges we ran into

The biggest hurdle was orchestrating the transition between disparate neural networks—ensuring the output of the classification model properly instructed the landmark detection network, and properly blending it all seamlessly without losing spatial positioning. Additionally, dynamically stripping backgrounds from user-uploaded images of varying lighting setups while maintaining the exact edges of the original garment required us to hybridize our AI segmentation with custom OpenCV morphological edge-smoothing to prevent jagged composites.

Accomplishments that we're proud of

We are incredibly proud of constructing a sophisticated, multi-model pipeline that feels instantaneous to the user. Coupling the state-of-the-art segmentation of BiRefNet/SAM with HRNet allows Dress2Draft to be unusually accurate. We bridged cutting-edge academic models into a unified, user-friendly Flask application that outputs tangible, ready-to-use factory mapping data that a real tailor can actually read.

What we learned

We learned that chaining AI models (Classification to Segmentation to Keypoints) yields far better results than hoping a single model can do it all. We also learned how to leverage Python interoperability to wrangle extremely large tensor arrays into highly compressed JSON outputs and visual artifacts under constrained server environments without crashing.

What's next for Dress2Draft

Our immediate next steps include adding direct export functionality to industry-standard CAD/CAM software (such as generating DXF files) so pattern cutters can seamlessly integrate our plotted points into their workflow. We also plan to integrate an AR/3D visualization layer, allowing users to see a live preview of how the drafted 2D grid points translate onto a 3D virtual mannequin.

Built With

Share this project:

Updates