wangqiang9 / SketchKnitter

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

Question of N #15

Closed chaoshuoZhang closed 11 months ago

chaoshuoZhang commented 11 months ago

When I set N to a smaller number, I ran into the following problem

ValueError: could not broadcast input array from shape (59,3) into shape (24,3)’

I tried to use my modified code and the result was very bad len_seq = min(self.Nmax, self.sketches_normed[idx].shape[0]) step = self.sketches_normed[idx].shape[0] // len_seq + 1 sampledata = self.sketches_normed[idx][::step] sketch[:len(sampledata), :] = sampledata I see that your paper mentions data about N=24, how did you achieve it?

chaoshuoZhang commented 11 months ago

When a sequence is longer than N, how is it handled?

wangqiang9 commented 11 months ago

It is necessary to truncate the data during data preprocessing, and detailed methods are described in the paper and supplementary materials.