Open abangzhu opened 1 month ago
could be that you are using python 3.9 but not sure
with python 3.10 it works perfect on ubuntu and windows
The numpy installation package version is incorrect.
You can try these:
pip uninstall numpy
, then pip install numpy==1.26.4
.
python inference.py [19:27:37] Load appearance_feature_extractor done. live_portrait_wrapper.py:40 Load motion_extractor done. live_portrait_wrapper.py:43 [19:27:38] Load warping_module done. live_portrait_wrapper.py:46 Load spade_generator done. live_portrait_wrapper.py:49 Load stitching_retargeting_module done. live_portrait_wrapper.py:53 [19:27:40] LandmarkRunner warmup time: 1.747s landmark_runner.py:95 Traceback (most recent call last): File "/data/home/shixinwang/LivePortrait/inference.py", line 57, in
main()
File "/data/home/shixinwang/LivePortrait/inference.py", line 47, in main
live_portrait_pipeline = LivePortraitPipeline(
File "/data/home/shixinwang/LivePortrait/src/live_portrait_pipeline.py", line 39, in init
self.cropper: Cropper = Cropper(crop_cfg=crop_cfg)
File "/data/home/shixinwang/LivePortrait/src/utils/cropper.py", line 71, in init
self.face_analysis_wrapper.warmup()
File "/data/home/shixinwang/LivePortrait/src/utils/face_analysis_diy.py", line 76, in warmup
self.get(img_bgr)
File "/data/home/shixinwang/LivePortrait/src/utils/face_analysis_diy.py", line 47, in get
bboxes, kpss = self.det_model.detect(img_bgr, max_num=max_num, metric='default')
File "/data/home/shixinwang/LivePortrait/src/utils/dependencies/insightface/model_zoo/retinaface.py", line 224, in detect
scores_list, bboxes_list, kpss_list = self.forward(det_img, self.det_thresh)
File "/data/home/shixinwang/LivePortrait/src/utils/dependencies/insightface/model_zoo/retinaface.py", line 194, in forward
bboxes = distance2bbox(anchor_centers, bbox_preds)
File "/data/home/shixinwang/LivePortrait/src/utils/dependencies/insightface/model_zoo/retinaface.py", line 38, in distance2bbox
x1 = points[:, 0] - distance[:, 0]
File "/data/home/shixinwang/anaconda3/envs/LivePortrait/lib/python3.9/site-packages/numpy/_core/_internal.py", line 872, in array_ufunc_errmsg_formatter
args_string = ', '.join(['{!r}'.format(arg) for arg in inputs] +
File "/data/home/shixinwang/anaconda3/envs/LivePortrait/lib/python3.9/site-packages/numpy/_core/_internal.py", line 872, in
args_string = ', '.join(['{!r}'.format(arg) for arg in inputs] +
File "/data/home/shixinwang/anaconda3/envs/LivePortrait/lib/python3.9/site-packages/numpy/_core/arrayprint.py", line 1551, in _array_repr_implementation
skipdtype = dtype_is_implied(arr.dtype) and arr.size > 0
File "/data/home/shixinwang/anaconda3/envs/LivePortrait/lib/python3.9/site-packages/numpy/_core/arrayprint.py", line 1492, in dtype_is_implied
dtype = np.dtype(dtype)
TypeError