YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Stitch Studio β€” Image to Embroidery Pattern Designer

A professional desktop application for converting images into embroidery machine files (.DST, .PES, .JEF, and more). Built with PySide6 for a modern UI, vector stitch rendering, and complete control over every aspect of the digitizing process.


Features

Thread Library System

  • Thread Pack Database β€” organize your physical thread inventory into packs (by brand, type, project)
  • Thread Types β€” matte, shiny, metallic, neon, UV, glow-in-dark, variegated, silk, cotton, polyester, rayon, wool
  • Import/Export β€” JSON and CSV support for sharing and backing up thread collections
  • CIEDE2000 Color Matching β€” perceptually accurate color matching when quantizing images to your available threads
  • Add/Edit/Remove threads with full metadata: name, brand, catalog number, color, type, weight

Image Processing

  • Image Adjustments β€” brightness, contrast, saturation, sharpness, blur with real-time sliders
  • Color Quantization β€” K-means clustering in CIELAB color space with automatic palette matching to your thread collection
  • Auto-Segmentation β€” connected component analysis with morphological cleanup
  • Output Size Control β€” set physical dimensions (mm) with aspect ratio lock
  • Configurable Parameters β€” number of colors, minimum region size, smoothing kernel size, dithering

Stitch Generation Engine (8 Fill Modes)

  1. Scanline β€” classic boustrophedon zigzag fill at any angle
  2. Contour β€” concentric inward contour fill following region shape
  3. Flow-Guided β€” stitches follow image content using structure tensor orientation fields (RK4 streamline integration)
  4. Satin β€” zigzag perpendicular to medial axis, auto-adapts width from distance transform
  5. Radial β€” rays emanating from region center
  6. Spiral β€” Archimedean spiral from center outward
  7. Stipple β€” random meandering fill with nearest-neighbor ordering
  8. Cross-Stitch β€” decorative X-pattern grid

Per-Region Stitch Control

  • Fill mode selector per region
  • Stitch direction β€” fixed angle, image gradient, contour-following, radial, manual
  • Angle β€” 0Β°-360Β° with slider + spinner
  • Stitch length β€” average, min, max with length randomization slider
  • Row spacing β€” density control with multiplier
  • Underlay β€” automatic underlay with configurable angle offset and density
  • Contour rows β€” border stitches before fill
  • Pull compensation β€” outward expansion to compensate for fabric pull
  • Flow field controls β€” strength and smoothing parameters

Layer System

  • Multi-color layers β€” each color is a separate layer with its own regions
  • Layer ordering β€” move up/down, controls stitch execution order
  • Per-layer visibility β€” toggle layers on/off
  • Region management β€” rename, delete, duplicate
  • Tree view β€” expandable layers showing child regions with stitch counts

Vector Canvas

  • GPU-accelerated rendering via Qt's QGraphicsView
  • Zoom/Pan β€” mouse wheel zoom, middle-click/alt-click pan
  • Stitch path rendering β€” colored vector paths for each layer
  • Region mask overlay β€” semi-transparent color regions
  • Background image β€” adjustable opacity
  • Context menu β€” toggle visibility of stitches, stitch points, regions, image

Export

  • DST β€” Tajima (universal, works with virtually all machines)
  • PES β€” Brother
  • JEF β€” Janome
  • VP3 β€” Pfaff
  • EXP β€” Melco
  • HUS β€” Husqvarna
  • XXX β€” Singer
  • SVG β€” vector preview
  • PNG β€” raster preview
  • Per-layer export support
  • Pattern statistics: stitch count, thread length, dimensions, color changes

Project Management

  • Save/Load .ssp project files (JSON with embedded image)
  • Full state preservation β€” all layers, regions, settings, source image
  • Unsaved changes detection with save prompt

Installation

Requirements

  • Python 3.10+
  • Windows, macOS, or Linux

Quick Install

# Install dependencies
pip install -r requirements.txt

# Run
python run_stitch_studio.py
# or
python -m stitch_studio

Install as Package

pip install -e .
stitch-studio  # run from anywhere

Quick Start

  1. Launch the app: python run_stitch_studio.py
  2. Set up threads: In the Thread Library panel (left), add your thread packs via "Add Thread" or import from CSV/JSON
  3. Load an image: Ctrl+I or File β†’ Load Image
  4. Adjust image: Use the Image & Quantization panel sliders
  5. Set output size: Enter physical dimensions in mm
  6. Quantize: Click "Quantize & Segment" β€” maps image colors to your thread palette and segments into regions
  7. Fine-tune: Select layers/regions in the Layers panel and adjust stitch settings in the Properties panel
  8. Compute flow field (optional): Process β†’ Compute Flow Field β€” enables flow-guided fill mode
  9. Generate stitches: Ctrl+G
  10. Preview: Zoom/pan on the canvas to inspect stitch paths
  11. Export: Ctrl+E β€” choose your machine's format (DST, PES, JEF, etc.)

Thread Pack CSV Format

name,brand,catalog_number,r,g,b,thread_type,weight,quantity,notes
"Bright Red","Madeira","1147",220,30,30,"polyester","40",3,"My favorite red"
"Gold Metallic","Madeira","4002",212,175,55,"metallic","40",1,""

Thread types: matte, shiny, metallic, neon, uv, glow_in_dark, variegated, silk, cotton, polyester, rayon, wool, other


Keyboard Shortcuts

Key Action
Ctrl+I Load Image
Ctrl+Q Quantize & Segment
Ctrl+G Generate Stitches
Ctrl+E Export Pattern
Ctrl+S Save Project
Ctrl+Shift+S Save As
Ctrl+O Open Project
Ctrl+N New Project
F Fit canvas to content
+ / - Zoom in/out
0 Reset zoom
Middle mouse / Alt+Left Pan canvas
Scroll wheel Zoom
Right click Context menu

Architecture

stitch_studio/
β”œβ”€β”€ __init__.py
β”œβ”€β”€ __main__.py              # Entry point + dark theme
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ thread_db.py         # Thread database (packs, colors, CIEDE2000 matching)
β”‚   β”œβ”€β”€ project.py           # Project model (layers, regions, settings, save/load)
β”‚   β”œβ”€β”€ image_engine.py      # Image processing, quantization, segmentation, flow fields
β”‚   β”œβ”€β”€ stitch_engine.py     # 8 fill mode stitch generators with flow control
β”‚   └── export_engine.py     # pyembroidery export to DST/PES/JEF/VP3/etc.
β”œβ”€β”€ ui/
β”‚   β”œβ”€β”€ canvas.py            # QGraphicsView vector canvas
β”‚   β”œβ”€β”€ panels.py            # Thread, Layer, Properties, Image, Stats panels
β”‚   └── main_window.py       # Main window with docks, menus, toolbar
└── data/                    # User data directory

Key Technologies

  • PySide6 (Qt6) β€” professional desktop UI with dockable panels
  • pyembroidery β€” reads/writes 45+ embroidery machine formats
  • scikit-learn β€” K-means color quantization
  • scikit-image β€” CIELAB color space, CIEDE2000 distance, morphology
  • OpenCV β€” connected component segmentation, structure tensor
  • SciPy β€” flow field smoothing, interpolation
  • Shapely β€” polygon operations for scanline fill
  • NumPy β€” array processing, flow field computation

Embroidery Tips

Recommended Workflow

  1. Start with fewer colors (8-12) and increase if needed
  2. Use flow-guided fill for organic shapes (skin, fabric, nature)
  3. Use scanline fill for geometric areas
  4. Use contour fill for borders and text
  5. Always enable underlay for proper fabric stabilization
  6. Set pull compensation to 0.1-0.2mm for stretchy fabrics
  7. Export as PES (Brother) or JEF (Janome) to preserve color data; DST is universal but has no color info

Thread Order

  • Embroider light colors first, dark colors last (prevents show-through)
  • The layer order in the panel = stitch execution order
  • Background/largest areas first, detail layers last

License

MIT β€” use freely for personal and commercial projects.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support