deepfakes / faceswap

Deepfakes Software For All
https://www.faceswap.dev
GNU General Public License v3.0
52.18k stars 13.2k forks source link

Extracting faces crash #747

Closed obiwankenoobi closed 5 years ago

obiwankenoobi commented 5 years ago

Describe the bug The program crash right when it start to extract faces

To Reproduce python3.6 faceswap.py extract -i face_1 -o face_1_extract

Expected behavior Train the model

Additional context

06/02/2019 14:35:51 MainProcess     MainThread      extract         threaded_io               DEBUG    Threading task: (Task: 'save')
06/02/2019 14:35:51 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'save_faces', thread_count: 1)
06/02/2019 14:35:51 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: 'save_faces'
06/02/2019 14:35:51 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): 'save_faces'
06/02/2019 14:35:51 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: 'save_faces_0'
06/02/2019 14:35:51 MainProcess     save_faces_0    extract         save_faces                DEBUG    Save Faces: Start
06/02/2019 14:35:51 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads 'save_faces': 1
06/02/2019 14:35:51 MainProcess     MainThread      extract         process_item_count        DEBUG    Items already processed: 0
06/02/2019 14:35:51 MainProcess     MainThread      extract         process_item_count        DEBUG    Items to be Processed: 33
06/02/2019 14:35:51 MainProcess     MainThread      pipeline        launch                    DEBUG    Launching aligner and detector
06/02/2019 14:35:51 MainProcess     MainThread      pipeline        launch_aligner            DEBUG    Launching Aligner
06/02/2019 14:35:51 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing SpawnProcess: (target: 'Aligner.run', args: (), kwargs: {})
06/02/2019 14:35:51 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized SpawnProcess: 'Aligner.run'
06/02/2019 14:35:51 MainProcess     MainThread      multithreading  start                     DEBUG    Spawning Process: (name: 'Aligner.run', args: (), kwargs: {'event': <multiprocessing.synchronize.Event object at 0x139986ac8>, 'error': <multiprocessing.synchronize.Event object at 0x1399abc50>, 'log_init': <function set_root_logger at 0x102a390d0>, 'log_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x102b78dd8>, 'log_level': 10, 'in_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x13999fc88>, 'out_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x13999fda0>}, daemon: True)
06/02/2019 14:35:51 MainProcess     MainThread      multithreading  start                     DEBUG    Spawned Process: (name: 'Aligner.run', PID: 93983)
06/02/2019 14:35:51 Aligner.run     MainThread      _base           initialize                DEBUG    _base initialize Align: (PID: 93983, args: (), kwargs: {'event': <multiprocessing.synchronize.Event object at 0x10b7606a0>, 'error': <multiprocessing.synchronize.Event object at 0x1228c3710>, 'log_init': <function set_root_logger at 0x10b834048>, 'log_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x122912ac8>, 'log_level': 10, 'in_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x122912ba8>, 'out_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x122912c18>})
06/02/2019 14:35:51 Aligner.run     MainThread      fan             initialize                INFO     Initializing Face Alignment Network...
06/02/2019 14:35:51 Aligner.run     MainThread      fan             initialize                DEBUG    fan initialize: (args: () kwargs: {'event': <multiprocessing.synchronize.Event object at 0x10b7606a0>, 'error': <multiprocessing.synchronize.Event object at 0x1228c3710>, 'log_init': <function set_root_logger at 0x10b834048>, 'log_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x122912ac8>, 'log_level': 10, 'in_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x122912ba8>, 'out_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x122912c18>})
06/02/2019 14:35:51 Aligner.run     MainThread      gpu_stats       __init__                  DEBUG    Initializing GPUStats
06/02/2019 14:35:51 Aligner.run     MainThread      gpu_stats       initialize                DEBUG    macOS Detected. Using pynvx
06/02/2019 14:35:51 Aligner.run     MainThread      gpu_stats       get_driver                DEBUG    GPU Driver: 0
06/02/2019 14:35:51 Aligner.run     MainThread      gpu_stats       get_devices               DEBUG    GPU Devices: []
06/02/2019 14:35:51 Aligner.run     MainThread      gpu_stats       get_vram                  DEBUG    GPU VRAM: []
06/02/2019 14:35:51 Aligner.run     MainThread      gpu_stats       __init__                  WARNING  No GPU detected. Switching to CPU mode
06/02/2019 14:35:51 Aligner.run     MainThread      _base           get_vram_free             VERBOSE  Using device No Nvidia devices found with 2048MB free of 2048MB
06/02/2019 14:35:51 Aligner.run     MainThread      fan             initialize                VERBOSE  Reserving 2240MB for face alignments
06/02/2019 14:35:51 MainProcess     load_images_0   extract         load_images               DEBUG    Load Images: Complete
06/02/2019 14:35:52 Aligner.run     MainThread      fan             load_graph                VERBOSE  Initializing Face Alignment Network model...
06/02/2019 14:35:53 Aligner.run     MainThread      fan             set_session               WARNING  Using CPU
06/02/2019 14:35:58 Aligner.run     MainThread      fan             initialize                INFO     Initialized Face Alignment Network.
06/02/2019 14:35:58 MainProcess     MainThread      pipeline        launch_aligner            DEBUG    Launched Aligner
06/02/2019 14:35:58 Aligner.run     MainThread      _base           align                     DEBUG    Launching Align: (args: () kwargs: {'event': <multiprocessing.synchronize.Event object at 0x10b7606a0>, 'error': <multiprocessing.synchronize.Event object at 0x1228c3710>, 'log_init': <function set_root_logger at 0x10b834048>, 'log_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x122912ac8>, 'log_level': 10, 'in_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x122912ba8>, 'out_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x122912c18>})
06/02/2019 14:35:58 MainProcess     MainThread      pipeline        launch_detector           DEBUG    Launching Detector
06/02/2019 14:35:58 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing SpawnProcess: (target: 'Detector.run', args: (), kwargs: {})
06/02/2019 14:35:58 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized SpawnProcess: 'Detector.run'
06/02/2019 14:35:58 MainProcess     MainThread      multithreading  start                     DEBUG    Spawning Process: (name: 'Detector.run', args: (), kwargs: {'event': <multiprocessing.synchronize.Event object at 0x139949940>, 'error': <multiprocessing.synchronize.Event object at 0x1399b69e8>, 'log_init': <function set_root_logger at 0x102a390d0>, 'log_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x102b78dd8>, 'log_level': 10, 'in_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x13999fcf8>, 'out_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x13999fc88>}, daemon: True)
06/02/2019 14:35:58 MainProcess     MainThread      multithreading  start                     DEBUG    Spawned Process: (name: 'Detector.run', PID: 93994)
06/02/2019 14:35:59 Detector.run    MainThread      _base           run                       DEBUG    Executing detector run function
06/02/2019 14:35:59 Detector.run    MainThread      _base           initialize                DEBUG    initialize Detect (PID: 93994, args: (), kwargs: {'event': <multiprocessing.synchronize.Event object at 0x10f4716a0>, 'error': <multiprocessing.synchronize.Event object at 0x1265d6710>, 'log_init': <function set_root_logger at 0x10f545048>, 'log_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x126675898>, 'log_level': 10, 'in_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x126675978>, 'out_queue': <AutoProxy[Queue] object, typeid 'Queue' at 0x1266759e8>})
06/02/2019 14:35:59 Detector.run    MainThread      mtcnn           initialize                INFO     Initializing MTCNN Detector...
06/02/2019 14:35:59 Detector.run    MainThread      gpu_stats       __init__                  DEBUG    Initializing GPUStats
06/02/2019 14:35:59 Detector.run    MainThread      gpu_stats       initialize                DEBUG    macOS Detected. Using pynvx
06/02/2019 14:35:59 Detector.run    MainThread      gpu_stats       get_driver                DEBUG    GPU Driver: 0
06/02/2019 14:35:59 Detector.run    MainThread      gpu_stats       get_devices               DEBUG    GPU Devices: []
06/02/2019 14:35:59 Detector.run    MainThread      gpu_stats       get_vram                  DEBUG    GPU VRAM: []
06/02/2019 14:35:59 Detector.run    MainThread      gpu_stats       __init__                  WARNING  No GPU detected. Switching to CPU mode
06/02/2019 14:35:59 Detector.run    MainThread      _base           get_vram_free             VERBOSE  Using device No Nvidia devices found with 2048MB free of 2048MB
06/02/2019 14:35:59 Detector.run    MainThread      deprecation     new_func                  WARNING  From /Users/artiumsirchenko/.pyenv/versions/vm_3.6.0/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\nInstructions for updating:\nColocations handled automatically by placer.
06/02/2019 14:35:59 Detector.run    MainThread      deprecation     new_func                  WARNING  From /Users/user_path/faceswap/plugins/extract/detect/mtcnn.py:423: div (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\nInstructions for updating:\nDeprecated in favor of operator or tf.math.divide.
06/02/2019 14:35:59 Detector.run    MainThread      _base           detect_faces              ERROR    Object arrays cannot be loaded when allow_pickle=False
Traceback (most recent call last):
  File "/Users/user_path/faceswap/lib/cli.py", line 110, in execute_script
    process.process()
  File "/Users/user_path/faceswap/scripts/extract.py", line 58, in process
    self.run_extraction()
  File "/Users/user_path/faceswap/scripts/extract.py", line 177, in run_extraction
    self.extractor.launch()
  File "/Users/user_path/faceswap/plugins/extract/pipeline.py", line 144, in launch
    self.launch_detector()
  File "/Users/user_path/faceswap/plugins/extract/pipeline.py", line 210, in launch_detector
    raise ValueError("Error initializing Detector")
ValueError: Error initializing Detector

============ System Information ============
encoding:            UTF-8
git_branch:          master
git_commits:         26836a4 Bugfixes. 6b7efa4 Convert: Add manual balance color adjustment plugin. 236c35f Convert settings tool (#737). 919b672 Bugfix: save interval on extract (#740). 66cee3e Pin imageio to version 2.5.0
gpu_cuda:            Unsupported OS
gpu_cudnn:           Unsupported OS
gpu_devices:         
gpu_devices_active:  
gpu_driver:          0
gpu_vram:            
os_machine:          x86_64
os_platform:         Darwin-18.6.0-x86_64-i386-64bit
os_release:          18.6.0
py_command:          faceswap.py extract -i face_1 -o face_1_extract
py_conda_version:    N/A
py_implementation:   CPython
py_version:          3.6.0
py_virtual_env:      True
sys_cores:           12
sys_processor:       i386
sys_ram:             Total: 16384MB, Available: 6299MB, Used: 8053MB, Free: 930MB

=============== Pip Packages ===============
absl-py==0.7.1
astor==0.8.0
cycler==0.10.0
Django==2.2.1
estimator==0.0.10
fastcluster==1.1.25
gast==0.2.2
grpcio==1.21.1
h5py==2.9.0
image==1.5.27
Keras==2.2.4
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
kiwisolver==1.1.0
Markdown==3.1.1
matplotlib==3.1.0
mock==3.0.5
numpy==1.16.4
opencv-python==4.1.0.25
Pillow==6.0.0
protobuf==3.8.0
psutil==5.6.2
pynvx==1.0.0
pyparsing==2.4.0
python-dateutil==2.8.0
pytz==2019.1
PyYAML==5.1
scipy==1.3.0
six==1.12.0
sqlparse==0.3.0
tensorboard==1.13.1
tensorflow==1.13.1
tensorflow-estimator==1.13.0
termcolor==1.1.0
tqdm==4.32.1
train==0.0.3
Werkzeug==0.15.4
torzdf commented 5 years ago

Downgrade numpy to 1.16.2