retinaface-tf2
retinaface-tf2 copied to clipboard
Error Test.py on one image
Hi,
Thank you for your repo retinaface.
I have some trouble to use your implementation (my configuration : Python 3.7 / Tensorflow 2.4 - CPU).
I simply wanted to infer RetinaFace with your pretrained weights.
When I use the command line
python test.py --cfg_path="./configs/retinaface_res50.yaml" --img_path=MYIMAGEPATH --down_scale_factor=1.0
I got this error :
tensorflow.python.framework.errors_impl.InvalidArgumentError: ConcatOp : Dimensions of inputs should match: shape[0] = [45056,2] vs. shape[1] = [22528,2] [Op:ConcatV2] name: concat
Do you have any idea what may cause this error?
Thank you in advance
Same issue here. This is the error I get with mobilenetV2 backend.
status = self.read(save_path, options=options)
File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 2148, in read
return self._saver.restore(save_path=save_path, options=options)
File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 1336, in restore
base.CheckpointPosition(
File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/tracking/base.py", line 253, in restore
restore_ops = trackable._restore_from_checkpoint_position(self) # pylint: disable=protected-access
File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/tracking/base.py", line 972, in _restore_from_checkpoint_position
current_position.checkpoint.restore_saveables(
File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 307, in restore_saveables
new_restore_ops = functional_saver.MultiDeviceSaver(
File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/saving/functional_saver.py", line 345, in restore
restore_ops = restore_fn()
File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/saving/functional_saver.py", line 321, in restore_fn
restore_ops.update(saver.restore(file_prefix, options))
File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/saving/functional_saver.py", line 115, in restore
restore_ops[saveable.name] = saveable.restore(
File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/saving/saveable_object_util.py", line 131, in restore
return resource_variable_ops.shape_safe_assign_variable_handle(
File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/ops/resource_variable_ops.py", line 307, in shape_safe_assign_variable_handle
shape.assert_is_compatible_with(value_tensor.shape)
File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/framework/tensor_shape.py", line 1134, in assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (1, 1, 192, 64) and (1, 1, 32, 64) are incompatible
It will work at tensorflow-gpu==2.1.0.
pip install tensorflow-gpu==2.1.0
meet the same issue that can not work with mobilenet_v2
(env-tf2.1) gnar@ubuntu:~/python/retinaface-tf2$ python test.py --cfg_path="./configs/retinaface_mbv2.yaml" --img_path="./data/0_Parade_marchingband_1_149.jpg" --down_scale_factor=1.0
Traceback (most recent call last):
File "test.py", line 130, in
I get same issue in MobileNetV2
Shapes (1, 1, 192, 64) and (1, 1, 32, 64) are incompatible
I get same issue in MobileNetV2
Shapes (1, 1, 192, 64) and (1, 1, 32, 64) are incompatible
Please ensure the model file is trained/saved and loaded with the same version of TensorFlow.
pip install tensorflow-gpu==2.1.0
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==2.1.0
ERROR: No matching distribution found for tensorflow-gpu==2.1.0
In Ubuntu, is this repo is Windows only?
Dear all,
I got the same error: Shapes (1, 1, 192, 64) and (1, 1, 32, 64) are incompatible
I need to check if it is due to tensorflow version incomapatibility , and since working on colab should we reproduce training to get checkpoint compatible version?
Thanks for help