OpenCV Error on Fresh install

The Extraction process failing on you, and you aren't getting an error back with clear instructions? Tell us about it here


Forum rules

Read the FAQs and search the forum before posting a new topic.

This forum is for reporting errors with the Extraction process. If you want to get tips, or better understand the Extract process, then you should look in the Extract Discussion forum.

Please mark any answers that fixed your problems so others can find the solutions.

Locked
User avatar
sethcoast
Posts: 4
Joined: Mon Oct 14, 2019 5:37 pm
Has thanked: 2 times

OpenCV Error on Fresh install

Post by sethcoast »

Installing the latest version of faceswap on a fresh vm and getting an error that I've never seen before when I try to run extract:

04/06/2020 01:58:45 ERROR Got Exception on main handler:
Traceback (most recent call last):
File "/home/sad9719/faceswap/lib/cli.py", line 126, in execute_script
script = self.import_script()
File "/home/sad9719/faceswap/lib/cli.py", line 40, in import_script
module = import_module(mod)
File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module
return bootstrap.gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in gcd_import
File "<frozen importlib.
bootstrap>", line 971, in find_and_load
File "<frozen importlib.
bootstrap>", line 955, in find_and_load_unlocked
File "<frozen importlib.
bootstrap>", line 665, in load_unlocked
File "<frozen importlib.
bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/sad9719/faceswap/scripts/extract.py", line 10, in <module>
from lib.image import encode_image_with_hash, ImagesLoader, ImagesSaver
File "/home/sad9719/faceswap/lib/image.py", line 14, in <module>
import cv2
File "/home/sad9719/faceswap/venv/lib/python3.6/site-packages/cv2/init.py", line 3, in <module>
from .cv2 import *
ImportError: libSM.so.6: cannot open shared object file: No such file or directory
04/06/2020 01:58:45 CRITICAL An unexpected crash has occurred. Crash report written to '/home/sad9719/faceswap/crash_report.2020.04.06.015845809886.log'. You MUST provide this file if seeking assistance. Please verify you are running the latest version of faceswap before reporting

Full crash report:

Code: Select all

04/06/2020 01:58:39 MainProcess     MainThread      logger          log_setup                 INFO     Log level set to: INFO
04/06/2020 01:58:39 MainProcess     MainThread      cli             execute_script            DEBUG    Executing: extract. PID: 20423
04/06/2020 01:58:41 MainProcess     MainThread      cli             test_for_tf_version       DEBUG    Installed Tensorflow Version: 1.15
Traceback (most recent call last):
  File "/home/sad9719/faceswap/lib/cli.py", line 126, in execute_script
    script = self.import_script()
  File "/home/sad9719/faceswap/lib/cli.py", line 40, in import_script
    module = import_module(mod)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/sad9719/faceswap/scripts/extract.py", line 10, in <module>
    from lib.image import encode_image_with_hash, ImagesLoader, ImagesSaver
  File "/home/sad9719/faceswap/lib/image.py", line 14, in <module>
    import cv2
  File "/home/sad9719/faceswap/venv/lib/python3.6/site-packages/cv2/__init__.py", line 3, in <module>
    from .cv2 import *
ImportError: libSM.so.6: cannot open shared object file: No such file or directory

============ System Information ============
encoding:            UTF-8
git_branch:          master
git_commits:         8412941 Update Travis Test for Masker. ab4ef75 Extract - Allow multiple pipelines to be loaded. 8d4f381 Extract - Better VRAM Allocation in Extraction Pipeline. bb3e3d0 Extraction - Auto generate Components and Extended Masks. e7c5b7b Bugfix: cv2-dnn aligner - Assertion image is empty error
gpu_cuda:            10.2
gpu_cudnn:           No global version found
gpu_devices:         GPU_0: Tesla K80
gpu_devices_active:  GPU_0
gpu_driver:          440.33.01
gpu_vram:            GPU_0: 11441MB
os_machine:          x86_64
os_platform:         Linux-5.0.0-1033-gcp-x86_64-with-Ubuntu-18.04-bionic
os_release:          5.0.0-1033-gcp
py_command:          faceswap.py extract -i /home/sad9719/data/raw/jake_smith/Phife_Dawg_Tribute_(1080p).mp4 -o /home/sad9719/data/faces/jake_smith -D s3fd -A fan -nm hist -min 70 -een 1 -sz 256 -si 5000 -M none
py_conda_version:    N/A
py_implementation:   CPython
py_version:          3.6.9
py_virtual_env:      True
sys_cores:           2
sys_processor:       x86_64
sys_ram:             Total: 7469MB, Available: 6806MB, Used: 365MB, Free: 3134MB
=============== Pip Packages ===============
absl-py==0.9.0
astor==0.8.1
cachetools==4.0.0
certifi==2020.4.5.1
chardet==3.0.4
cycler==0.10.0
decorator==4.4.2
fastcluster==1.1.26
ffmpy==0.2.2
gast==0.2.2
google-auth==1.13.1
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio==1.28.1
h5py==2.9.0
idna==2.9
imageio==2.6.1
imageio-ffmpeg==0.4.1
joblib==0.14.1
Keras==2.2.4
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
kiwisolver==1.2.0
Markdown==3.2.1
matplotlib==3.1.1
networkx==2.4
numpy==1.17.4
nvidia-ml-py3==7.352.1
oauthlib==3.1.0
opencv-python==4.1.2.30
opt-einsum==3.2.0
pathlib==1.0.1
Pillow==6.2.1
pkg-resources==0.0.0
protobuf==3.11.3
psutil==5.7.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyparsing==2.4.7
python-dateutil==2.8.1
PyWavelets==1.1.1
PyYAML==5.3.1
requests==2.23.0
requests-oauthlib==1.3.0
rsa==4.0
scikit-image==0.16.2
scikit-learn==0.22.2.post1
scipy==1.4.1
six==1.14.0
tensorboard==1.15.0
tensorflow==1.15.0
tensorflow-estimator==1.15.1
tensorflow-gpu==2.1.0
termcolor==1.1.0
toposort==1.5
tqdm==4.45.0
urllib3==1.25.8
Werkzeug==1.0.1
wrapt==1.12.1
================= Configs ==================
--------- convert.ini ---------
[color.manual_balance]
colorspace:               HSV
balance_1:                0.0
balance_2:                0.0
balance_3:                0.0
contrast:                 0.0
brightness:               0.0
[color.match_hist]
threshold:                99.0
[color.color_transfer]
clip:                     True
preserve_paper:           True
[scaling.sharpen]
method:                   unsharp_mask
amount:                   150
radius:                   0.3
threshold:                5.0
[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

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

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

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

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

--------- .faceswap ---------
backend:                  nvidia

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

[global]
allow_growth:             False

[detect.cv2_dnn]
confidence:               50

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

[detect.mtcnn]
minsize:                  20
threshold_1:              0.6
threshold_2:              0.7
threshold_3:              0.7
scalefactor:              0.709
batch-size:               8
[align.fan]
batch-size:               12
[mask.vgg_clear]
batch-size:               6
[mask.unet_dfl]
batch-size:               8
[mask.vgg_obstructed]
batch-size:               2
--------- 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
subpixel_upscaling:       False
reflect_padding:          False
penalized_mask_loss:      True
loss_function:            mae
learning_rate:            5e-05
[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
[model.villain]
lowmem:                   False
[model.realface]
input_size:               64
output_size:              128
dense_nodes:              1536
complexity_encoder:       128
complexity_decoder:       512
[model.dlight]
features:                 best
details:                  good
output_size:              256
[model.unbalanced]
input_size:               128
lowmem:                   False
clipnorm:                 True
nodes:                    1024
complexity_encoder:       128
complexity_decoder_a:     384
complexity_decoder_b:     512
[model.dfl_h128]
lowmem:                   False
[model.dfl_sae]
input_size:               128
clipnorm:                 True
architecture:             df
autoencoder_dims:         0
encoder_dims:             42
decoder_dims:             21
multiscale_decoder:       False
[model.original]
lowmem:                   False
User avatar
torzdf
Posts: 2670
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 131 times
Been thanked: 625 times

Re: OpenCV Error on Fresh install

Post by torzdf »

My word is final

Locked