warmshao/FasterLivePortrait

camera.bat显示加载human model,可能无法检测动物图片。

Closed this issue · 5 comments

在使用source文件夹中提供的s39小猫图片,启动camera.bat后显示以下错误:

source image: [assets\examples\source\s39.jpg]
INFO:albumentations.check_version:A new version of Albumentations is available: 1.4.13 (you have 1.4.11). Upgrade using: pip install --upgrade albumentations
load Human Model >>>
loading model: warping_spade
{'name': 'WarpingSpadeModel', 'predict_type': 'trt', 'model_path': './checkpoints/liveportrait_onnx/warping_spade-fix.trt'}
loading model: motion_extractor
{'name': 'MotionExtractorModel', 'predict_type': 'trt', 'model_path': './checkpoints/liveportrait_onnx/motion_extractor.trt'}
loading model: landmark
{'name': 'LandmarkModel', 'predict_type': 'trt', 'model_path': './checkpoints/liveportrait_onnx/landmark.trt'}
loading model: face_analysis
{'name': 'FaceAnalysisModel', 'predict_type': 'trt', 'model_path': ['./checkpoints/liveportrait_onnx/retinaface_det_static.trt', './checkpoints/liveportrait_onnx/face_2dpose_106_static.trt']}
loading model: app_feat_extractor
{'name': 'AppearanceFeatureExtractorModel', 'predict_type': 'trt', 'model_path': './checkpoints/liveportrait_onnx/appearance_feature_extractor.trt'}
trt
loading model: stitching
{'name': 'StitchingModel', 'predict_type': 'trt', 'model_path': './checkpoints/liveportrait_onnx/stitching.trt'}
loading model: stitching_eye_retarget
{'name': 'StitchingModel', 'predict_type': 'trt', 'model_path': './checkpoints/liveportrait_onnx/stitching_eye.trt'}
loading model: stitching_lip_retarget
{'name': 'StitchingModel', 'predict_type': 'trt', 'model_path': './checkpoints/liveportrait_onnx/stitching_lip.trt'}
process source:assets\examples\source\s39.jpg >>>>>>>>
0%| | 0/1 [00:00<?, ?it/s]No face detected in the this image.
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 54.80it/s]
finish process source:assets\examples\source\s39.jpg >>>>>>>>
no face in assets\examples\source\s39.jpg! exit!

哦,camera.bat现在只支持人脸,要支持动物也简单,需要改一个参数调用animal的模型,我晚上更新

It has been supported now

It has been supported now

您好,我从夸克网盘下载了今天更新的整合包,设置完camera.bat中的默认图像为s39.jpg后,依然显示加载human model并且检测失败,我同样尝试更换了一只柯基犬的图像去检测,也是检测失败。是不是我的打开方式不对😰?

`@echo off
setlocal enabledelayedexpansion

REM 设置默认源图像路径
set "default_src_image=assets\examples\source\s39.jpg"

REM 检查是否提供了源图像参数,如果没有则使用默认值
if "%~1"=="" (
set "src_image=%default_src_image%"
echo source image: [!src_image!]
) else (
set "src_image=%~1"
echo source image: [!src_image!]
)

REM 检查是否提供了animal参数
if "%~2"=="" (
set "animal_param="
) else (
set "animal_param=--animal"
)

REM 执行Python命令
.\venv\python.exe .\run.py --cfg configs/trt_infer.yaml --realtime --dri_video 0 --src_image !src_image! !animal_param!

endlocal`

需要在后面加上一个 animal类似这样 camera.bat .\assets\examples\source\s39.jpg animal

需要在后面加上一个 animal类似这样 camera.bat .\assets\examples\source\s39.jpg animal

6.mp4

谢谢,我将camera.bat的路径修改为set "default_src_image=assets\examples\source\s39.jpg --animal"就可以使用动物模式了,同样为了增加一点便捷性,我为webui添加了一个启用动物模式的勾选按钮来随时切换模式。不过我目前仍然对“在webui中内置实时输出render窗口”的功能代码感到头大,对于我来说....可能完全超纲了😂。也许我应该直接发布一个webui的代码,而不是只为一个文件单独拉一个PR出来。