ashawkey / RAD-NeRF

Real-time Neural Radiance Talking Portrait Synthesis via Audio-spatial Decomposition
MIT License
878 stars 153 forks source link

No such file or directory: track_params.pt #10

Open pegahs1993 opened 1 year ago

pegahs1993 commented 1 year ago
Output #0, image2, to 'data/obama/ori_imgs/%d.jpg':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    date            : 2021/06/24 23:54:51
    encoder         : Lavf57.83.100
    Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 450x450 [SAR 1:1 DAR 1:1], q=1-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc57.107.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 8000 fps=407 q=1.0 Lsize=N/A time=00:05:20.00 bitrate=N/A speed=16.3x    
video:264215kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[INFO] ===== extracted images =====
[INFO] ===== extract semantics from data/obama/ori_imgs to data/obama/parsing =====
[INFO] loading model...
Downloading: "https://download.pytorch.org/models/resnet18-5c106cde.pth" to /root/.cache/torch/hub/checkpoints/resnet18-5c106cde.pth
100% 44.7M/44.7M [00:00<00:00, 48.9MB/s]
100% 8000/8000 [09:48<00:00, 13.61it/s]
[INFO] ===== extracted semantics =====
[INFO] ===== extract background image from data/obama/ori_imgs =====
100% 400/400 [02:35<00:00,  2.57it/s]
[INFO] ===== extracted background image =====
[INFO] ===== extract torso and gt images for data/obama =====
100% 8000/8000 [05:32<00:00, 24.05it/s]
[INFO] ===== extracted torso and gt images =====
[INFO] ===== extract face landmarks from data/obama/ori_imgs =====
/usr/local/lib/python3.7/site-packages/skimage/io/manage_plugins.py:23: UserWarning: Your installed pillow version is < 8.1.2. Several security issues (CVE-2021-27921, CVE-2021-25290, CVE-2021-25291, CVE-2021-25293, and more) have been fixed in pillow 8.1.2 or higher. We recommend to upgrade this library.
  from .collection import imread_collection_wrapper
Downloading: "https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth" to /root/.cache/torch/hub/checkpoints/s3fd-619a316812.pth
100% 85.7M/85.7M [00:08<00:00, 10.8MB/s]
Downloading: "https://www.adrianbulat.com/downloads/python-fan/2DFAN4-cd938726ad.zip" to /root/.cache/torch/hub/checkpoints/2DFAN4-cd938726ad.zip
100% 91.9M/91.9M [00:08<00:00, 11.4MB/s]
100% 8000/8000 [07:55<00:00, 16.83it/s]
[INFO] ===== extracted face landmarks =====
[INFO] ===== perform face tracking =====
Traceback (most recent call last):
  File "data_utils/face_tracking/face_tracker.py", line 42, in <module>
    os.path.join(dir_path, "3DMM"), id_dim, exp_dim, tex_dim, point_num
  File "/content/RAD-NeRF/data_utils/face_tracking/facemodel.py", line 16, in __init__
    os.path.join(modelpath, "3DMM_info.npy"), allow_pickle=True
  File "/usr/local/lib/python3.7/site-packages/numpy/lib/npyio.py", line 417, in load
    fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: '/content/RAD-NeRF/data_utils/face_tracking/3DMM/3DMM_info.npy'
[INFO] ===== finished face tracking =====
[INFO] ===== save transforms =====
Traceback (most recent call last):
  File "data_utils/process.py", line 401, in <module>
    save_transforms(base_dir, ori_imgs_dir)
  File "data_utils/process.py", line 270, in save_transforms
    params_dict = torch.load(os.path.join(base_dir, 'track_params.pt'))
  File "/usr/local/lib/python3.7/site-packages/torch/serialization.py", line 581, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "/usr/local/lib/python3.7/site-packages/torch/serialization.py", line 230, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "/usr/local/lib/python3.7/site-packages/torch/serialization.py", line 211, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'data/obama/track_params.pt'

Hi @ashawkey , Is this problem due to the incompatibility of the dependency version? I'd really appreciate your help

ashawkey commented 1 year ago

@tylersky1993 Hi, if you are going to process the data by yourself, you need to follow the steps here first.

waityousea commented 1 year ago

In data_utils/process.py, the task, face tracking, has not been completed. The code detail as follow:

face tracking

if opt.task == -1 or opt.task == 8:
    face_tracking(ori_imgs_dir)
91xiaoyang commented 1 year ago

I am conducting/- O -- iters 250000-- finetune_ Lips, error reported: RuntimeError: Given input size: (192x2x2x2) Calculated output size: (192x0x0). Output size is too small, have you encountered it before?

pegahs1993 commented 1 year ago

Could you solve this issue? @waityousea

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 192.00 MiB (GPU 0; 6.00 GiB total capacity; 4.85 GiB already allocated; 0 bytes free; 5.14 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
Traceback (most recent call last):
  File "D:\..\RAD-NeRF\data_utils\process.py", line 401, in <module>
    save_transforms(base_dir, ori_imgs_dir)
  File "D:\..\RAD-NeRF\data_utils\process.py", line 270, in save_transforms
    params_dict = torch.load(os.path.join(base_dir, 'track_params.pt'))
  File "C:\Users\..\anaconda3\envs\py3d\lib\site-packages\torch\serialization.py", line 771, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "C:\Users\..\anaconda3\envs\py3d\lib\site-packages\torch\serialization.py", line 270, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "C:\Users\..\anaconda3\envs\py3d\lib\site-packages\torch\serialization.py", line 251, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'data/obama\\track_params.pt'
waityousea commented 1 year ago

Could you solve this issue? @waityousea

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 192.00 MiB (GPU 0; 6.00 GiB total capacity; 4.85 GiB already allocated; 0 bytes free; 5.14 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
Traceback (most recent call last):
  File "D:\..\RAD-NeRF\data_utils\process.py", line 401, in <module>
    save_transforms(base_dir, ori_imgs_dir)
  File "D:\..\RAD-NeRF\data_utils\process.py", line 270, in save_transforms
    params_dict = torch.load(os.path.join(base_dir, 'track_params.pt'))
  File "C:\Users\..\anaconda3\envs\py3d\lib\site-packages\torch\serialization.py", line 771, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "C:\Users\..\anaconda3\envs\py3d\lib\site-packages\torch\serialization.py", line 270, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "C:\Users\..\anaconda3\envs\py3d\lib\site-packages\torch\serialization.py", line 251, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'data/obama\\track_params.pt'

这个问题是由于视频在预处理部分的第8步没有处理完成所导致的

phoeenniixx commented 1 month ago

I am conducting/- O -- iters 250000-- finetune_ Lips, error reported: RuntimeError: Given input size: (192x2x2x2) Calculated output size: (192x0x0). Output size is too small, have you encountered it before?

did you got any solution to it? please help me, facing the same issue