xionluhnis / neural_inverse_knitting

Code for Neural Inverse Knitting: From Images to Manufacturing Instructions
MIT License
45 stars 14 forks source link

A question about dataset manufacturing #28

Closed 1033216625 closed 9 months ago

1033216625 commented 9 months ago

Hi Author, Regarding the dataset manufacturing method mentioned in your article——“Given this set of initial patterns (around a thousand), we nor-malized the patterns by computing crops of 20 × 20 instruc-tions with 50% overlap, while using default front stitches for the background of smaller patterns. This provided us with12,392 individual 20 × 20 patterns (after pruning invalid patterns since random cropping can destroy the structure).” I have failed to achieve it by trying multiple ways, may I ask how did you crop different sizes of images to 20x20. Is there any specific code to implement.I look forward to hearing from you!

1033216625 commented 9 months ago

and ——“We then generated the corresponding images in two different ways: (1) by knitting a subset of 1,044 patches, i.e., Real data, and (2) by rendering all of them using the basic pattern preview from KnitPaint, i.e., Simulated data. ” KnitPaint takes a lot of time to render images 10,000+ images, how can I get the rendered images in a simpler way. And, is the real image randomly selected from 10,000+ images?

xionluhnis commented 9 months ago

About cropping: there are plenty of tools to do that such as https://imagemagick.org/Usage/crop/

I do not remember what script we used. Either something in bash, nodejs or python.

As for the rendering, this was reasonably short. It took us less than a week (~4 days) with some UI automation tools.

The most intensive part was the real image acquisition as we didn't completely automate it. For context, the knitting took a few weeks while I had an intern help capture some of the images in parallel. The manual annotation on top of these images added an extra week using a basic Matlab script to click on corners and generate the final warped crops of the 20x20 blocks.

Could you automate that? Sure but given the timeframe, I believe that manual annotation was the good choice back then.

1033216625 commented 9 months ago

Firstly thank you so much for your generous sharing, I have been following your previous work but never got started as it was new to me and I didn't have a mentor that I could communicate with, and your reply has been very encouraging. My current work is to try to make some datasets of my own. But as for rendering the data, my approach is to use onedesign software of SHIMA SEIKI to render each image, which is time consuming and labour intensive. So do you have some recommendations regarding UI automation tools.