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

Problem launching example #3

Open
DaddyWesker opened this issue Jun 30, 2022 · 8 comments
Open

Problem launching example #3

DaddyWesker opened this issue Jun 30, 2022 · 8 comments

Comments

@DaddyWesker
Copy link

DaddyWesker commented Jun 30, 2022

Hello and thanks for your code.

I've been trying to launch your example of avatar rendering using pretrained model

python main.py --target_txt 'a 3d rendering of a strong man in unreal engine'

I have created conda env using command you've provided. But when I'm launching this command I'm getting

/home/daddywesker/anaconda3/envs/nrend/lib/python3.7/site-packages/chainer/_environment_check.py:75: UserWarning: 
--------------------------------------------------------------------------------
CuPy (cupy) version 10.5.0 may not be compatible with this version of Chainer.
Please consider installing the supported version by running:
  $ pip install 'cupy>=7.7.0,<8.0.0'
See the following page for more details:
  https://docs.cupy.dev/en/latest/install.html
--------------------------------------------------------------------------------
  requirement=requirement, help=help))
/home/daddywesker/anaconda3/envs/AvatarCLIP/lib/python3.7/site-packages/clip/clip.py:24: UserWarning: PyTorch version 1.7.1 or higher is recommended
  warnings.warn("PyTorch version 1.7.1 or higher is recommended")
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/daddywesker/3DSynthNN/AvatarCLIP/AvatarGen/ShapeGen/utils.py", line 7, in <module>
    _, _, texture = nr.load_obj(obj_fname, load_texture=True, texture_size=8)
  File "/home/daddywesker/.local/lib/python3.7/site-packages/neural_renderer-1.1.3-py3.7.egg/neural_renderer/load_obj.py", line 183, in load_obj
  File "/home/daddywesker/.local/lib/python3.7/site-packages/neural_renderer-1.1.3-py3.7.egg/neural_renderer/load_obj.py", line 75, in load_textures
  File "/home/daddywesker/anaconda3/envs/nrend/lib/python3.7/site-packages/chainer/backends/cuda.py", line 427, in to_gpu
    array, lambda arr: _array_to_gpu(arr, device, stream))
  File "/home/daddywesker/anaconda3/envs/nrend/lib/python3.7/site-packages/chainer/_backend.py", line 19, in _convert_arrays
    return func(array)
  File "/home/daddywesker/anaconda3/envs/nrend/lib/python3.7/site-packages/chainer/backends/cuda.py", line 427, in <lambda>
    array, lambda arr: _array_to_gpu(arr, device, stream))
  File "/home/daddywesker/anaconda3/envs/nrend/lib/python3.7/site-packages/chainer/backends/cuda.py", line 468, in _array_to_gpu
    return cupy.asarray(array)
  File "/home/daddywesker/anaconda3/envs/nrend/lib/python3.7/site-packages/cupy/_creation/from_data.py", line 76, in asarray
    return _core.array(a, dtype, False, order)
  File "cupy/_core/core.pyx", line 2266, in cupy._core.core.array
  File "cupy/_core/core.pyx", line 2290, in cupy._core.core.array
  File "cupy/_core/core.pyx", line 2418, in cupy._core.core._array_default
ValueError: Unsupported dtype object
python-BaseException

Any advice?

Well, yes, there is a cupy warning also, but i cannot install cupy of those versions. There is an error which, as i've searched on the web, is fixed in newer versions.

@hongfz16
Copy link
Owner

hongfz16 commented Jul 1, 2022

Hi. Thank you for your interest in our work.

I think you might install the wrong neural_renderer. The correct repo should be https://github.com/daniilidis-group/neural_renderer, which does not require cupy.

@DaddyWesker
Copy link
Author

That is the exactly neural_renderer i've cloned and installed.

@hongfz16
Copy link
Owner

hongfz16 commented Jul 4, 2022

That is weird. My machine did not run into this error. Could you please run some tests on the installed neural_renderer, e.g. https://github.com/daniilidis-group/neural_renderer#example-3-optimizing-textures, to test if your neural_renderer is correctly installed? Thanks.

@DaddyWesker
Copy link
Author

All four examples are working well.

@DaddyWesker
Copy link
Author

DaddyWesker commented Jul 5, 2022

Well, I've been able to beat this problem (i've installed neural renderer from here https://github.com/adambielski/neural_renderer), but now i'm facing another one.

Start generating coarse body shape given the target text: a 3d rendering of a strong man in unreal engine
Traceback (most recent call last):
  File "main.py", line 144, in <module>
    args.neutral_txt, args.target_txt)
  File "main.py", line 95, in shape_gen
    gender = smpl_args['gender'], num_betas = smpl_args['num_betas']).cuda()
  File "/home/daddywesker/anaconda3/envs/AvatarCLIP/lib/python3.7/site-packages/smplx/body_models.py", line 2335, in build_layer
    return SMPLLayer(model_path, **kwargs)
  File "/home/daddywesker/anaconda3/envs/AvatarCLIP/lib/python3.7/site-packages/smplx/body_models.py", line 406, in __init__
    **kwargs,
  File "/home/daddywesker/anaconda3/envs/AvatarCLIP/lib/python3.7/site-packages/smplx/body_models.py", line 134, in __init__
    smpl_path)
AssertionError: Path ../../smpl_models does not exist!

I guess there is some problem with smpl. As i understand, i should download and put those smpl models somewhere.

@hongfz16
Copy link
Owner

hongfz16 commented Jul 5, 2022

You need to download smpl models and put them in certain places. You might want to check this out https://github.com/hongfz16/AvatarCLIP#download-smpl-models.

@DaddyWesker
Copy link
Author

Yeah, I've missed that part. Thanks. Now it works. Closing.

@DaddyWesker
Copy link
Author

Well, here is some question. I've launched several times your model and here is what i've got.

This is a strong man
image

This is a fat man
image

And this is the slim woman
image

I'd say results are rather poor. Am i doing something wrong? I've seen your examples and they are better.

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

2 participants