Introduction
Sketching serves as the "natural language" of brainstorming. Whether it is a complex flowchart on a corporate whiteboard or a spontaneous mind map in a personal notebook, these "flowminds" are indispensable for organizing thoughts and visualizing logic. However, a significant bottleneck exists in the professional workflow: the transition from a messy physical sketch to a polished, editable digital diagram. Manual conversion is tedious and time-consuming, while existing automated solutions often fail due to domain specificity or an inability to handle the noise of real-world environments.
Flowmind2Digital introduces the first end-to-end framework designed to bridge this gap, transforming hand-drawn sketches into fully editable formats like Microsoft PowerPoint and Visio with high accuracy.
Methodology: Recognition and Conversion
The Flowmind2Digital system is divided into two primary phases: Recognition and Post-processing.
1. Recognition via Keypoint Detection
At its core, the system utilizes a refined Mask-RCNN architecture. A key innovation is the treatment of connectors (arrows and lines). Rather than using standard bounding boxes, the model employs Keypoint Detection—a technique typically used in human pose estimation. By identifying the specific "head" and "tail" of every connector, the system can precisely determine which two shapes are being linked, maintaining the logical topology of the diagram even when the drawing is irregular.
2. Post-processing and Digitalization
Once shapes and connections are identified, the pipeline performs several critical steps:
- Connection Determination: Euclidean distances between connector keypoints and shape "anchors" are calculated to establish definitive logical links.
- OCR Integration: Using Baidu’s PaddleOCR, text is extracted specifically from detected text boxes, minimizing interference from background noise.
- Automatic Typesetting: To ensure a professional output, the authors implemented a two-stage clustering algorithm (Canopy + K-means). This standardizes shape sizes and aligns them horizontally or vertically, removing the "wobbliness" inherent in hand-drawn originals.
The hdFlowmind Dataset
To train and validate this system, the researchers introduced hdFlowmind, the most comprehensive dataset in the field to date. It comprises 1,776 images with 27,804 annotations, covering 22 different scenarios including whiteboards, blackboards, and various paper types (grid, ruled, and brown).
A notable finding during development was that pre-training the model on "perfect" basic geometric shapes improved recognition accuracy on messy sketches by 9.3%. This suggests that providing the model with a "Platonic ideal" of shapes helps it better filter noise in real-world photos.
Key Results and Performance
Flowmind2Digital sets a new benchmark for diagram conversion:
- Recognition Accuracy: The model achieved an 87.3% accuracy rate on the hdFlowmind dataset, outperforming the previous state-of-the-art by 11.9%.
- Diagram Accuracy: Measuring the perfect conversion of an entire diagram, the system reached 22.5%—a massive leap from the 0.2% achieved by prior models.
- Efficiency: The process is highly optimized, taking less than one second on a modern GPU (RTX 3090) and approximately 13 seconds on a standard CPU.
Conclusion and Future Work
Flowmind2Digital represents a major step forward in automating professional documentation. While the current system relies on Microsoft Office APIs and can struggle with highly complex curved paths or extreme text rotation, it provides a functional bridge for office workers. Future iterations aim to integrate Natural Language Processing (NLP) to better understand the context of the text, further refining shape and logic recognition.
Summary updated