wangqiang9 / SketchKnitter

About PyTorch implementation of SketchKnitter: Vectorized Sketch Generation with Diffusion Models, ICLR 2023, Spotlight.
MIT License
54 stars 8 forks source link

Question about sample.py #8

Closed LizzyEw closed 1 year ago

LizzyEw commented 1 year ago

Thank you so much for your excellent work! I can't find how to save "sample_all" in .npz format and draw sketch from them. In sample.py, the main function stops at these two statements: sample_all = th.cat((sample, pen_state), 2).cpu() sample_all = bin_pen(sample_all, args.pen_break) So could you please explain how to save "sample_all" in .npz format and get a sketch result ?

wangqiang9 commented 1 year ago

Hello, thanks for your attention to our work! In fact, sample_all is a standard npz file. Please refer to the official documentation for the methods of saving and using it: https://numpy.org/doc/stable/reference/generated/numpy.savez.html Also, there are detailed instructions on using, evaluating, and visualizing npz files in the document. Please click on this link to view: https://github.com/XDUWQ/SketchKnitter#visualization and https://github.com/XDUWQ/SketchKnitter#evaluation

LizzyEw commented 1 year ago

Thank you for your timely guidence!