Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: cannot reshape array of size 67500 into shape (22500,) #37

Open
fangzhuangzz opened this issue Mar 17, 2018 · 2 comments
Open

Comments

@fangzhuangzz
Copy link

Traceback (most recent call last):
File "demo.py", line 43, in
cuda=args.cuda,
File "/home/zhuangwei.zw/FastPhotoStyle/process_stylization.py", line 62, in stylization
stylized_img = p_wct.transform(cont_img, styl_img, cont_seg, styl_seg)
File "/home/zhuangwei.zw/FastPhotoStyle/photo_wct.py", line 35, in transform
csF4 = self.__feature_wct(cF4, sF4, cont_seg, styl_seg)
File "/home/zhuangwei.zw/FastPhotoStyle/photo_wct.py", line 88, in __feature_wct
cont_mask = np.where(t_cont_seg.reshape(t_cont_seg.shape[0] * t_cont_seg.shape[1]) == l)
ValueError: cannot reshape array of size 67500 into shape (22500,)

I followed the Example2 manual, but throw this error.

@fangzhuangzz
Copy link
Author

command:
python demo.py --content_image_path content_json/img.png --content_seg_path content_json/label.png --style_image_path
style_json/img.png --style_seg_path style_json/label.png --output_image_path results/0317.dt.png

@wesleyw72
Copy link
Contributor

Please see #33. The changes proposed there should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@fangzhuangzz @wesleyw72 and others