7
$\begingroup$

I need an algorithm to trace simple bitmaps which only contain paths with a given stroke width.

It is obviously very easy to generate bitmaps from vector paths, so creating data for a machine learning algorithm is simple.

Is any existing attempt to create a deep learning model which extracts vector paths from bitmaps?

The model could be trained by giving both the vector and bitmap representation.

Once trained, it would be able to generate the vector paths from the given bitmap.

This seems simple but I could not find any work on this particular task; so I suppose this problem is not fitted for current deep learning architectures, why?

The goal is to trace this kind of image, which would be drawn by hand with a thick felt pen and scanned:

Bitmap Image containing simple vector paths

Update

Is there a deep learning architecture fitted for this problem? I believe this question could help me understand what is possible to do with deep learning and what is not, and why. Tracing bitmaps is a perfect example of converting sparse data to a dense abstract representation ; I have the intuition one can learn a lot from this problem.

$\endgroup$
1
$\begingroup$

If we seek proven working source code to plug into a GPLv2-licence compatible solution, we should at least consider autotrace. Its source code is open for review. It can be tested against the example images we have and, if it works fine, called by our GPLv2 software. We can even use the calling code in Inkscape's plug-in image tracing implementation as a good starting point for design and implementation of our calling program, whether it be C, C++, Java, Python, or ECMA (JS).

The trace algorithm in Adobe Illustrator is comparable but is not open source.

If we seek theory, there are several academic publications discussing some of the theory, the last being most aligned with machine learning ideology. I would not dismiss earlier work simply because it doesn't connect with the current machine learning idioms. Investigating what is fully implemented and successfully used by many follows a wise old business proverb: The bird in the hand is worth two in the bush.

Many of the online drawing programs collect data. It would not be surprising if, behind the gracious give-away of online bandwidth, they are establishing a continuously improving data set for training a new breed of autotracers. None have published AI designs admitting as much, but they would not be legally obligated to do so because a single input example is indeterminable from the autotrace service that could resulting from the training.

$\endgroup$
  • $\begingroup$ The only paper which goes into the direction of the OP who was asking for a machine learning approach is the “Testing AutoTrace” paper by Jae-Hyun Sung et al. Unfortunately it is only 1 page long and is only preview for the topic. What is available right now, are papers about machine learning in the context of Geographic information system. $\endgroup$ – Manuel Rodriguez Nov 30 '19 at 9:28
  • $\begingroup$ Thanks a lot! My question contains two questions: 1. How to trace bitmaps (and you answered very well), and 2. Is there a deep learning architecture fitted for this problem? I am very curious about this second question since it could help me understand what is possible to do with deep learning and what is not, and why. Tracing bitmaps is a perfect example of converting sparse data to a dense abstract representation ; I have the intuition one can learn a lot from this problem. $\endgroup$ – arthur.sw Dec 6 '19 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.