[Project] Extracting vector geometry (SVG/DXF/STL) from photos + experimental hand-drawn sketch extraction

[Project] Extracting vector geometry (SVG/DXF/STL) from photos + experimental hand-drawn sketch extraction

Hi everyone,

I’ve been working on a project called ShapeScan, focused on extracting clean geometric outlines from photos of real-world objects.

The goal is to convert images into usable vector and fabrication-ready formats such as SVG, DXF and STL.

The pipeline currently includes several stages:

  1. Image normalization
  • color calibration
  • automatic page detection
  • perspective correction
  • noise cleanup
  1. Segmentation
  • classical segmentation for simple scenes
  • optional background removal
  • experiments with larger visual models for more complex objects
  1. Contour extraction
  • mask → contour detection
  • topology preservation (outer contour + holes)
  • contour smoothing
  1. Geometry conversion
  • contours converted into paths
  • export to:
    • SVG
    • DXF
    • STL (extruded)

One of the main challenges has been producing stable and manufacturable contours, especially for workflows such as laser cutting, CNC or CAD prototyping.


Drawing Mode (in development)

I’m currently working on a new drawing mode designed specifically for hand-drawn sketches.

The idea is simple:

  • the user draws shapes on a sheet of paper
  • takes a photo of the sheet
  • ShapeScan extracts the drawn outlines
  • and converts them into clean SVG vector paths

This mode uses a different processing pipeline tuned for:

  • pen/pencil drawings
  • sketch noise cleanup
  • outline extraction from hand-drawn lines

I’m also experimenting with integrating larger vision models to improve segmentation robustness for more complex scenes.

The long-term goal is to combine object scanning + sketch extraction into a single pipeline that can convert physical shapes or drawings into fabrication-ready geometry.

I’d be very interested in feedback from people working with:

  • segmentation
  • contour extraction
  • vectorization pipelines
  • topology-preserving geometry extraction

Happy to discuss approaches or technical challenges.

submitted by /u/Most-Geologist-9547
[link] [comments]

Liked Liked