hzwer / ICCV2019-LearningToPaint

ICCV2019 - Learning to Paint With Model-based Deep Reinforcement Learning
MIT License
2.25k stars 312 forks source link

Output strokes per iteration only. #15

Closed jwb95 closed 5 years ago

jwb95 commented 5 years ago

Hi, thank you for your work.

I am struggling to modify the code so that, when running python3 baseline/test.py --max_step=80 --actor=actor.pkl --renderer=renderer.pkl --img=path_to_image --divide=5, it generates images with only the strokes added during the latest iteration - instead of the sum of all strokes.

Do you have an idea on this?

Thank you

hzwer commented 5 years ago

Hello, Please look at line 51 in test.py, you can save color_stroke[:, i].

jwb95 commented 5 years ago

Thank you for quick and effective response.

I managed to achieve what I wanted by inserting save_img(color_stroke[:,i], args.imgid) at line 51 in test.py and modifying the save_img-function to save the single strokes in a separate folder.