Skip to content

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

Open

Description

@fangzhuangzz

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.

Activity

  1. fangzhuangzz commented on Mar 17, 2018

    @fangzhuangzz
    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

  2. wesleyw72 commented on Mar 19, 2018

    @wesleyw72
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions