vggface2_resnet50_v2.h5 install

Installing and setting up FaceSwap
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
Posts: 2
Joined: Tue Jan 14, 2020 10:14 am

vggface2_resnet50_v2.h5 install

Post by akthaman » Tue Jan 14, 2020 10:28 am

when I ran sort first time, it tried to download vggface2_resnet50_v2.h5 but after a few retries something went wrong. I tried the sort command again but now it said vggface2_resnet50_v2.h5 not found. I have downloaded the vggface2_resnet50_v2.h5 file, please advice where how to install it.

MAC OSX catalina user.

crash log:

01/14/2020 15:02:22 MainProcess MainThread logger log_setup INFO Log level set to: INFO
01/14/2020 15:02:24 MainProcess MainThread module_wrapper _tfmw_add_deprecation_warning DEBUG From /Users/ashu/anaconda3/lib/python3.6/site-packages/keras/backend/ The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n
01/14/2020 15:02:24 MainProcess MainThread module_wrapper _tfmw_add_deprecation_warning DEBUG From /Users/ashu/anaconda3/lib/python3.6/site-packages/keras/backend/ The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n
01/14/2020 15:02:26 MainProcess MainThread cli execute_script ERROR Got Exception on main handler:
Traceback (most recent call last):
File "/Users/ashu/faceswap/lib/", line 128, in execute_script
File "/Users/ashu/faceswap/tools/", line 62, in process
self.vgg_face = VGGFace(backend=self.args.backend, loglevel=self.args.loglevel)
File "/Users/ashu/faceswap/lib/", line 51, in __init__
self.model = self._get_model(git_model_id, model_filename, backend)
File "/Users/ashu/faceswap/lib/", line 86, in _get_model
"L2_normalize": L2_normalize
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/engine/", line 419, in load_model
model = _deserialize_model(f, custom_objects, compile)
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/engine/", line 225, in _deserialize_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/engine/", line 458, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/layers/", line 55, in deserialize
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/utils/", line 145, in deserialize_keras_object
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/engine/", line 1032, in from_config
process_node(layer, node_data)
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/engine/", line 991, in process_node
layer(unpack_singleton(input_tensors), **kwargs)
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/engine/", line 457, in __call__
output =, **kwargs)
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/layers/", line 185, in call
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/backend/", line 1858, in normalize_batch_in_training
if not _has_nchw_support() and list(reduction_axes) == [0, 2, 3]:
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/backend/", line 291, in _has_nchw_support
explicitly_on_cpu = _is_current_explicit_device('CPU')
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/backend/", line 266, in _is_current_explicit_device
device = _get_current_tf_device()
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/keras/backend/", line 247, in _get_current_tf_device
File "/Users/ashu/anaconda3/lib/python3.6/site-packages/tensorflow_core/python/framework/", line 4398, in _apply_device_functions
AttributeError: '_TfDeviceCaptureOp' object has no attribute '_set_device_from_string'
01/14/2020 15:02:26 MainProcess MainThread cli execute_script CRITICAL An unexpected crash has occurred. Crash report written to '/Users/ashu/faceswap/crash_report.2020.01.14.150226896638.log'. You MUST provide this file if seeking assistance. Please verify you are running the latest version of faceswap before reporting

User avatar
Site Admin
Posts: 155
Joined: Fri Jul 12, 2019 12:49 am
Answers: 15
Location: San Francisco
Has thanked: 3 times
Been thanked: 42 times

Re: vggface2_resnet50_v2.h5 install

Post by bryanlyon » Tue Jan 14, 2020 3:54 pm

From the faceswap folder, plugins/extract/recognition/.cache/vggface2_resnet50_v2.h5

Post Reply