jiupinjia / stylized-neural-painting

Official Pytorch implementation of the preprint paper "Stylized Neural Painting", in CVPR 2021.
https://jiupinjia.github.io/neuralpainter/
Creative Commons Zero v1.0 Universal
1.56k stars 262 forks source link

brush_alpha erro #48

Open liuzu604 opened 2 years ago

liuzu604 commented 2 years ago

Hi, The program I run returned an error message:

File "utils.py" line 286, in create_transformed_brush brush_alpha = (brush_alpha > 0).astype(np.float32) TypeError: '>' not supported between instances of 'NoneType' and 'int'

command: python ../stylized-neural-painting/demo_prog.py --img_path ../stylized-neural-painting/test_images/apple.jpg --canvas_color 'white' --max_m_strokes 500 --max_divide 5 --renderer oilpaintbrush --renderer_checkpoint_dir ../stylized-neural-painting/checkpoints_G_oilpaintbrush --net_G zou-fusion-net

jiupinjia commented 2 years ago

Hi @liuzu604, it seems the stroke files were not loaded correctly. Can you first cd to the repo dir and then run your command? Please let me know whether it works. Thanks!

liuzu604 commented 2 years ago

Hi @jiupinjia ,Maybe it's my download problem. I didn't download stroke files from Google Drive , but from Baidu online disk of other bloggers. When I replace "--renderer oilpaintbrush" with "--renderer watercolor" , it can work normally.

Thanks!