Attempting to Run Map Faces Results in Error With OpenCV
Here's the error I'm getting -
Exception in Tkinter callback
Traceback (most recent call last):
File "~\DeepLiveCam\lib\tkinter\__init__.py", line 1921, in __call__
return self.func(*args)
File "~\DeepLiveCam\lib\site-packages\customtkinter\windows\widgets\ctk_button.py", line 554, in _clicked
self._command()
File "~\DeepLiveCam\Deep-Live-Cam\modules\ui.py", line 132, in <lambda>
start_button = ctk.CTkButton(root, text='Start', cursor='hand2', command=lambda: analyze_target(start, root))
File "~\DeepLiveCam\Deep-Live-Cam\modules\ui.py", line 170, in analyze_target
create_source_target_popup(start, root, modules.globals.souce_target_map)
File "~\DeepLiveCam\Deep-Live-Cam\modules\ui.py", line 206, in create_source_target_popup
image = Image.fromarray(cv2.cvtColor(item['target']['cv2'], cv2.COLOR_BGR2RGB))
cv2.error: OpenCV(4.8.1) ~\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
I am not able to find create_source_target_popup in experimental branch
I am experiencing the same.
Replicate
- Run the app
- Put a Picture
on the leftand a Videoon the right. toggleMap faces- press
Start
On Console output I get the following
Creating temp resources...
Extracting frames...
Extracting face embeddings from frames: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 26/26 [00:15<00:00, 1.65it/s]
Mapping frame embeddings to centroids-0: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 26/26 [00:00<00:00, 196844.59it/s]
Mapping frame embeddings to centroids-1: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 26/26 [00:00<00:00, 250694.03it/s]
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.10/tkinter/__init__.py", line 1924, in __call__
return self.func(*args)
File "/data/repos/Deep-Live-Cam/env/lib/python3.10/site-packages/customtkinter/windows/widgets/ctk_button.py", line 554, in _clicked
self._command()
File "/data/repos/Deep-Live-Cam/modules/ui.py", line 391, in <lambda>
command=lambda: analyze_target(start, root),
File "/data/repos/Deep-Live-Cam/modules/ui.py", line 485, in analyze_target
create_source_target_popup(start, root, modules.globals.souce_target_map)
File "/data/repos/Deep-Live-Cam/modules/ui.py", line 559, in create_source_target_popup
image = Image.fromarray(cv2.cvtColor(item["target"]["cv2"], cv2.COLOR_BGR2RGB))
cv2.error: OpenCV(4.8.1) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'
and then a second window pops-up, titled Source x Target Mapper, like below
Then no matter if I select another image (which btw I am not sure why I need to) the console remains as it is.
If I click the Start button on the main window, I get prompted I should finish my business with the 2nd window.
If I close the 2nd window and then click Start, then the app state reaches the same deadlock/bug as described above
System
OS: Linux Mint 20.2 CinnamonLinux Kernel: 5.15.0-43-genericRuntime: Python 3.10
Map faces works if you're planning to have multiple faces on the scene or if you want to target a specific face.