Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'reshape' #577

Open
mrbingo1024 opened this issue Sep 13, 2024 · 1 comment
Open

AttributeError: 'NoneType' object has no attribute 'reshape' #577

mrbingo1024 opened this issue Sep 13, 2024 · 1 comment

Comments

@mrbingo1024
Copy link

runfile('D:/pythoncode/CV/deepfakes/Deep-Live-Cam/new_model/run.py', wdir='D:/pythoncode/CV/deepfakes/Deep-Live-Cam/new_model')
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\bingo/.insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\bingo/.insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\bingo/.insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0
set det-size: (640, 640)
[DLC.CORE] Processing...
[DLC.FACE-SWAPPER] Progressing...
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
inswapper-shape: [1, 3, 128, 128]
Exception in Tkinter callback
Traceback (most recent call last):
File "D:\anaconda3\envs\nev1-deep_live_cam_python310\lib\tkinter_init_.py", line 1921, in call
return self.func(*args)
File "D:\anaconda3\envs\nev1-deep_live_cam_python310\lib\site-packages\customtkinter\windows\widgets\ctk_button.py", line 554, in _clicked
self._command()
File "D:\pythoncode\CV\deepfakes\Deep-Live-Cam\new_model\modules\ui.py", line 132, in
start_button = ctk.CTkButton(root, text='Start', cursor='hand2', command=lambda: analyze_target(start, root))
File "D:\pythoncode\CV\deepfakes\Deep-Live-Cam\new_model\modules\ui.py", line 174, in analyze_target
select_output_path(start)
File "D:\pythoncode\CV\deepfakes\Deep-Live-Cam\new_model\modules\ui.py", line 361, in select_output_path
start()
File "D:\pythoncode\CV\deepfakes\Deep-Live-Cam\new_model\modules\core.py", line 189, in start
frame_processor.process_image(modules.globals.source_path, modules.globals.output_path, modules.globals.output_path)
File "D:\pythoncode\CV\deepfakes\Deep-Live-Cam\new_model\modules\processors\frame\face_swapper.py", line 150, in process_image
result = process_frame(source_face, target_frame)
File "D:\pythoncode\CV\deepfakes\Deep-Live-Cam\new_model\modules\processors\frame\face_swapper.py", line 65, in process_frame
temp_frame = swap_face(source_face, target_face, temp_frame)
File "D:\pythoncode\CV\deepfakes\Deep-Live-Cam\new_model\modules\processors\frame\face_swapper.py", line 49, in swap_face
return get_face_swapper().get(temp_frame, target_face, source_face, paste_back=True)
File "D:\anaconda3\envs\nev1-deep_live_cam_python310\lib\site-packages\insightface\model_zoo\inswapper.py", line 50, in get
latent = source_face.normed_embedding.reshape((1,-1))
AttributeError: 'NoneType' object has no attribute 'reshape'

I have strictly followed the steps in the readme, but I keep getting the same error every time. What exactly is the problem in which part?

@UltraSeeder
Copy link

Try and change the image source for the target. It really helped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants