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 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() 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