vardanagarwal / Proctoring-AI

Creating a software for automatic monitoring in online proctoring
MIT License
540 stars 329 forks source link

Issues with Tensorflow 2.4 use Tensorflow 2.2 #40

Closed vardanagarwal closed 3 years ago

vardanagarwal commented 3 years ago

There seems to be some issues when using the face landmarks model with Tensorflow 2.4. It works fine with Tensorflow 2.2. You can refer to #34 which had this problem.

mchen07 commented 3 years ago

Thanks for creating this new issue. When I downgrade to use TensorFlow 2.2, the program works, but I saw something like this on the console:

2020-12-30 09:41:45.363067: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
WARNING:tensorflow:Unable to create a python object for variable <tf.Variable 'global_step:0' shape=() dtype=int64_ref> because it is a reference variable. It may not be visible to training APIs. If this is a problem, consider rebuilding the SavedModel after running tf.compat.v1.enable_resource_variables().
WARNING:tensorflow:Unable to create a python object for variable <tf.Variable 'layer1/conv2d/kernel:0' shape=(3, 3, 3, 32) dtype=float32_ref> because it is a reference variable. It may not be visible to training APIs. If this is a problem, consider rebuilding the SavedModel after running tf.compat.v1.enable_resource_variables().
WARNING:tensorflow:Unable to create a python object for variable <tf.Variable 'layer1/conv2d/bias:0' shape=(32,) dtype=float32_ref> because it is a reference variable. It may not be visible to training APIs. If this is a problem, consider rebuilding the SavedModel after running tf.compat.v1.enable_resource_variables().
WARNING:tensorflow:Unable to create a python object for variable <tf.Variable 'layer2/conv2d/kernel:0' shape=(3, 3, 32, 64) dtype=float32_ref> because it is a reference variable. It may not be visible to training APIs. If this is a problem, consider rebuilding the SavedModel after running tf.compat.v1.enable_resource_variables().

Does that mean that savedModel is not up-to-date?

vardanagarwal commented 3 years ago

The issue seems to be there because the model might have been trained in Tensorflow 1, but I am not sure. You can ask raise an issue on repository from where the model is taken.

The issue regarding Tensorflow 2.4 also seems with the model so until that repo gets updated we will be stuck.

mchen07 commented 3 years ago

Would you mind pointing me where savedModel is downloaded from? Is this: https://github.com/davisking/dlib-models? But I didn't see any .pb file there?

vardanagarwal commented 3 years ago

https://github.com/yinguobing/cnn-facial-landmark

vardanagarwal commented 3 years ago

Closing with the fix suggested in #34.