init
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -15,9 +15,9 @@ current_directory = os.path.dirname(current_file_path)
|
||||
sys.path.append(current_directory)
|
||||
|
||||
|
||||
# from src.config.argument_config import ArgumentConfig
|
||||
# from src.config.inference_config import InferenceConfig
|
||||
# from src.config.crop_config import CropConfig
|
||||
from src.config.argument_config import ArgumentConfig
|
||||
from src.config.inference_config import InferenceConfig
|
||||
from src.config.crop_config import CropConfig
|
||||
from src.live_portrait_pipeline import LivePortraitPipeline
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ def main():
|
||||
checkpoint_G,
|
||||
checkpoint_W,
|
||||
checkpoint_S,
|
||||
|
||||
mask_crop = None,
|
||||
flag_use_half_precision=True,
|
||||
flag_lip_zero=True,
|
||||
lip_zero_threshold=0.03,
|
||||
@@ -130,6 +130,7 @@ def main():
|
||||
self.device_id = device_id
|
||||
self.flag_do_crop = flag_do_crop
|
||||
self.flag_do_rot = flag_do_rot
|
||||
self.mask_crop=mask_crop
|
||||
|
||||
|
||||
args = ArgumentConfig(
|
||||
|
||||
@@ -33,9 +33,10 @@ class Trajectory:
|
||||
class Cropper(object):
|
||||
def __init__(self, **kwargs) -> None:
|
||||
device_id = kwargs.get('device_id', 0)
|
||||
landmark_runner_ckpt=kwargs.get('landmark_runner_ckpt', make_abs_path('../../pretrained_weights/liveportrait/landmark.onnx'))
|
||||
landmark_runner_ckpt=kwargs.get('landmark_runner_ckpt', make_abs_path('../../pretrained_weights/liveportrait/landmark.onnx'))[0]
|
||||
|
||||
insightface_pretrained_weights=kwargs.get('insightface_pretrained_weights', make_abs_path('../../pretrained_weights/insightface'))
|
||||
insightface_pretrained_weights=kwargs.get('insightface_pretrained_weights', make_abs_path('../../pretrained_weights/insightface'))[0]
|
||||
print('#insightface_pretrained_weights',insightface_pretrained_weights)
|
||||
self.landmark_runner = LandmarkRunner(
|
||||
# ckpt_path=make_abs_path('../../pretrained_weights/liveportrait/landmark.onnx'),
|
||||
ckpt_path=landmark_runner_ckpt,
|
||||
|
||||
@@ -31,7 +31,7 @@ class LandmarkRunner(object):
|
||||
device_id = kwargs.get('device_id', 0)
|
||||
self.dsize = kwargs.get('dsize', 224)
|
||||
self.timer = Timer()
|
||||
print('#onnx_provider',onnx_provider,device_id,ckpt_path)
|
||||
# print('#onnx_provider',onnx_provider,device_id,ckpt_path)
|
||||
if onnx_provider.lower() == 'cuda':
|
||||
self.session = onnxruntime.InferenceSession(
|
||||
ckpt_path, providers=[
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Reference in New Issue
Block a user