Closed aaawrong closed 2 years ago
Hi, we only tested the code with python 3.8 and the versions of the packages as listed in requirements.txt. I would suggest creating a new conda environment with python 3.8 and then pip installing from requirements.txt. Hope that helps.
Thanks for your reply!And sorry to bother you again. I tried using python3.8 and the requirements.But when I run the crop_mouths.py,it still make a mistake. The landmark pictures (png) I made are 960x480, and then I turn then into npy. Maybe there was a mistake here?
File "F:\Anaconda3\envs\py38torch19\lib\site-packages\skimage\transform_geometric.py", line 1621, in estimate_transform tform.estimate(src, dst, *args, **kwargs) File "F:\Anaconda3\envs\py38torch19\lib\site-packages\skimage\transform_geometric.py", line 1362, in estimate self.params = _umeyama(src, dst, estimate_scale=True) File "F:\Anaconda3\envs\py38torch19\lib\site-packages\skimage\transform_geometric.py", line 128, in _umeyama A = dst_demean.T @ src_demean / num ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 960 is different from 5)
In what format are the landmarks you use? The numpy array of the landmarks for each frame must be of size (68, 2), i.e., there are 68 landmarks per frame. You can use FAN to compute them.
Closing this now. Please reopen if you're still having issues.
Closing this now. Please reopen if you're still having issues.
Sorry for the late reply, thanks for your help.
Hi,thank you for sharing and I want to ask for some help
my scipy version is 1.5.4 and I cant install the 1.7.1
when I run the code ,it make a mistake
Processing Face2Face... 0%| | 0/1000 [00:00<?, ?it/s] Traceback (most recent call last): File "preprocessing/crop_mouths.py", line 199, in
main()
File "preprocessing/crop_mouths.py", line 195, in main
crop_video_and_save(video_dir, landmarks_dir, target_dir, mean_face_landmarks, args)
File "preprocessing/crop_mouths.py", line 122, in crop_video_and_save
smoothed_landmarks[STABLE_POINTS, :], mean_face_landmarks[STABLE_POINTS, :], cur_frame, STD_SIZE
File "F:\master-data\deepfake\LipForensics\preprocessing\utils.py", line 24, in warp_img
tform = tf.estimate_transform("similarity", src, dst) # find the transformation matrix
File "F:\Anaconda3\envs\pytorch19\lib\site-packages\skimage\transform_geometric.py", line 1408, in estimate_transform
tform.estimate(src, dst, **kwargs)
File "F:\Anaconda3\envs\pytorch19\lib\site-packages\skimage\transform_geometric.py", line 1169, in estimate
self.params = _umeyama(src, dst, True)
File "F:\Anaconda3\envs\pytorch19\lib\site-packages\skimage\transform_geometric.py", line 109, in _umeyama
A = dst_demean.T @ src_demean / num
ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 960 is different from 5)