GithubHelp home page GithubHelp logo

mrtornado24 / next3d Goto Github PK

View Code? Open in Web Editor NEW
459.0 28.0 29.0 2.39 MB

[CVPR 2023 Highlight] Next3D: Generative Neural Texture Rasterization for 3D-Aware Head Avatars

Home Page: https://mrtornado24.github.io/Next3D/

Python 90.38% C++ 2.27% Cuda 7.35%
3d-aware-image-synthesis gan nerf

next3d's Introduction

Next3D: Generative Neural Texture Rasterization for 3D-Aware Head Avatars

Teaser image

Next3D: Generative Neural Texture Rasterization for 3D-Aware Head Avatars
Jingxiang Sun, Xuan Wang, Lizhen Wang, Xiaoyu Li, Yong Zhang, Hongwen Zhang, Yebin Liu

Project | Paper | Twitter

Abstract: 3D-aware generative adversarial networks (GANs) synthesize high-fidelity and multi-view-consistent facial images using only collections of single-view 2D imagery. Towards fine-grained control over facial attributes, recent efforts incorporate 3D Morphable Face Model (3DMM) to describe deformation in generative radiance fields either explicitly or implicitly. Explicit methods provide fine-grained expression control but cannot handle topological changes caused by hair and accessories, while implicit ones can model varied topologies but have limited generalization caused by the unconstrained deformation fields. We propose a novel 3D GAN framework for unsupervised learning of generative, high-quality and 3D-consistent facial avatars from unstructured 2D images. To achieve both deformation accuracy and topological flexibility, we propose a 3D representation called Generative Texture-Rasterized Tri-planes. The proposed representation learns Generative Neural Textures on top of parametric mesh templates and then projects them into three orthogonal-viewed feature planes through rasterization, forming a tri-plane feature representation for volume rendering. In this way, we combine both fine-grained expression control of mesh-guided explicit deformation and the flexibility of implicit volumetric representation. We further propose specific modules for modeling mouth interior which is not taken into account by 3DMM. Our method demonstrates state-of-the-art 3D-aware synthesis quality and animation ability through extensive experiments. Furthermore, serving as 3D prior, our animatable 3D repre- sentation boosts multiple applications including one-shot facial avatars and 3D-aware stylization.

Requirements

  • 1–8 high-end NVIDIA GPUs. We have done all testing and development using V100, RTX3090, and A100 GPUs.
  • 64-bit Python 3.9 and PyTorch 1.12.0 (or later). See https://pytorch.org for PyTorch install instructions.
  • CUDA toolkit 11.3 or later.
  • Python libraries: see environment.yml for exact library dependencies. You can use the following commands with Miniconda3 to create and activate your Python environment:
    • cd Next3D
    • conda env create -f environment.yml
    • conda activate next3d

Getting started

Download our pretrained models following the link and put it under pretrained_models. For training Next3D on the top of EG3D, please also download the pretrained checkpoint ffhqrebalanced512-64.pkl of EG3D.

Generating media

# Generate videos for the shown cases using pre-trained model

python gen_videos_next3d.py --outdir=out --trunc=0.7 --seeds=10720,12374,13393,17099 --grid=2x2 \
    --network=pretrained_models/next3d_ffhq_512.pkl --obj_path=data/demo/demo.obj \
    --lms_path=data/demo/demo_kpt2d.txt --lms_cond=True
# Generate images and shapes (as .mrc files) for the shown cases using pre-trained model

python gen_samples.py --outdir=out --trunc=0.7 --shapes=true --seeds=166 \
    --network=pretrained_models/next3d_ffhq_512.pkl --obj_path=data/demo/demo.obj \
    --lms_path=data/demo/demo_kpt2d.txt --lms_cond=True

We visualize our .mrc shape files with UCSF Chimerax. Please refer to EG3D for more detailed instructions.

Reenacting generative avatars

Installation

Ensure the Deep3DFaceRecon_pytorch submodule is properly initialized

git submodule update --init --recursive

Download the pretrained models for FLAME estimation following DECA and put them into dataset_preprocessing/ffhq/deca/data; download the pretrained models for gaze estimation through the link and put them into dataset_preprocessing/ffhq/faceverse/data.

Preparing datasets

The video reenactment input contains three parts: camera poses dataset.json, FLAME meshes ('.obj') and 2D landmark files ('.txt'). For quick start, you can download the processed talking video of President Obama here and place the downloaded folder as data/obama. You can also preprocess your custom datasets by running the following commands:

cd dataset_preprocessing/ffhq
python preprocess_in_the_wild.py --indir=INPUT_IMAGE_FOLDER

You will obtain FLAME meshes and 2D landmark files for frames and a 'dataset.json'. Please put all these driving files into a same folder for reenactment later.

Reenacting samples

python reenact_avatar_next3d.py --drive_root=data/obama \
  --network=pretrained_models/next3d_ffhq_512.pkl \
  --grid=2x1 --seeds=166 --outdir=out --fname=reenact.mp4 \
  --trunc=0.7 --lms_cond=1

Training

Download and process Flickr-Faces-HQ dataset using the following commands.

cd dataset_preprocessing/ffhq
python runme.py

You can perform FLAME and landmarks estimation referring to preprocess_in_the_wild.py. We will also integrate all the preprocessing steps into a script soon. The dataset should be organized as below:

    ├── /path/to/dataset
    │   ├── meshes512x512
    │   ├── lms512x512
    │   ├── images512x512
    │   │   ├── 00000
                ├──img00000000.png
    │   │   ├── ...
    │   │   ├── dataset.json

You can train new networks using train_next3d.py. For example:

# Train with FFHQ on the top of EG3D with raw neural rendering resolution=64, using 8 GPUs.
python train_next3d.py --outdir=~/training-runs --cfg=ffhq --data=data/ffhq/images512x512 \
  --rdata data/ffhq/meshes512x512 --gpus=8 --batch=32 --gamma=4 --topology_path=data/demo/head_template.obj \
  --gen_pose_cond=True --gen_exp_cond=True --disc_c_noise=1 --load_lms=True --model_version=next3d \
  --resume pretrained_models/ffhqrebalanced512-64.pkl

Note that rendering-conditioned discriminator is not supported currently because obtaining rendering is still time-consuming. We are trying to accelerate this process and the training code will keep updating.

One-shot portrait reenactment and stylization

Code will come soon.

Citation

@inproceedings{sun2023next3d,
  author = {Sun, Jingxiang and Wang, Xuan and Wang, Lizhen and Li, Xiaoyu and Zhang, Yong and Zhang, Hongwen and Liu, Yebin},
  title = {Next3D: Generative Neural Texture Rasterization for 3D-Aware Head Avatars},
  booktitle = {CVPR},
  year = {2023}
}

Acknowledgements

Part of the code is borrowed from EG3D and DECA.

next3d's People

Contributors

mrtornado24 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

next3d's Issues

Will you release the Code?

Hi, thanks for this interesting work. I read your paper and find it interesting.

This repo was created a few moths ago but no update during this period. Will you have any plan to release the code?

How to condition the discriminator on deformation?

Hi, great work! I read in the paper that the discriminator is conditioned on a synthetic image representing deformation, but I cannot find corresponding code, could you please point me to the code where you get the synthetic image? Thanks!

ModuleNotFoundError: No module named 'third_libs'

Thank you very much for your work, but something wrong when running the following commands:

cd dataset_preprocessing/ffhq
python preprocess_in_the_wild.py --indir=INPUT_IMAGE_FOLDER
Traceback (most recent call last):
  File "/media/cfs/zhoufangru/workspace/3D_restruction/Next3D/dataset_preprocessing/ffhq/faceverse/fit_imgs_offline_cuda.py", line 14, in <module>
    from data_reader import ImageReader_FFHQ as ImageReader
  File "/media/cfs/zhoufangru/workspace/3D_restruction/Next3D/dataset_preprocessing/ffhq/faceverse/data_reader.py", line 8, in <module>
    from third_libs.OpenSeeFace.tracker import Tracker
ModuleNotFoundError: No module named 'third_libs'

Where can I download third_libs.

About dataset_mead.json and dataset_exp.json

Hi! Thanks for the excellent work! I just have a simple question about the training code:

With the param --gen_exp_cond and --gen_pose_cond, I think there should be the data dataset_mead.json and dataset_exp.json to be used, although you have checked if there is no json just set the pose and expression to None. So how to get these two jsons? I think the dataset_mead.json is just the dataset.json, what about the dataset_exp.json? Is it the parameter of BFM or FLAME?

TypeError: expected size to be one of int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int], but got size with types [<class 'numpy.int64'>, <class 'numpy.int64'>]

When I load the network from pretrained_models/next3d_ffhq_512.pkl,

Running img = G.synthesis() in all the code results in an error:

_ = G.synthesis(ws[:1], c[:1], verts[:1]) # warm up

File "", line 154, in synthesis
File "/root/miniconda3/envs/next3d/lib/python3.9/site-packages/torch/nn/functional.py", line 3924, in interpolate
raise TypeError(
TypeError: expected size to be one of int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int], but got size with types [<class 'numpy.int64'>, <class 'numpy.int64'>]

What could be the reason for this?

Missing data/ffhq/head_template.obj

Hi, Thanks for open-sourcing the code!

I'm trying to run the demo with reload_modules=True such that I can follow each step in the code. But I encountered the following error FileNotFoundError: [Errno 2] No such file or directory: 'data/ffhq/head_template.obj'. Could you please upload the missing obj file? Thanks!

How can I perform 3D-Aware Domain Adaption and change input as custom image?

At first, Thank you for this excellent services.

I want to cartoonized 3D view from seed image. so please tell me how to adapt cartoonized image.

And second, I think, seeds in your code means generating random image. but can I change this part to input my customed images rather than randomly generated image?

Thank you!

What is orth_scale and orth_shift?

Hi, Thanks for open-sourcing the project.

I am studying how to rasterize the FLAME mesh onto a tri-plane. In the code here, the vertices of the FLAME mesh is shifted and scaled by the pre-defined orth_shift and orth_scale. Could you please tell me what the purpose of this shifting and scaling operation? Is it used to align the FLAME mesh with the camera pose?

Camera pose for triplane

Hi, I appreciate your excellent work and I have some questions about the triplane configuration. In my own work, I found the pre-extracted camera pose of EG3D ( the original triplane work) appears increasingly inaccurate when the head rotation increases. So my question is, did you follow the original scripts in EG3D to extract the camera poses, or do you make other attempts?

Code

Hi, where is the code of this paper? Thanks.

parameter packs not expanded with ‘...’ in `preprocess_in_the_wild.py`

When running

command = f"python fit_imgs_offline_cuda.py --input {os.path.join(args.indir, 'crop')} --res_folder {os.path.join(args.indir, 'gaze_results')}"

We get:

[i 0810 18:42:45.557166 80 compiler.py:956] Jittor(1.3.8.5) src: /mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor
[i 0810 18:42:45.561653 80 compiler.py:957] g++ at /usr/bin/g++(11.4.0)
[i 0810 18:42:45.561714 80 compiler.py:958] cache_path: /home/xiao.wang/.cache/jittor/jt1.3.8/g++11.4.0/py3.7.12/Linux-5.15.0-5xf5/IntelRXeonRPlax86/default
[i 0810 18:42:45.566649 80 __init__.py:411] Found /usr/local/cuda/bin/nvcc(11.6.55) at /usr/local/cuda/bin/nvcc.
[i 0810 18:42:45.574267 80 __init__.py:411] Found addr2line(2.38) at /usr/bin/addr2line.
[i 0810 18:42:45.690106 80 compiler.py:1011] cuda key:cu11.6.55_sm_86
[i 0810 18:42:46.181445 80 __init__.py:227] Total mem: 739.62GB, using 16 procs for compiling.
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^ 
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor_utils/__init__.py", line 197, in do_compile
    return cc.cache_compile(cmd, cache_path, jittor_path)
RuntimeError: [f 0810 18:42:49.087578 80 log.cc:608] Check failed ret(256) == 0(0) Run cmd failed: "/usr/local/cuda/bin/nvcc"  "/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor/src/misc/nan_checker.cu"     -std=c++14 -Xcompiler -fPIC  -Xcompiler -march=native  -Xcompiler -fdiagnostics-color=always   -I"/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor/src" -I/mnt3/xiao.wang/miniconda3/envs/deep3d/include/python3.7m -I/mnt3/xiao.wang/miniconda3/envs/deep3d/include/python3.7m -DHAS_CUDA -DIS_CUDA -I"/usr/local/cuda/include" -I"/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor/extern/cuda/inc"   -I"/home/xiao.wang/.cache/jittor/jt1.3.8/g++11.4.0/py3.7.12/Linux-5.15.0-5xf5/IntelRXeonRPlax86/default/cu11.6.55_sm_86"   -O2   -c -o "/home/xiao.wang/.cache/jittor/jt1.3.8/g++11.4.0/py3.7.12/Linux-5.15.0-5xf5/IntelRXeonRPlax86/default/cu11.6.55_sm_86/obj_files/nan_checker.cu.o" -x cu --cudart=shared -ccbin="/usr/bin/g++"   -w  -I"/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor/extern/cuda/inc" 
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "fit_imgs_offline_cuda.py", line 5, in <module>
    import jittor as jt
  File "/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor/__init__.py", line 18, in <module>
    from . import compiler
  File "/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor/compiler.py", line 1354, in <module>
    compile(cc_path, cc_flags+opt_flags, files, 'jittor_core'+extension_suffix)
  File "/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor/compiler.py", line 151, in compile
    jit_utils.run_cmds(cmds, cache_path, jittor_path, "Compiling "+base_output)
  File "/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor_utils/__init__.py", line 251, in run_cmds
    for i,_ in enumerate(p.imap_unordered(do_compile, cmds)):
  File "/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/multiprocessing/pool.py", line 748, in next
    raise value
RuntimeError: [f 0810 18:42:49.087578 80 log.cc:608] Check failed ret(256) == 0(0) Run cmd failed: "/usr/local/cuda/bin/nvcc"  "/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor/src/misc/nan_checker.cu"     -std=c++14 -Xcompiler -fPIC  -Xcompiler -march=native  -Xcompiler -fdiagnostics-color=always   -I"/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor/src" -I/mnt3/xiao.wang/miniconda3/envs/deep3d/include/python3.7m -I/mnt3/xiao.wang/miniconda3/envs/deep3d/include/python3.7m -DHAS_CUDA -DIS_CUDA -I"/usr/local/cuda/include" -I"/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor/extern/cuda/inc"   -I"/home/xiao.wang/.cache/jittor/jt1.3.8/g++11.4.0/py3.7.12/Linux-5.15.0-5xf5/IntelRXeonRPlax86/default/cu11.6.55_sm_86"   -O2   -c -o "/home/xiao.wang/.cache/jittor/jt1.3.8/g++11.4.0/py3.7.12/Linux-5.15.0-5xf5/IntelRXeonRPlax86/default/cu11.6.55_sm_86/obj_files/nan_checker.cu.o" -x cu --cudart=shared -ccbin="/usr/bin/g++"   -w  -I"/mnt3/xiao.wang/miniconda3/envs/deep3d/lib/python3.7/site-packages/jittor/extern/cuda/inc" 

Wrong truncation_cutoff in gen_samples_next3d.py

In the file gen_samples_next3d.py,

@click.option('--trunc-cutoff', 'truncation_cutoff', type=int, help='Truncation cutoff', default=14, show_default=True)

the truncation cutoff is set to 14, meaning that the truncation is only applied to the texture_ws and not the eg3d_ws, because of this line

x[:, :truncation_cutoff] = self.w_avg.lerp(x[:, :truncation_cutoff], truncation_psi)

Is my understanding correct? I think because of this, we get a prominent stitching artifact where the FLAME rasterized texture and the static rendered features meet.

An example of what I mean:

Missing faceverse_v3.npy

For Next3D/dataset_preprocessing/ffhq/faceverse/fit_imgs_offline_cuda.py I need data/faceverse_v3.npy. Original faceverse repo provides only v1 and v2, and I can't feed them instead, because it does not have "madiapipe_keypoints":

self.kp_inds = jt.array(model_dict['mediapipe_keypoints'].flatten(), dtype=jt.int64).stop_grad()

About re-render the template mesh for Discriminator

Thanks for your excellent work.

In the paper, you said that "we re-render the template mesh under the rendered pose to get the synthetic rendering Isynthetic and feed it into Ddual along with image pairs".

However, I am having difficulty locating this specific process within the repository.
Could you please provide more information about how this process is implemented or direct me to a resource that explains it more clearly?

Thanks for your help!

Issue of reload_modules

Hi,

I have been trying to use the generator TriPlaneGenerator. When loading it with legacy, everything is fine. However, I am experiencing some issues when reloading the network pickle into it by using copy_params_and_buffers , as shown in the demo code. I have noticed some artifacts when doing so, which are visible in the following image:

1

I also came across what seems to be a bug in the code at this location:

alpha_image_side = (alpha_images[1].bool() | alpha_images[1].bool()).float()

I would appreciate any insights or assistance you could provide to help me resolve this issue.

Thank you for your time and support. I look forward to your response.

ffhq data download

thank you for your excellent work!
I'm reproducing the ffhq experiment,but in-the-wild-images is too large,and i can't understand the code in 'runme.py'.Could you please provide the zip of ffhq that next3d can use directly?

About train

hi, how to train on custom dataset? i have got FLAME and landmarks , but when i run the command you provided, it got error "--cond=True requires labels specified in dataset.json"

About the uv_face_eye_mask.png

hi,
thanks for your excellent work! when i followed the instruction for training, i found that data/ffhq/uv_face_ eye_ mask.png does not exist, can you provide this file?

Code about inversion

Hi,

Thanks for your amazing work!
Just want to know when you guys will release the code about the One-shot portrait reenactment and stylization.
Cannot wait to try it!

How to get high quality shapes?

Hi!

Thank you for sharing such a great code!
I want to obtain a high-quality face geometry, as shown in Figure 5 in the paper. However, I found that the code did not give a method to obtain high-quality shapes. I tried to take 64 * 64 * 3 normal maps given by the volume rendering, but it was very low-resolution.
How do you get the high-quality shape you displayed in the paper?
图片

Have a nice day.

TypeError occurded when running gen_videos_next3d.py in google colab

Hello,
Thanks for your great work.
I ran gen_videos_next3d.py in google colab, using your examlpe code showed on the github:

!python gen_videos_next3d.py --outdir=out --trunc=0.7 --seeds=10720,12374,13393,17099 --grid=2x2
--network=pretrained_models/next3d_ffhq_512.pkl --obj_path=data/demo/demo.obj
--lms_path=data/demo/demo_kpt2d.txt --lms_cond=True

But typeError occurded like this:

Loading networks from "pretrained_models/next3d_ffhq_512.pkl"...
Setting up PyTorch plugin "bias_act_plugin"... Done.
Setting up PyTorch plugin "upfirdn2d_plugin"... Done.
Traceback (most recent call last):
File "/content/Next3D/gen_videos_next3d.py", line 334, in
generate_images() # pylint: disable=no-value-for-parameter
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/content/Next3D/gen_videos_next3d.py", line 324, in generate_images
gen_interp_video(G=G, mp4=output, verts=v, bitrate='10M', grid_dims=grid, num_keyframes=num_keyframes, w_frames=w_frames, seeds=seeds, shuffle_seed=shuffle_seed, psi=truncation_psi, truncation_cutoff=truncation_cutoff, cfg=cfg, image_mode=image_mode, save_root=save_root)
File "/content/Next3D/gen_videos_next3d.py", line 105, in gen_interp_video
_ = G.synthesis(ws[:1], c[:1], verts[:1]) # warm up
File "", line 154, in synthesis
File "/usr/local/lib/python3.10/dist-packages/torch/nn/functional.py", line 3924, in interpolate
raise TypeError(
TypeError: expected size to be one of int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int], but got size with types [<class 'numpy.int64'>, <class 'numpy.int64'>]

360截图20240203231304549

env in colab:

python-utils 3.8.2
pytorch3d 0.7.5
python 3.10
torch 2.1.0+cu121
torchaudio 2.1.0+cu121
torchdata 0.7.0

evaluation.py 运行

我想运行[evaluation.py],首先需要获取pose和exp,提示需要从gen_videos import一些内容
我可以从哪获取这个吗?

Issue about portrait inversion.

Hi, Thanks for your great work!
I notice that the code of One-shot portrait reenactment and stylization is not released, so I try to invert image using PTI. However, I found that the latent code produced by PTI is [1,18,512]. The latent code(ws) in gen_samples_next3d.py is [1,28,512].

ws = G.mapping(z, conditioning_params, truncation_psi=truncation_psi, truncation_cutoff=truncation_cutoff)

And I notice that the same latent code in EG3D is [1,14,512]. Could you explain the changes or improvements in Next3D? Thanks a lot!

关于one-shot facial avatars和eg3d-pti的问题,请问是需要先对eg3d的预训练模型进行pti还是对训练好的next3d模型进行pti

同学您好,我在尝试使用eg3d-pti的代码对next3d的模型进行pti,但是会报一些错,我目前遇到的错是
File "/root/autodl-tmp/Next3D/eg3d/torch_utils/misc.py", line 97, in assert_shape raise AssertionError(f'Wrong size for dimension {idx}: got {size}, expected {ref_size}') AssertionError: Wrong size for dimension 1: got 28, expected 14
所以我不清楚是需要先对eg3d的预训练模型进行pti然后训练新的next3d还是对训练好的next3d模型进行pti,如果是可以对next3d模型进行pti的话,可否麻烦您给一些如何修改eg3d-pti项目中代码的指示,感激不尽!

Quick question

In the example on the README what is input and what is generated?

Wrong DECA rendering code

Hey, I am trying to perform the preprocessing on FFHQ, but the DECA estimation code that you have is simply wrong.

codedict['pose'][:, :3] = 0

basically changes the jaw rotation to be neutral. I don't know why.

And the line

landmarks2d_orig = landmarks2d.clone()

uses the original landmarks.

Using the original landmarks makes the outputs look like
Input
00000_inputs
Landmarks
00000_landmarks2d
Texture
00000

When you do not use the old landmarks

00180_inputs
00180_landmarks2d
00180

My question is this. When sampling which vertex positions/landmark positions should one use? (Yours)

The ones in the world space, or the ones generated by the orthographic projection. (The correct ones)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.