xg-chu / GPAvatar

[ICLR 2024] Generalizable and Precise Head Avatar from Image(s)
https://xg-chu.site/project_gpavatar/
MIT License
294 stars 22 forks source link

Resolution size? #23

Closed jryebread closed 5 months ago

jryebread commented 5 months ago

I noticed that the resolution for the video is at 512,512 - Will this work for larger size videos like 1920x1080?

Im trying to output just the video itself and not the grid (in 1080p resolution)

Also I tried to run lightning_tracker on a custom video but got an error, any idea wha ti might have done wrong? Thanks in advance for any help!


(track) root@ip-172-31-1-168:/home/ubuntu/GPAvatar/lightning_track# python track_video.py -v pp.mp4 --synthesis
Processing video data...
Processing video pp.mp4 with 313 frames.
 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 313/313  [ 0:00:27 < 0:00:00 , 12 it/s ]
Track with emoca/mica/insightface/mediapipe/...
   0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/313  [ 0:00:06 < -:--:-- , ? it/s ]INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
  99% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺ 311/313  [ 0:00:17 < 0:00:01 , 27 it/s ]
Track lightning...
 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1  [ 0:00:03 < 0:00:00 , ? it/s ]
Track synthesis...
Done.
Traceback (most recent call last):
  File "/home/ubuntu/GPAvatar/lightning_track/track_video.py", line 231, in <module>
    tracker.track_video(args.video_path, dir_path=args.outdir_path, synthesis=args.synthesis, no_vis=args.no_vis)
  File "/home/ubuntu/GPAvatar/lightning_track/track_video.py", line 34, in track_video
    synthesis_results = self.run_synthesis(base_results, lightning_results, lmdb_engine, output_path)
  File "/home/ubuntu/GPAvatar/lightning_track/track_video.py", line 71, in run_synthesis
    synthesis_result = self.tracker.track_synthesis(base_results, lightning_results, lmdb_engine, output_path)
  File "/home/ubuntu/GPAvatar/lightning_track/engines/core_engine.py", line 110, in track_synthesis
    tex_batch = [lightning_result[key] for key in tex_frames]
  File "/home/ubuntu/GPAvatar/lightning_track/engines/core_engine.py", line 110, in <listcomp>
    tex_batch = [lightning_result[key] for key in tex_frames]
KeyError: 'pp_69'
/home/ubuntu/GPAvatar/lightning_track/utils/lmdb_utils.py:46: RuntimeWarning: Writing engine not mannuly closed!
  warn('Writing engine not mannuly closed!', RuntimeWarning)```
xg-chu commented 5 months ago

We only need 512x512 now. This error is caused by some skipped frames, I have just fixed it.

P.S. These skipped frames usually caused by the face in some frames are too blur/big/small.