hzwer / ICCV2019-LearningToPaint

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

Neural Renderer #39

Closed NiharikaVadlamudi closed 4 years ago

NiharikaVadlamudi commented 4 years ago

Hello !

I want to understand the Neural renderer (DL network) part. How did you train this neural renderer? If there is a dataset, please provide a link for it. Have you used a traditional rendering algorithm in this case? (If so how ?)

Thank you

hzwer commented 4 years ago

Hello! In renderer training, we used baseline/Renderer/stroke_gen.py for generating training data online. You can see baseline/train_renderer.py for details.

NiharikaVadlamudi commented 4 years ago

Another small query, while running stroke_gen.py file, with f = np.random.uniform(0,1,10) , I am basically getting an empty black image with no stroke . I seem to have double checked it , is there any issue with f value that I'm providing ? Also, why is the center (y,x) , any specific reason ?

Thank You

hzwer commented 4 years ago

Hello, I think you should convert float32 to unint8 before visualizing. You can use cv2.imshow((gen * 255).astype('uint8')). The problem of coordinate order comes from the difference between numpy and cv2. When drawing with cv2, the order of coordinates is different.