Unexpected Crash during extraction : cv2.error: OpenCV(4.4.0)

Extracting faces for training and converting
Forum rules
Read the FAQs and search the forum before posting a new topic.

Please mark any answers that fixed your problems so others can find the solutions.
Post Reply
User avatar
burgew
Posts: 2
Joined: Mon Aug 24, 2020 12:33 am
Has thanked: 1 time

Unexpected Crash during extraction : cv2.error: OpenCV(4.4.0)

Post by burgew »

I'm doing an extraction on Mac OS/X, and have gotten this error after processing about 24% of 48116 video frames extraction. Here's the stack trace and I have appended the contents of the log file. Also, I am running the latest and greatest version of the project, having done a git pull just before starting the extraction (commit 1f9e834719282245ed245ec2266412e03d13b1bc).

Code: Select all

eback (most recent call last):
  File "/Users/burgew/Develop/github/faceswap/lib/cli/launcher.py", line 156, in execute_script
    process.process()
  File "/Users/burgew/Develop/github/faceswap/scripts/extract.py", line 117, in process
    self._run_extraction()
  File "/Users/burgew/Develop/github/faceswap/scripts/extract.py", line 213, in _run_extraction
    for idx, extract_media in enumerate(status_bar):
  File "/Users/burgew/miniconda3/envs/py3.7-face/lib/python3.7/site-packages/tqdm/std.py", line 1130, in __iter__
    for obj in iterable:
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/pipeline.py", line 233, in detected_faces
    if self._check_and_raise_error():
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/pipeline.py", line 655, in _check_and_raise_error
    if plugin.check_and_raise_error():
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/_base.py", line 302, in check_and_raise_error
    err = thread.check_and_raise_error()
  File "/Users/burgew/Develop/github/faceswap/lib/multithreading.py", line 84, in check_and_raise_error
    raise error[1].with_traceback(error[2])
  File "/Users/burgew/Develop/github/faceswap/lib/multithreading.py", line 37, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/_base.py", line 420, in _thread_process
    batch = function(batch)
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/align/cv2_dnn.py", line 54, in process_input
    faces, batch["roi"], batch["offsets"] = self.align_image(batch)
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/align/cv2_dnn.py", line 82, in align_image
    face = cv2.resize(face, dsize=sizes, interpolation=interpolation)
cv2.error: OpenCV(4.4.0) /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/pip-req-build-nxr3bp45/opencv/modules/imgproc/src/resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'resize'

Log File:

08/23/2020 17:27:24 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011609.png
08/23/2020 17:27:24 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011610.png
08/23/2020 17:27:24 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011611.png
08/23/2020 17:27:24 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011612.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011613.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011614.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011615.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011616.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011617.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011618.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011619.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011620.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011621.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011622.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011623.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011624.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011625.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011626.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011627.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011628.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011629.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011630.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011631.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011632.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011633.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011634.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011635.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011636.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011637.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011638.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011639.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011640.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011641.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011642.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011643.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011644.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011645.png
08/23/2020 17:27:25 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011646.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011647.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011648.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011649.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011650.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011651.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011652.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011653.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011654.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011655.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011656.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011657.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011658.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011659.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011660.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011661.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011662.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011663.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011664.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011665.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011666.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011667.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011668.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011669.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011670.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011671.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011672.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011673.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011674.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011675.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011676.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011677.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011678.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011679.png
08/23/2020 17:27:26 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011680.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011681.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011682.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011683.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011684.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011685.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011686.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011687.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011688.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011689.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011690.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011691.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011692.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011693.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011694.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011695.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011696.png
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011698.png
08/23/2020 17:27:27 MainProcess     MainThread      image           _set_thread               DEBUG    Setting thread
08/23/2020 17:27:27 MainProcess     MainThread      image           _set_thread               DEBUG    Thread pre-exists and is alive: <lib.multithreading.MultiThread object at 0x7fdd41c217d0>
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011699.png
08/23/2020 17:27:27 MainProcess     MainThread      image           _set_thread               DEBUG    Setting thread
08/23/2020 17:27:27 MainProcess     MainThread      image           _set_thread               DEBUG    Thread pre-exists and is alive: <lib.multithreading.MultiThread object at 0x7fdd41c217d0>
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011702.png
08/23/2020 17:27:27 MainProcess     MainThread      image           _set_thread               DEBUG    Setting thread
08/23/2020 17:27:27 MainProcess     MainThread      image           _set_thread               DEBUG    Thread pre-exists and is alive: <lib.multithreading.MultiThread object at 0x7fdd41c217d0>
08/23/2020 17:27:27 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011703.png
08/23/2020 17:27:27 MainProcess     align_cv2-dnn_aligner_input_0 multithreading  run                       DEBUG    Error in thread (align_cv2-dnn_aligner_input_0): OpenCV(4.4.0) /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/pip-req-build-nxr3bp45/opencv/modules/imgproc/src/resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'resize'\n
08/23/2020 17:27:28 MainProcess     MainThread      multithreading  check_and_raise_error     DEBUG    Thread error caught: [(<class 'cv2.error'>, error("OpenCV(4.4.0) /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/pip-req-build-nxr3bp45/opencv/modules/imgproc/src/resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'resize'\n"), <traceback object at 0x7fdd2d4df6e0>)]
Traceback (most recent call last):
  File "/Users/burgew/Develop/github/faceswap/lib/cli/launcher.py", line 156, in execute_script
    process.process()
  File "/Users/burgew/Develop/github/faceswap/scripts/extract.py", line 117, in process
    self._run_extraction()
  File "/Users/burgew/Develop/github/faceswap/scripts/extract.py", line 213, in _run_extraction
    for idx, extract_media in enumerate(status_bar):
  File "/Users/burgew/miniconda3/envs/py3.7-face/lib/python3.7/site-packages/tqdm/std.py", line 1130, in __iter__
    for obj in iterable:
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/pipeline.py", line 233, in detected_faces
    if self._check_and_raise_error():
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/pipeline.py", line 655, in _check_and_raise_error
    if plugin.check_and_raise_error():
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/_base.py", line 302, in check_and_raise_error
    err = thread.check_and_raise_error()
  File "/Users/burgew/Develop/github/faceswap/lib/multithreading.py", line 84, in check_and_raise_error
    raise error[1].with_traceback(error[2])
  File "/Users/burgew/Develop/github/faceswap/lib/multithreading.py", line 37, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/_base.py", line 420, in _thread_process
    batch = function(batch)
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/align/cv2_dnn.py", line 54, in process_input
    faces, batch["roi"], batch["offsets"] = self.align_image(batch)
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/align/cv2_dnn.py", line 82, in align_image
    face = cv2.resize(face, dsize=sizes, interpolation=interpolation)
cv2.error: OpenCV(4.4.0) /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/pip-req-build-nxr3bp45/opencv/modules/imgproc/src/resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'resize'


============ System Information ============
encoding:            UTF-8
git_branch:          master
git_commits:         1f9e834 typofix. 0e31b98 Training - Add L2 Regularization to Structural Losses. 83bd60d training - Use explicit loss dictionaries to map to outputs. d5c62d1 bugfix - Training - Prevent crash on manual preview update. 8c8e1b2 Training Config - Split Loss to it's own section
gpu_cuda:            Unsupported OS. Check Conda packages for Conda Cuda
gpu_cudnn:           Unsupported OS. Check Conda packages for Conda cuDNN
gpu_devices:         
gpu_devices_active:  
gpu_driver:          0
gpu_vram:            
os_machine:          x86_64
os_platform:         Darwin-19.6.0-x86_64-i386-64bit
os_release:          19.6.0
py_command:          faceswap.py extract -i /Users/burgew/Data/faceswap/src/Marica/Marica.GregBeard.1080P_4000K_266431232.mp4 -o /Users/burgew/Data/faceswap/samples/Marica
py_conda_version:    conda 4.8.0
py_implementation:   CPython
py_version:          3.7.8
py_virtual_env:      True
sys_cores:           12
sys_processor:       i386
sys_ram:             Total: 16384MB, Available: 5016MB, Used: 8217MB, Free: 74MB

=============== Pip Packages ===============
absl-py==0.10.0
astunparse==1.6.3
cachetools==4.1.1
certifi==2020.6.20
cffi==1.14.2
chardet==3.0.4
cycler==0.10.0
enum34==1.1.10
fastcluster==1.1.26
ffmpy==0.2.3
gast==0.3.3
google-auth==1.20.1
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio==1.31.0
h5py==2.10.0
idna==2.10
imageio @ file:///home/conda/feedstock_root/build_artifacts/imageio_1594044661732/work
imageio-ffmpeg @ file:///home/conda/feedstock_root/build_artifacts/imageio-ffmpeg_1589202782679/work
importlib-metadata==1.7.0
joblib @ file:///home/conda/feedstock_root/build_artifacts/joblib_1593624380152/work
Keras==2.2.4
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
kiwisolver==1.2.0
Markdown==3.2.2
matplotlib @ file:///Users/runner/miniforge3/conda-bld/matplotlib-base_1594091703837/work
numpy @ file:///Users/runner/miniforge3/conda-bld/numpy_1597938419070/work
nvidia-ml-py3 @ git+https://github.com/deepfakes/nvidia-ml-py3.git@6fc29ac84b32bad877f078cb4a777c1548a00bf6
oauthlib==3.1.0
olefile==0.46
opencv-python==4.4.0.42
opt-einsum==3.3.0
Pillow @ file:///Users/runner/miniforge3/conda-bld/pillow_1594212133169/work
plaidml==0.7.0
plaidml-keras==0.7.0
protobuf==3.13.0
psutil @ file:///Users/runner/miniforge3/conda-bld/psutil_1594826940124/work
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.20
pynvx==1.0.0
pyparsing==2.4.7
python-dateutil==2.8.1
PyYAML==5.3.1
requests==2.24.0
requests-oauthlib==1.3.0
rsa==4.6
scikit-learn @ file:///Users/runner/miniforge3/conda-bld/scikit-learn_1596546094462/work
scipy==1.4.1
six @ file:///home/conda/feedstock_root/build_artifacts/six_1590081179328/work
tensorboard==2.2.2
tensorboard-plugin-wit==1.7.0
tensorflow==2.2.0
tensorflow-estimator==2.2.0
termcolor==1.1.0
threadpoolctl @ file:///tmp/tmp79xdzxkt/threadpoolctl-2.1.0-py3-none-any.whl
tornado==6.0.4
tqdm @ file:///home/conda/feedstock_root/build_artifacts/tqdm_1596476591553/work
urllib3==1.25.10
Werkzeug==1.0.1
wrapt==1.12.1
zipp==3.1.0

============== Conda Packages ==============
# packages in environment at /Users/burgew/miniconda3/envs/py3.7-face:
#
# Name                    Version                   Build  Channel
absl-py                   0.10.0                   pypi_0    pypi
astunparse                1.6.3                    pypi_0    pypi
bzip2                     1.0.8                haf1e3a3_3    conda-forge
ca-certificates           2020.6.20            hecda079_0    conda-forge
cachetools                4.1.1                    pypi_0    pypi
certifi                   2020.6.20        py37hc8dfbb8_0    conda-forge
cffi                      1.14.2                   pypi_0    pypi
chardet                   3.0.4                    pypi_0    pypi
cycler                    0.10.0                     py_2    conda-forge
enum34                    1.1.10                   pypi_0    pypi
fastcluster               1.1.26           py37h94625e5_1    conda-forge
ffmpeg                    4.3.1                h9903f1f_0    conda-forge
ffmpy                     0.2.3                    pypi_0    pypi
freetype                  2.10.2               h8da9a1a_0    conda-forge
gast                      0.3.3                    pypi_0    pypi
gettext                   0.19.8.1          h46ab8bc_1002    conda-forge
gmp                       6.2.0                h4a8c4bd_2    conda-forge
gnutls                    3.6.13               hc269f14_0    conda-forge
google-auth               1.20.1                   pypi_0    pypi
google-auth-oauthlib      0.4.1                    pypi_0    pypi
google-pasta              0.2.0                    pypi_0    pypi
grpcio                    1.31.0                   pypi_0    pypi
h5py                      2.10.0                   pypi_0    pypi
idna                      2.10                     pypi_0    pypi
imageio                   2.9.0                      py_0    conda-forge
imageio-ffmpeg            0.4.2                      py_0    conda-forge
importlib-metadata        1.7.0                    pypi_0    pypi
joblib                    0.16.0                     py_0    conda-forge
jpeg                      9d                   h0b31af3_0    conda-forge
keras                     2.2.4                    pypi_0    pypi
keras-applications        1.0.8                    pypi_0    pypi
keras-preprocessing       1.1.2                    pypi_0    pypi
kiwisolver                1.2.0            py37ha1cc60f_0    conda-forge
lame                      3.100             h1de35cc_1001    conda-forge
lcms2                     2.11                 h174193d_0    conda-forge
libblas                   3.8.0               17_openblas    conda-forge
libcblas                  3.8.0               17_openblas    conda-forge
libcxx                    10.0.1               h5f48129_0    conda-forge
libffi                    3.2.1             hb1e8313_1007    conda-forge
libgfortran               4.0.0                         2    conda-forge
libiconv                  1.16                 haf1e3a3_0    conda-forge
liblapack                 3.8.0               17_openblas    conda-forge
libopenblas               0.3.10          openmp_h63d9170_4    conda-forge
libpng                    1.6.37               hb0a8c7a_2    conda-forge
libtiff                   4.1.0                h2ae36a8_6    conda-forge
libwebp-base              1.1.0                h0b31af3_3    conda-forge
llvm-openmp               10.0.1               h28b9765_0    conda-forge
lz4-c                     1.9.2                hb1e8313_3    conda-forge
markdown                  3.2.2                    pypi_0    pypi
matplotlib                3.2.2                         1    conda-forge
matplotlib-base           3.2.2            py37hddda452_1    conda-forge
ncurses                   6.2                  hb1e8313_1    conda-forge
nettle                    3.4.1             h3efe00b_1002    conda-forge
numpy                     1.19.1           py37h1efc2f6_2    conda-forge
nvidia-ml-py3             7.352.1                  pypi_0    pypi
oauthlib                  3.1.0                    pypi_0    pypi
olefile                   0.46                       py_0    conda-forge
opencv-python             4.4.0.42                 pypi_0    pypi
openh264                  2.1.1                hd174df1_0    conda-forge
openssl                   1.1.1g               haf1e3a3_1    conda-forge
opt-einsum                3.3.0                    pypi_0    pypi
pathlib                   1.0.1            py37hc8dfbb8_2    conda-forge
pillow                    7.2.0            py37hfd78ece_1    conda-forge
pip                       20.2.2                     py_0    conda-forge
plaidml                   0.7.0                    pypi_0    pypi
plaidml-keras             0.7.0                    pypi_0    pypi
protobuf                  3.13.0                   pypi_0    pypi
psutil                    5.7.2            py37h60d8a13_0    conda-forge
pyasn1                    0.4.8                    pypi_0    pypi
pyasn1-modules            0.2.8                    pypi_0    pypi
pycparser                 2.20                     pypi_0    pypi
pynvx                     1.0.0                    pypi_0    pypi
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
python                    3.7.8           hc9dea61_1_cpython    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python_abi                3.7                     1_cp37m    conda-forge
pyyaml                    5.3.1                    pypi_0    pypi
readline                  8.0                  h0678c8f_2    conda-forge
requests                  2.24.0                   pypi_0    pypi
requests-oauthlib         1.3.0                    pypi_0    pypi
rsa                       4.6                      pypi_0    pypi
scikit-learn              0.23.2           py37hb7e9fed_0    conda-forge
scipy                     1.4.1                    pypi_0    pypi
setuptools                49.6.0           py37hc8dfbb8_0    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
sqlite                    3.33.0               h960bd1c_0    conda-forge
tensorboard               2.2.2                    pypi_0    pypi
tensorboard-plugin-wit    1.7.0                    pypi_0    pypi
tensorflow                2.2.0                    pypi_0    pypi
tensorflow-estimator      2.2.0                    pypi_0    pypi
termcolor                 1.1.0                    pypi_0    pypi
threadpoolctl             2.1.0              pyh5ca1d4c_0    conda-forge
tk                        8.6.10               hb0a8c7a_0    conda-forge
tornado                   6.0.4            py37h9bfed18_1    conda-forge
tqdm                      4.48.2             pyh9f0ad1d_0    conda-forge
urllib3                   1.25.10                  pypi_0    pypi
werkzeug                  1.0.1                    pypi_0    pypi
wheel                     0.35.1             pyh9f0ad1d_0    conda-forge
wrapt                     1.12.1                   pypi_0    pypi
x264                      1!152.20180806       h1de35cc_0    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
zipp                      3.1.0                    pypi_0    pypi
zlib                      1.2.11                     1007    conda-forge
zstd                      1.4.5                h289c70a_2    conda-forge

================= Configs ==================
--------- convert.ini ---------

[color.color_transfer]
clip:                     True
preserve_paper:           True

[color.match_hist]
threshold:                99.0

[color.manual_balance]
colorspace:               HSV
balance_1:                0.0
balance_2:                0.0
balance_3:                0.0
contrast:                 0.0
brightness:               0.0

[writer.pillow]
format:                   png
draw_transparent:         False
optimize:                 False
gif_interlace:            True
jpg_quality:              75
png_compress_level:       3
tif_compression:          tiff_deflate

[writer.ffmpeg]
container:                mp4
codec:                    libx264
crf:                      23
preset:                   medium
tune:                     none
profile:                  auto
level:                    auto

[writer.gif]
fps:                      25
loop:                     0
palettesize:              256
subrectangles:            False

[writer.opencv]
format:                   png
draw_transparent:         False
jpg_quality:              75
png_compress_level:       3

[mask.mask_blend]
type:                     normalized
kernel_size:              3
passes:                   4
threshold:                4
erosion:                  0.0

[mask.box_blend]
type:                     gaussian
distance:                 11.0
radius:                   5.0
passes:                   1

[scaling.sharpen]
method:                   unsharp_mask
amount:                   150
radius:                   0.3
threshold:                5.0

--------- gui.ini ---------

[global]
fullscreen:               True
tab:                      extract
options_panel_width:      30
console_panel_height:     20
icon_size:                14
font:                     default
font_size:                9
autosave_last_session:    prompt
timeout:                  120
auto_load_model_stats:    True

--------- .faceswap ---------
backend:                  cpu

--------- extract.ini ---------

[global]
allow_growth:             True

[detect.mtcnn]
minsize:                  20
threshold_1:              0.6
threshold_2:              0.7
threshold_3:              0.7
scalefactor:              0.709
batch-size:               8

[detect.cv2_dnn]
confidence:               50

[detect.s3fd]
confidence:               70
batch-size:               4

[align.fan]
batch-size:               12

[mask.unet_dfl]
batch-size:               8

[mask.vgg_obstructed]
batch-size:               2

[mask.vgg_clear]
batch-size:               6

--------- train.ini ---------

[global]
coverage:                 68.75
mask_type:                none
mask_blur_kernel:         3
mask_threshold:           4
learn_mask:               False
icnr_init:                False
conv_aware_init:          False
reflect_padding:          False
penalized_mask_loss:      True
loss_function:            mae
learning_rate:            5e-05

[model.realface]
input_size:               64
output_size:              128
dense_nodes:              1536
complexity_encoder:       128
complexity_decoder:       512

[model.dfl_sae]
input_size:               128
clipnorm:                 True
architecture:             df
autoencoder_dims:         0
encoder_dims:             42
decoder_dims:             21
multiscale_decoder:       False

[model.unbalanced]
input_size:               128
lowmem:                   False
clipnorm:                 True
nodes:                    1024
complexity_encoder:       128
complexity_decoder_a:     384
complexity_decoder_b:     512

[model.dlight]
features:                 best
details:                  good
output_size:              256

[model.villain]
lowmem:                   False

[model.original]
lowmem:                   False

[model.dfl_h128]
lowmem:                   False

[trainer.original]
preview_images:           14
zoom_amount:              5
rotation_range:           10
shift_range:              5
flip_chance:              50
color_lightness:          30
color_ab:                 8
color_clahe_chance:       50
color_clahe_max_size:     4

User avatar
torzdf
Posts: 944
Joined: Fri Jul 12, 2019 12:53 am
Answers: 126
Has thanked: 26 times
Been thanked: 184 times

Re: Unexpected Crash during extraction : cv2.error: OpenCV(4.4.0)

Post by torzdf »

In my experience, this happens due to a memory error (or more specifically, running out of memory).

I'm a little confused by your setup though, as you appear to have an environment installed for AMD, but the backend is setup to use CPU. Unfortunately macOS is not good at spitting out useful information relating to he GPU, so I can't confirm what's the best setup for you.

In the first instance I would probably do a clean install, in a new environment, by running python setup.py

If that doesn't resolve your issue, please keep an eye on your process monitor and let me know how RAM usage looks over time.

My word is final


User avatar
burgew
Posts: 2
Joined: Mon Aug 24, 2020 12:33 am
Has thanked: 1 time

Re: Unexpected Crash during extraction : cv2.error: OpenCV(4.4.0)

Post by burgew »

Unfortunately, this did not address the crash. I created a fresh conda environment (py3.7) and did a fresh install, opting specifically for CPU (not AMD). The python 3.7 process hovered at about 350M, and there was plenty of RAM left available on the machine, but the crash happened again. Here's the content from the new crash log file, just to be complete:

Code: Select all

08/24/2020 13:17:41 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011609.png
08/24/2020 13:17:41 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011610.png
08/24/2020 13:17:41 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011611.png
08/24/2020 13:17:41 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011612.png
08/24/2020 13:17:41 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011613.png
08/24/2020 13:17:41 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011614.png
08/24/2020 13:17:41 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011615.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011616.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011617.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011618.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011619.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011620.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011621.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011622.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011623.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011624.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011625.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011626.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011627.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011628.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011629.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011630.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011631.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011632.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011633.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011634.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011635.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011636.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011637.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011638.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011639.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011640.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011641.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011642.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011643.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011644.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011645.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011646.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011647.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011648.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011649.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011650.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011651.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011652.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011653.png
08/24/2020 13:17:42 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011654.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011655.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011656.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011657.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011658.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011659.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011660.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011661.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011662.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011663.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011664.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011665.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011666.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011667.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011668.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011669.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011670.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011671.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011672.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011673.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011674.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011675.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011676.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011677.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011678.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011679.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011680.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011681.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011682.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011683.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011684.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011685.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011686.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011687.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011688.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011689.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011690.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011691.png
08/24/2020 13:17:43 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011692.png
08/24/2020 13:17:44 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011693.png
08/24/2020 13:17:44 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011694.png
08/24/2020 13:17:44 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011695.png
08/24/2020 13:17:44 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011696.png
08/24/2020 13:17:44 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011698.png
08/24/2020 13:17:44 MainProcess     MainThread      image           _set_thread               DEBUG    Setting thread
08/24/2020 13:17:44 MainProcess     MainThread      image           _set_thread               DEBUG    Thread pre-exists and is alive: <lib.multithreading.MultiThread object at 0x7fa71b559d50>
08/24/2020 13:17:44 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011699.png
08/24/2020 13:17:44 MainProcess     MainThread      image           _set_thread               DEBUG    Setting thread
08/24/2020 13:17:44 MainProcess     MainThread      image           _set_thread               DEBUG    Thread pre-exists and is alive: <lib.multithreading.MultiThread object at 0x7fa71b559d50>
08/24/2020 13:17:44 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011702.png
08/24/2020 13:17:44 MainProcess     MainThread      image           _set_thread               DEBUG    Setting thread
08/24/2020 13:17:44 MainProcess     MainThread      image           _set_thread               DEBUG    Thread pre-exists and is alive: <lib.multithreading.MultiThread object at 0x7fa71b559d50>
08/24/2020 13:17:44 MainProcess     MainThread      extract         _output_processing        VERBOSE  No faces were detected in image: Marica.GregBeard.1080P_4000K_266431232_011703.png
08/24/2020 13:17:44 MainProcess     align_cv2-dnn_aligner_input_0 multithreading  run                       DEBUG    Error in thread (align_cv2-dnn_aligner_input_0): OpenCV(4.4.0) /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/pip-req-build-nxr3bp45/opencv/modules/imgproc/src/resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'resize'\n
08/24/2020 13:17:45 MainProcess     MainThread      multithreading  check_and_raise_error     DEBUG    Thread error caught: [(<class 'cv2.error'>, error("OpenCV(4.4.0) /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/pip-req-build-nxr3bp45/opencv/modules/imgproc/src/resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'resize'\n"), <traceback object at 0x7fa70f2a58c0>)]
Traceback (most recent call last):
  File "/Users/burgew/Develop/github/faceswap/lib/cli/launcher.py", line 156, in execute_script
    process.process()
  File "/Users/burgew/Develop/github/faceswap/scripts/extract.py", line 117, in process
    self._run_extraction()
  File "/Users/burgew/Develop/github/faceswap/scripts/extract.py", line 213, in _run_extraction
    for idx, extract_media in enumerate(status_bar):
  File "/Users/burgew/miniconda3/envs/py3.7-face/lib/python3.7/site-packages/tqdm/std.py", line 1130, in __iter__
    for obj in iterable:
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/pipeline.py", line 233, in detected_faces
    if self._check_and_raise_error():
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/pipeline.py", line 655, in _check_and_raise_error
    if plugin.check_and_raise_error():
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/_base.py", line 302, in check_and_raise_error
    err = thread.check_and_raise_error()
  File "/Users/burgew/Develop/github/faceswap/lib/multithreading.py", line 84, in check_and_raise_error
    raise error[1].with_traceback(error[2])
  File "/Users/burgew/Develop/github/faceswap/lib/multithreading.py", line 37, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/_base.py", line 420, in _thread_process
    batch = function(batch)
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/align/cv2_dnn.py", line 54, in process_input
    faces, batch["roi"], batch["offsets"] = self.align_image(batch)
  File "/Users/burgew/Develop/github/faceswap/plugins/extract/align/cv2_dnn.py", line 82, in align_image
    face = cv2.resize(face, dsize=sizes, interpolation=interpolation)
cv2.error: OpenCV(4.4.0) /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/pip-req-build-nxr3bp45/opencv/modules/imgproc/src/resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'resize'


============ System Information ============
encoding:            UTF-8
git_branch:          master
git_commits:         1f9e834 typofix. 0e31b98 Training - Add L2 Regularization to Structural Losses. 83bd60d training - Use explicit loss dictionaries to map to outputs. d5c62d1 bugfix - Training - Prevent crash on manual preview update. 8c8e1b2 Training Config - Split Loss to it's own section
gpu_cuda:            Unsupported OS. Check Conda packages for Conda Cuda
gpu_cudnn:           Unsupported OS. Check Conda packages for Conda cuDNN
gpu_devices:         
gpu_devices_active:  
gpu_driver:          0
gpu_vram:            
os_machine:          x86_64
os_platform:         Darwin-19.6.0-x86_64-i386-64bit
os_release:          19.6.0
py_command:          faceswap.py extract -i /Users/burgew/Data/faceswap/src/Marica/Marica.GregBeard.1080P_4000K_266431232.mp4 -o /Users/burgew/Data/faceswap/samples/Marica
py_conda_version:    conda 4.8.0
py_implementation:   CPython
py_version:          3.7.8
py_virtual_env:      True
sys_cores:           12
sys_processor:       i386
sys_ram:             Total: 16384MB, Available: 9035MB, Used: 7345MB, Free: 1794MB

=============== Pip Packages ===============
absl-py==0.10.0
astunparse==1.6.3
cachetools==4.1.1
certifi==2020.6.20
chardet==3.0.4
cycler==0.10.0
fastcluster==1.1.26
ffmpy==0.2.3
gast==0.3.3
google-auth==1.20.1
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio==1.31.0
h5py==2.10.0
idna==2.10
imageio @ file:///home/conda/feedstock_root/build_artifacts/imageio_1594044661732/work
imageio-ffmpeg @ file:///home/conda/feedstock_root/build_artifacts/imageio-ffmpeg_1589202782679/work
importlib-metadata==1.7.0
joblib @ file:///home/conda/feedstock_root/build_artifacts/joblib_1593624380152/work
Keras-Preprocessing==1.1.2
kiwisolver==1.2.0
Markdown==3.2.2
matplotlib @ file:///Users/runner/miniforge3/conda-bld/matplotlib-base_1594091703837/work
numpy @ file:///Users/runner/miniforge3/conda-bld/numpy_1597938419070/work
nvidia-ml-py3 @ git+https://github.com/deepfakes/nvidia-ml-py3.git@6fc29ac84b32bad877f078cb4a777c1548a00bf6
oauthlib==3.1.0
olefile==0.46
opencv-python==4.4.0.42
opt-einsum==3.3.0
Pillow @ file:///Users/runner/miniforge3/conda-bld/pillow_1594212133169/work
protobuf==3.13.0
psutil @ file:///Users/runner/miniforge3/conda-bld/psutil_1594826940124/work
pyasn1==0.4.8
pyasn1-modules==0.2.8
pynvx==1.0.0
pyparsing==2.4.7
python-dateutil==2.8.1
requests==2.24.0
requests-oauthlib==1.3.0
rsa==4.6
scikit-learn @ file:///Users/runner/miniforge3/conda-bld/scikit-learn_1596546094462/work
scipy==1.4.1
six @ file:///home/conda/feedstock_root/build_artifacts/six_1590081179328/work
tensorboard==2.2.2
tensorboard-plugin-wit==1.7.0
tensorflow==2.2.0
tensorflow-estimator==2.2.0
termcolor==1.1.0
threadpoolctl @ file:///tmp/tmp79xdzxkt/threadpoolctl-2.1.0-py3-none-any.whl
tornado==6.0.4
tqdm @ file:///home/conda/feedstock_root/build_artifacts/tqdm_1596476591553/work
urllib3==1.25.10
Werkzeug==1.0.1
wrapt==1.12.1
zipp==3.1.0

============== Conda Packages ==============
# packages in environment at /Users/burgew/miniconda3/envs/py3.7-face:
#
# Name                    Version                   Build  Channel
absl-py                   0.10.0                   pypi_0    pypi
astunparse                1.6.3                    pypi_0    pypi
bzip2                     1.0.8                haf1e3a3_3    conda-forge
ca-certificates           2020.6.20            hecda079_0    conda-forge
cachetools                4.1.1                    pypi_0    pypi
certifi                   2020.6.20        py37hc8dfbb8_0    conda-forge
chardet                   3.0.4                    pypi_0    pypi
cycler                    0.10.0                     py_2    conda-forge
fastcluster               1.1.26           py37h94625e5_1    conda-forge
ffmpeg                    4.3.1                h9903f1f_0    conda-forge
ffmpy                     0.2.3                    pypi_0    pypi
freetype                  2.10.2               h8da9a1a_0    conda-forge
gast                      0.3.3                    pypi_0    pypi
gettext                   0.19.8.1          h46ab8bc_1002    conda-forge
gmp                       6.2.0                h4a8c4bd_2    conda-forge
gnutls                    3.6.13               hc269f14_0    conda-forge
google-auth               1.20.1                   pypi_0    pypi
google-auth-oauthlib      0.4.1                    pypi_0    pypi
google-pasta              0.2.0                    pypi_0    pypi
grpcio                    1.31.0                   pypi_0    pypi
h5py                      2.10.0                   pypi_0    pypi
idna                      2.10                     pypi_0    pypi
imageio                   2.9.0                      py_0    conda-forge
imageio-ffmpeg            0.4.2                      py_0    conda-forge
importlib-metadata        1.7.0                    pypi_0    pypi
joblib                    0.16.0                     py_0    conda-forge
jpeg                      9d                   h0b31af3_0    conda-forge
keras-preprocessing       1.1.2                    pypi_0    pypi
kiwisolver                1.2.0            py37ha1cc60f_0    conda-forge
lame                      3.100             h1de35cc_1001    conda-forge
lcms2                     2.11                 h174193d_0    conda-forge
libblas                   3.8.0               17_openblas    conda-forge
libcblas                  3.8.0               17_openblas    conda-forge
libcxx                    10.0.1               h5f48129_0    conda-forge
libffi                    3.2.1             hb1e8313_1007    conda-forge
libgfortran               4.0.0                         2    conda-forge
libiconv                  1.16                 haf1e3a3_0    conda-forge
liblapack                 3.8.0               17_openblas    conda-forge
libopenblas               0.3.10          openmp_h63d9170_4    conda-forge
libpng                    1.6.37               hb0a8c7a_2    conda-forge
libtiff                   4.1.0                h2ae36a8_6    conda-forge
libwebp-base              1.1.0                h0b31af3_3    conda-forge
llvm-openmp               10.0.1               h28b9765_0    conda-forge
lz4-c                     1.9.2                hb1e8313_3    conda-forge
markdown                  3.2.2                    pypi_0    pypi
matplotlib                3.2.2                         1    conda-forge
matplotlib-base           3.2.2            py37hddda452_1    conda-forge
ncurses                   6.2                  hb1e8313_1    conda-forge
nettle                    3.4.1             h3efe00b_1002    conda-forge
numpy                     1.19.1           py37h1efc2f6_2    conda-forge
nvidia-ml-py3             7.352.1                  pypi_0    pypi
oauthlib                  3.1.0                    pypi_0    pypi
olefile                   0.46                       py_0    conda-forge
opencv-python             4.4.0.42                 pypi_0    pypi
openh264                  2.1.1                hd174df1_0    conda-forge
openssl                   1.1.1g               haf1e3a3_1    conda-forge
opt-einsum                3.3.0                    pypi_0    pypi
pathlib                   1.0.1            py37hc8dfbb8_2    conda-forge
pillow                    7.2.0            py37hfd78ece_1    conda-forge
pip                       20.2.2                     py_0    conda-forge
protobuf                  3.13.0                   pypi_0    pypi
psutil                    5.7.2            py37h60d8a13_0    conda-forge
pyasn1                    0.4.8                    pypi_0    pypi
pyasn1-modules            0.2.8                    pypi_0    pypi
pynvx                     1.0.0                    pypi_0    pypi
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
python                    3.7.8           hc9dea61_1_cpython    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python_abi                3.7                     1_cp37m    conda-forge
readline                  8.0                  h0678c8f_2    conda-forge
requests                  2.24.0                   pypi_0    pypi
requests-oauthlib         1.3.0                    pypi_0    pypi
rsa                       4.6                      pypi_0    pypi
scikit-learn              0.23.2           py37hb7e9fed_0    conda-forge
scipy                     1.4.1                    pypi_0    pypi
setuptools                49.6.0           py37hc8dfbb8_0    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
sqlite                    3.33.0               h960bd1c_0    conda-forge
tensorboard               2.2.2                    pypi_0    pypi
tensorboard-plugin-wit    1.7.0                    pypi_0    pypi
tensorflow                2.2.0                    pypi_0    pypi
tensorflow-estimator      2.2.0                    pypi_0    pypi
termcolor                 1.1.0                    pypi_0    pypi
threadpoolctl             2.1.0              pyh5ca1d4c_0    conda-forge
tk                        8.6.10               hb0a8c7a_0    conda-forge
tornado                   6.0.4            py37h9bfed18_1    conda-forge
tqdm                      4.48.2             pyh9f0ad1d_0    conda-forge
urllib3                   1.25.10                  pypi_0    pypi
werkzeug                  1.0.1                    pypi_0    pypi
wheel                     0.35.1             pyh9f0ad1d_0    conda-forge
wrapt                     1.12.1                   pypi_0    pypi
x264                      1!152.20180806       h1de35cc_0    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
zipp                      3.1.0                    pypi_0    pypi
zlib                      1.2.11                     1007    conda-forge
zstd                      1.4.5                h289c70a_2    conda-forge

================= Configs ==================
--------- convert.ini ---------

[color.color_transfer]
clip:                     True
preserve_paper:           True

[color.match_hist]
threshold:                99.0

[color.manual_balance]
colorspace:               HSV
balance_1:                0.0
balance_2:                0.0
balance_3:                0.0
contrast:                 0.0
brightness:               0.0

[writer.pillow]
format:                   png
draw_transparent:         False
optimize:                 False
gif_interlace:            True
jpg_quality:              75
png_compress_level:       3
tif_compression:          tiff_deflate

[writer.ffmpeg]
container:                mp4
codec:                    libx264
crf:                      23
preset:                   medium
tune:                     none
profile:                  auto
level:                    auto

[writer.gif]
fps:                      25
loop:                     0
palettesize:              256
subrectangles:            False

[writer.opencv]
format:                   png
draw_transparent:         False
jpg_quality:              75
png_compress_level:       3

[mask.mask_blend]
type:                     normalized
kernel_size:              3
passes:                   4
threshold:                4
erosion:                  0.0

[mask.box_blend]
type:                     gaussian
distance:                 11.0
radius:                   5.0
passes:                   1

[scaling.sharpen]
method:                   unsharp_mask
amount:                   150
radius:                   0.3
threshold:                5.0

--------- gui.ini ---------

[global]
fullscreen:               True
tab:                      extract
options_panel_width:      30
console_panel_height:     20
icon_size:                14
font:                     default
font_size:                9
autosave_last_session:    prompt
timeout:                  120
auto_load_model_stats:    True

--------- .faceswap ---------
backend:                  cpu

--------- extract.ini ---------

[global]
allow_growth:             True

[detect.mtcnn]
minsize:                  20
threshold_1:              0.6
threshold_2:              0.7
threshold_3:              0.7
scalefactor:              0.709
batch-size:               8

[detect.cv2_dnn]
confidence:               50

[detect.s3fd]
confidence:               70
batch-size:               4

[align.fan]
batch-size:               12

[mask.unet_dfl]
batch-size:               8

[mask.vgg_obstructed]
batch-size:               2

[mask.vgg_clear]
batch-size:               6

--------- train.ini ---------

[global]
coverage:                 68.75
mask_type:                none
mask_blur_kernel:         3
mask_threshold:           4
learn_mask:               False
icnr_init:                False
conv_aware_init:          False
reflect_padding:          False
penalized_mask_loss:      True
loss_function:            mae
learning_rate:            5e-05

[model.realface]
input_size:               64
output_size:              128
dense_nodes:              1536
complexity_encoder:       128
complexity_decoder:       512

[model.dfl_sae]
input_size:               128
clipnorm:                 True
architecture:             df
autoencoder_dims:         0
encoder_dims:             42
decoder_dims:             21
multiscale_decoder:       False

[model.unbalanced]
input_size:               128
lowmem:                   False
clipnorm:                 True
nodes:                    1024
complexity_encoder:       128
complexity_decoder_a:     384
complexity_decoder_b:     512

[model.dlight]
features:                 best
details:                  good
output_size:              256

[model.villain]
lowmem:                   False

[model.original]
lowmem:                   False

[model.dfl_h128]
lowmem:                   False

[trainer.original]
preview_images:           14
zoom_amount:              5
rotation_range:           10
shift_range:              5
flip_chance:              50
color_lightness:          30
color_ab:                 8
color_clahe_chance:       50
color_clahe_max_size:     4
…Walt

Walter Burge
e-mail - walt.burge@ischool.berkeley.edu
cell - 415-640-2074

User avatar
torzdf
Posts: 944
Joined: Fri Jul 12, 2019 12:53 am
Answers: 126
Has thanked: 26 times
Been thanked: 184 times

Re: Unexpected Crash during extraction : cv2.error: OpenCV(4.4.0)

Post by torzdf »

Ok, the only other thing I can do is see if I can replicate the issue, and if so, try to issue a bugfix.

FYI: When I have been provided videos in the past, I have been unable to replicate, so please don't get your hopes up!

If the video is something you can share, then please do and I can look into it. You can Private Message me if you don't want to make it public.

My word is final


Post Reply