GuyTevet/MotionCLIP

Text-to-Motion issue

sygyq305305 opened this issue · 3 comments

After running the code python -m src.visualize.text2motion ./exps/paper-model/checkpoint_0100.pth.tar --input_file assets/paper_texts.txt ,appear the following issue. I don't know how to solve it.
Restore weights..
Visualization of the epoch 100
Generate the videos..
Render the generated samples: 100%|████████████████████████████████████████████████████| 24/24 [00:09<00:00, 2.41it/s]
Load the generated samples: 0%| | 0/6 [00:00<?, ?it/s]Traceback (most recent call last):
File "C:\anaconda\Anaconda3\envs\motionclip\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\anaconda\Anaconda3\envs\motionclip\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\CodeProject\python\MotionCLIP-main\src\visualize\text2motion.py", line 41, in
main()
File "D:\CodeProject\python\MotionCLIP-main\src\visualize\text2motion.py", line 37, in main
viz_clip_text(model, grid, epoch, parameters, folder=folder)
File "D:\CodeProject\python\MotionCLIP-main\src\visualize\visualize.py", line 280, in viz_clip_text
frames = generate_by_video({}, {}, generation,
File "D:\CodeProject\python\MotionCLIP-main\src\visualize\visualize.py", line 132, in generate_by_video
gener["frames"] = pool_job_with_desc(pool, iterator,
File "D:\CodeProject\python\MotionCLIP-main\src\visualize\visualize.py", line 114, in pool_job_with_desc
array = np.stack([[load_anim(save_path_format.format(i, j), timesize)
File "D:\CodeProject\python\MotionCLIP-main\src\visualize\visualize.py", line 114, in
array = np.stack([[load_anim(save_path_format.format(i, j), timesize)
File "D:\CodeProject\python\MotionCLIP-main\src\visualize\visualize.py", line 114, in
array = np.stack([[load_anim(save_path_format.format(i, j), timesize)
File "D:\CodeProject\python\MotionCLIP-main\src\visualize\anim.py", line 44, in load_anim
data = np.array(imageio.mimread(path, memtest=False))[..., :3]
File "C:\anaconda\Anaconda3\envs\motionclip\lib\site-packages\imageio\core\functions.py", line 354, in mimread
reader = read(uri, format, "I", **kwargs)
File "C:\anaconda\Anaconda3\envs\motionclip\lib\site-packages\imageio\core\functions.py", line 186, in get_reader
return format.get_reader(request)
File "C:\anaconda\Anaconda3\envs\motionclip\lib\site-packages\imageio\core\format.py", line 170, in get_reader
return self.Reader(self, request)
File "C:\anaconda\Anaconda3\envs\motionclip\lib\site-packages\imageio\core\format.py", line 221, in init
self._open(**self.request.kwargs.copy())
File "C:\anaconda\Anaconda3\envs\motionclip\lib\site-packages\imageio\plugins\pillowmulti.py", line 60, in _open
return PillowFormat.Reader._open(self)
File "C:\anaconda\Anaconda3\envs\motionclip\lib\site-packages\imageio\plugins\pillow.py", line 138, in _open
as_gray=as_gray, is_gray=_palette_is_grayscale(self._im)
File "C:\anaconda\Anaconda3\envs\motionclip\lib\site-packages\imageio\plugins\pillow.py", line 689, in _palette_is_grayscale
palette = np.asarray(pil_image.getpalette()).reshape((256, 3))
ValueError: cannot reshape array of size 384 into shape (256,3)

Do you use imageio==2.9.0 as specified in the env file?

Yes.
I have already solved this problem. I think it should be caused by the inconsistency between the software versions of Windows and Linux. Using certain versions above 2.9.0 will solve this problem.

Cool thanks!