deepfakes / faceswap-playground

User dedicated repo for the faceswap project
306 stars 194 forks source link

Error when running extract #228

Closed bigxalx closed 5 years ago

bigxalx commented 5 years ago

Expected behavior

Trying to extract features with: python faceswap.py extract -i trainingdata/bla -o data/bla

Actual behavior

I get the following error:

...
12/14/2018 22:54:45 INFO     Loading Detect from Mtcnn plugin...
12/14/2018 22:54:45 INFO     Loading Align from Fan plugin...
12/14/2018 22:54:45 INFO     Starting, this may take a while...
12/14/2018 22:54:46 INFO     Initializing Face Alignment Network...
12/14/2018 22:54:46 VERBOSE  Using device No Nvidia devices found with 2048MB free of 2048MB
12/14/2018 22:54:46 INFO     Initializing MTCNN Detector...
12/14/2018 22:54:48 VERBOSE  Using device No Nvidia devices found with 2048MB free of 2048MB
2018-12-14 22:54:48.394704: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
12/14/2018 22:54:49 WARNING  Using CPU
12/14/2018 22:54:49 VERBOSE  Processing in 1 threads
12/14/2018 22:54:49 INFO     Initialized MTCNN Detector.
Extracting faces:   0%|                                                            | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/Users/arminluschin/Code/ml/faceswap/lib/cli.py", line 90, in execute_script
    process.process()
  File "/Users/arminluschin/Code/ml/faceswap/scripts/extract.py", line 51, in process
    self.run_extraction(save_thread)
  File "/Users/arminluschin/Code/ml/faceswap/scripts/extract.py", line 157, in run_extraction
    filename = faces["filename"]
TypeError: string indices must be integers

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "faceswap.py", line 36, in <module>
    ARGUMENTS.func(ARGUMENTS)
  File "/Users/arminluschin/Code/ml/faceswap/lib/cli.py", line 96, in execute_script
    crash_file = crash_log()
  File "/Users/arminluschin/Code/ml/faceswap/lib/logger.py", line 147, in crash_log
    outfile.write(sysinfo.full_info())
  File "/Users/arminluschin/Code/ml/faceswap/lib/sysinfo.py", line 260, in full_info
    for idx, device in enumerate(self.gfx_devices)]),
TypeError: 'NoneType' object is not iterable

Steps to reproduce

I get this error both when running natively on macOS as well as in Docker.

Other relevant information

torzdf commented 5 years ago

Unfortunately FAN is not currently supported on CPU. This may change in future.

This error has now been properly handled in the latest commit.