You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Used .jpg for label maps, style image, and content image. (demo_multipy.py is just a copied version of demo.py, just edited to suit multiple images)
Did changes mentioned in #55 (i.e. remove mode='RGB'), and also #56 (changing for t_cont_seg and t_styl_seg doesn't help since issue is on o_cont_mask) but issue persisted:
Elapsed time in stylization: 0.032001 Traceback (most recent call last): File "demo_multiple.py", line 116, in <module> no_post=args.no_post File "/home/user/repository/image_enhancement/FastPhotoStyle/process_stylization.py", line 140, in stylization File "/home/user/repository/image_enhancement/FastPhotoStyle/photo_wct.py", line 21, in transform self.__compute_label_info(cont_seg, styl_seg) File "/home/user/repository/image_enhancement/FastPhotoStyle/photo_wct.py", line 104, in __compute_label_info o_cont_mask = np.where(cont_seg.reshape(cont_seg.shape[0] * cont_seg.shape[1]) == l) ValueError: cannot reshape array of size 1228800 into shape (409600,)
Also tried changing the mode for segmentation image as mentioned in #56, but another issue arise:
Traceback (most recent call last): File "demo_multiple.py", line 116, in <module> no_post=args.no_post File "/home/user/repository/image_enhancement/FastPhotoStyle/process_stylization.py", line 107, in stylization File "/home/user/miniconda3/envs/fastphotostyle3/lib/python3.6/site-packages/PIL/Image.py", line 2661, in fromarray raise ValueError("Too many dimensions: %d > %d." % (ndim, ndmax)) ValueError: Too many dimensions: 3 > 2.
The text was updated successfully, but these errors were encountered:
lQingRu
changed the title
SEGMENTATION with label masks: Value Error: cannot reshape array of size 19200 into shape (6400,)
SEGMENTATION with label masks: Value Error: cannot reshape array of size 1228800 into shape (409600,)
Oct 5, 2019
Used .jpg for label maps, style image, and content image.
(demo_multipy.py is just a copied version of demo.py, just edited to suit multiple images)
Did changes mentioned in #55 (i.e. remove
mode='RGB'
), and also #56 (changing for t_cont_seg and t_styl_seg doesn't help since issue is on o_cont_mask) but issue persisted:Elapsed time in stylization: 0.032001 Traceback (most recent call last): File "demo_multiple.py", line 116, in <module> no_post=args.no_post File "/home/user/repository/image_enhancement/FastPhotoStyle/process_stylization.py", line 140, in stylization File "/home/user/repository/image_enhancement/FastPhotoStyle/photo_wct.py", line 21, in transform self.__compute_label_info(cont_seg, styl_seg) File "/home/user/repository/image_enhancement/FastPhotoStyle/photo_wct.py", line 104, in __compute_label_info o_cont_mask = np.where(cont_seg.reshape(cont_seg.shape[0] * cont_seg.shape[1]) == l) ValueError: cannot reshape array of size 1228800 into shape (409600,)
Also tried changing the mode for segmentation image as mentioned in #56, but another issue arise:
Traceback (most recent call last): File "demo_multiple.py", line 116, in <module> no_post=args.no_post File "/home/user/repository/image_enhancement/FastPhotoStyle/process_stylization.py", line 107, in stylization File "/home/user/miniconda3/envs/fastphotostyle3/lib/python3.6/site-packages/PIL/Image.py", line 2661, in fromarray raise ValueError("Too many dimensions: %d > %d." % (ndim, ndmax)) ValueError: Too many dimensions: 3 > 2.
The text was updated successfully, but these errors were encountered: