wangqiang9 / SketchKnitter

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

Reproducing paper results #16

Open lmagoncalo opened 11 months ago

lmagoncalo commented 11 months ago

I'm trying to reproduce the results presented in the paper, however using the configurations provided in the scripts (train.sh and sample.sh) I cannot archive the results. Here is an example of the results I obtained training using a single dataset:

generated_2

They appear to be composed of dashes instead of a continuous lines. Is it possible to prove the configurations used to train and sample to obtain the results from the paper?

wangqiang9 commented 11 months ago

Hi, when you using the different single dataset, the pen break needs to be reset, otherwise it will result in discontinuous strokes.

wangqiang9 commented 11 months ago

Also, does your result look like apple? It seems that the shape information model has learned some and needs to adjust the pen break parameters again.

lmagoncalo commented 11 months ago

Yes, I'm using the dataset from Google Draw of an apple. Can you elaborate on how to reset the pen break, I'm not understand what you mean. The same issue arise when using multiple datasets.

saluzishi commented 6 months ago

Hi, I'am also working on reproducing the results. I have met the same problem about dashed line. For pen_break, the numbers among 0.005 to 1 are tested for the single categoty - apple. The following is the setting according to this repository. How can I refine the parameter for better results without dashed line? Thanks for your help!

  1. train.sh:
    NUM_GPUS=1
    CUDA_VISIBLE_DEVICES=0 mpiexec -n $NUM_GPUS python train.py \
                --data_dir /data/quickdraw/apple \
                --lr 1e-4 \
                --batch_size 4 \
                --use_fp16 False \
                --log_dir ./logs \
                --save_interval 450 \
                --diffusion_steps 150 \
                --noise_schedule linear \
                --image_size 96 \
                --num_channels 96 \
                --num_res_blocks 3
  2. sample.sh
    NUM_GPUS=1
    CUDA_VISIBLE_DEVICES=0 mpiexec -n $NUM_GPUS python sample.py \
                  --model_path ./logs/model050000.pt \
                  --pen_break 0.1 \
                  --save_path ./results/apple \
                  --use_ddim True \
                  --log_dir ./logs \
                  --diffusion_steps 150 \
                  --noise_schedule linear \
                  --image_size 96 \
                  --num_channels 96 \
                  --num_res_blocks 3