feiiyin / spi Goto Github PK
View Code? Open in Web Editor NEW[CVPR 2023] SPI: 3D GAN Inversion with Facial Symmetry Prior
[CVPR 2023] SPI: 3D GAN Inversion with Facial Symmetry Prior
!python preprocess/run_total.py --input_root=input_root --output_root=output_root --mode=jpg
----------------- Options ---------------
add_image: True
bfm_folder: /apdcephfs/share_1290939/feiiyin/TH/PIRender_bak/Deep3DFaceRecon_pytorch/BFM/ [default: BFM]
bfm_model: BFM_model_front.mat
camera_d: 10.0
center: 112.0
checkpoints_dir: /apdcephfs/share_1290939/feiiyin/TH/PIRender_bak/Deep3DFaceRecon_pytorch/checkpoints [default: ./checkpoints]
dataset_mode: None
ddp_port: 12355
display_per_batch: True
epoch: 20 [default: latest]
eval_batch_nums: inf
focal: 1015.0
gpu_ids: 0
img_folder: temp [default: examples]
init_path: checkpoints/init_model/resnet50-0676ba61.pth
isTrain: False [default: None]
model: facerecon
name: model_name [default: face_recon]
net_recon: resnet50
phase: test
suffix:
use_ddp: False [default: True]
use_last_fc: False
verbose: False
vis_batch_nums: 1
world_size: 1
z_far: 15.0
z_near: 5.0
----------------- End -------------------
Transfer BFM09 to BFM_model_front......
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/scipy/io/matlab/_mio.py", line 39, in _open_file
return open(file_like, mode), True
FileNotFoundError: [Errno 2] No such file or directory: '/apdcephfs/share_1290939/feiiyin/TH/PIRender_bak/Deep3DFaceRecon_pytorch/BFM/01_MorphableModel.mat'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/content/SPI/preprocess/run_total.py", line 92, in
main()
File "/content/SPI/preprocess/run_total.py", line 38, in main
extractor = CameraExtractor(crop_outdir=None, c_outdir=None, mode=None)
File "/content/SPI/preprocess/extract_camera.py", line 57, in init
self.model_3dmm = Extract3dmm({
File "/content/SPI/preprocess/extract_3dmm.py", line 119, in init
self.model = create_model(opt)
File "/content/SPI/third_part/Deep3DFaceRecon_pytorch/models/init.py", line 66, in create_model
instance = model(opt)
File "/content/SPI/third_part/Deep3DFaceRecon_pytorch/models/facerecon_model.py", line 92, in init
self.facemodel = ParametricFaceModel(
File "/content/SPI/third_part/Deep3DFaceRecon_pytorch/models/bfm.py", line 40, in init
transferBFM09(bfm_folder)
File "/content/SPI/third_part/Deep3DFaceRecon_pytorch/util/load_mats.py", line 34, in transferBFM09
original_BFM = loadmat(osp.join(bfm_folder, '01_MorphableModel.mat'))
File "/usr/local/lib/python3.10/dist-packages/scipy/io/matlab/_mio.py", line 225, in loadmat
with _open_file_context(file_name, appendmat) as f:
File "/usr/lib/python3.10/contextlib.py", line 135, in enter
return next(self.gen)
File "/usr/local/lib/python3.10/dist-packages/scipy/io/matlab/_mio.py", line 17, in _open_file_context
f, opened = _open_file(file_like, appendmat, mode)
File "/usr/local/lib/python3.10/dist-packages/scipy/io/matlab/_mio.py", line 45, in _open_file
return open(file_like, mode), True
FileNotFoundError: [Errno 2] No such file or directory: '/apdcephfs/share_1290939/feiiyin/TH/PIRender_bak/Deep3DFaceRecon_pytorch/BFM/01_MorphableModel.mat'
Hi, when I ran this project I found it's cool that the camera parameters (including poses, angles, intrinsic) can be extracted and saved at the path "./test/dataset/c/". But I'm confused about the method of extracting camera parameters. I referred to your paper and found this part about camera parameters:
Then I referred to the paper [9] "Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set", there are no descriptions about extracting camera pose and intrinsic.
So could you explain how the camera parameters are extracted from input face images?
(PS: I referred to the project codes but failed to understand how the camera poses and intrinsic are extracted, but I guess that camera parameters might be calculated from the 3dmm coefficient -- the pose of face? )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.