HongwenZhang / PyMAF-X

[TPAMI 2023] PyMAF-X: Towards Well-aligned Full-body Model Regression from Monocular Images
https://www.liuyebin.com/pymaf-x
Other
210 stars 28 forks source link

How to save mesh without background? #17

Open hicookie77 opened 1 year ago

hicookie77 commented 1 year ago

When I add the command(--empty_bg), I get the following error: Traceback (most recent call last): File "/home/xu/anaconda3/envs/pymafx/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/xu/anaconda3/envs/pymafx/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/xu/PyMAF/apps/demo_smplx.py", line 605, in run_demo(args) File "/home/xu/PyMAF/apps/demo_smplx.py", line 457, in run_demo img, empty_img = renderer( ValueError: too many values to unpack (expected 2)

In addition, when I add the incomplete original image of the human body, the following error occurs, how should I solve it.

Traceback (most recent call last): File "/home/xu/anaconda3/envs/pymafx/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/xu/anaconda3/envs/pymafx/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/xu/PyMAF/apps/demo_smplx.py", line 605, in run_demo(args) File "/home/xu/PyMAF/apps/demo_smplx.py", line 308, in run_demo for batch in tqdm(dataloader): File "/home/xu/anaconda3/envs/pymafx/lib/python3.8/site-packages/tqdm/std.py", line 1178, in iter for obj in iterable: File "/home/xu/anaconda3/envs/pymafx/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in next data = self._next_data() File "/home/xu/anaconda3/envs/pymafx/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data return self._process_data(data) File "/home/xu/anaconda3/envs/pymafx/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data data.reraise() File "/home/xu/anaconda3/envs/pymafx/lib/python3.8/site-packages/torch/_utils.py", line 425, in reraise raise self.exc_type(msg) ValueError: Caught ValueError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/xu/anaconda3/envs/pymafx/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/home/xu/anaconda3/envs/pymafx/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/xu/anaconda3/envs/pymafx/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/xu/PyMAF/datasets/inference.py", line 291, in getitem imgpart, , crop_shape = self.rgb_processing(img_orig, center_part, scale_part, [constants.IMG_RES, constants.IMG_RES]) File "/home/xu/PyMAF/datasets/inference.py", line 124, in rgb_processing crop_img_resized, crop_img, crop_shape = crop(rgb_img, center, scale, res, rot=rot) File "/home/xu/PyMAF/utils/imutils.py", line 89, in crop new_img[new_y[0]:new_y[1], new_x[0]:new_x[1]] = img[old_y[0]:old_y[1], ValueError: could not broadcast input array from shape (7,63,3) into shape (7,0,3)