From 984496b5fc58ea91f37312ab63499a97634fcca1 Mon Sep 17 00:00:00 2001 From: "fuchen.ljl" Date: Tue, 16 Apr 2024 21:48:31 +0800 Subject: [PATCH 1/3] Update my_awing_arch.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正np版本不同的float类型 --- src/face3d/util/my_awing_arch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/face3d/util/my_awing_arch.py b/src/face3d/util/my_awing_arch.py index cd565617..cfab6236 100644 --- a/src/face3d/util/my_awing_arch.py +++ b/src/face3d/util/my_awing_arch.py @@ -15,7 +15,7 @@ def calculate_points(heatmaps): indexes = np.argmax(heatline, axis=2) preds = np.stack((indexes % W, indexes // W), axis=2) - preds = preds.astype(np.float, copy=False) + preds = preds.astype(np.float32, copy=False) inr = indexes.ravel() From 42363371d98650f80b932e54a1d69fed0bfe865c Mon Sep 17 00:00:00 2001 From: "fuchen.ljl" Date: Tue, 16 Apr 2024 21:49:05 +0800 Subject: [PATCH 2/3] Update preprocess.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复np版本不同,类型不同的问题 --- src/face3d/util/preprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/face3d/util/preprocess.py b/src/face3d/util/preprocess.py index b77a3a40..5b911442 100644 --- a/src/face3d/util/preprocess.py +++ b/src/face3d/util/preprocess.py @@ -98,6 +98,6 @@ def align_img(img, lm, lm3D, mask=None, target_size=224., rescale_factor=102.): # processing the image img_new, lm_new, mask_new = resize_n_crop_img(img, lm, t, s, target_size=target_size, mask=mask) - trans_params = np.array([w0, h0, s, t[0], t[1]]) + trans_params = np.array([w0, h0, s, t[0], t[1]], dtype=object) return trans_params, img_new, lm_new, mask_new From 3af9b6b83163ced8a9a47d036d29a0123a5b7f39 Mon Sep 17 00:00:00 2001 From: "fuchen.ljl" Date: Tue, 16 Apr 2024 21:50:24 +0800 Subject: [PATCH 3/3] Update requirements.txt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新版本,支持`np.complex_ --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b6505a54..0ce3843e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ numpy==1.23.4 face_alignment==1.3.5 imageio==2.19.3 imageio-ffmpeg==0.4.7 -librosa==0.9.2 # +librosa==0.10.1 # numba resampy==0.3.1 pydub==0.25.1