jhj0517
commited on
Commit
·
a0a4522
1
Parent(s):
fa03ede
move file location
Browse files
modules/live_portrait/live_portrait_inferencer.py
CHANGED
|
@@ -1,8 +1,4 @@
|
|
| 1 |
import logging
|
| 2 |
-
import os
|
| 3 |
-
import sys
|
| 4 |
-
import numpy as np
|
| 5 |
-
import torch
|
| 6 |
import cv2
|
| 7 |
import time
|
| 8 |
import copy
|
|
@@ -15,7 +11,7 @@ from ultralytics.utils import LOGGER as ultralytics_logger
|
|
| 15 |
from modules.utils.paths import *
|
| 16 |
from modules.utils.image_helper import *
|
| 17 |
from modules.live_portrait.model_downloader import *
|
| 18 |
-
from modules.live_portrait_wrapper import LivePortraitWrapper
|
| 19 |
from modules.utils.camera import get_rotation_matrix
|
| 20 |
from modules.utils.helper import load_yaml
|
| 21 |
from modules.config.inference_config import InferenceConfig
|
|
@@ -24,7 +20,6 @@ from modules.live_portrait.warping_network import WarpingNetwork
|
|
| 24 |
from modules.live_portrait.motion_extractor import MotionExtractor
|
| 25 |
from modules.live_portrait.appearance_feature_extractor import AppearanceFeatureExtractor
|
| 26 |
from modules.live_portrait.stitching_retargeting_network import StitchingRetargetingNetwork
|
| 27 |
-
from collections import OrderedDict
|
| 28 |
|
| 29 |
|
| 30 |
class LivePortraitInferencer:
|
|
|
|
| 1 |
import logging
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import cv2
|
| 3 |
import time
|
| 4 |
import copy
|
|
|
|
| 11 |
from modules.utils.paths import *
|
| 12 |
from modules.utils.image_helper import *
|
| 13 |
from modules.live_portrait.model_downloader import *
|
| 14 |
+
from modules.live_portrait.live_portrait_wrapper import LivePortraitWrapper
|
| 15 |
from modules.utils.camera import get_rotation_matrix
|
| 16 |
from modules.utils.helper import load_yaml
|
| 17 |
from modules.config.inference_config import InferenceConfig
|
|
|
|
| 20 |
from modules.live_portrait.motion_extractor import MotionExtractor
|
| 21 |
from modules.live_portrait.appearance_feature_extractor import AppearanceFeatureExtractor
|
| 22 |
from modules.live_portrait.stitching_retargeting_network import StitchingRetargetingNetwork
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
class LivePortraitInferencer:
|
modules/{live_portrait_wrapper.py → live_portrait/live_portrait_wrapper.py}
RENAMED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
import numpy as np
|
| 2 |
import torch
|
| 3 |
|
| 4 |
-
from .utils.helper import concat_feat
|
| 5 |
-
from .utils.camera import headpose_pred_to_degree, get_rotation_matrix
|
| 6 |
-
from .config.inference_config import InferenceConfig
|
|
|
|
| 7 |
|
| 8 |
class LivePortraitWrapper(object):
|
| 9 |
|
|
|
|
| 1 |
import numpy as np
|
| 2 |
import torch
|
| 3 |
|
| 4 |
+
from modules.utils.helper import concat_feat
|
| 5 |
+
from modules.utils.camera import headpose_pred_to_degree, get_rotation_matrix
|
| 6 |
+
from modules.config.inference_config import InferenceConfig
|
| 7 |
+
|
| 8 |
|
| 9 |
class LivePortraitWrapper(object):
|
| 10 |
|