Closed barezina closed 4 years ago
Hey! Thanks for the reply. Issue #19 doesn’t contain the same issue that I’m experiencing, but I’ll check all my versions and give it another go. 🙏
It's the same. The code is working as expected. You didn't get any errors. You are just not printing the output anywhere.
Can you just post the exact code and the exact output. There is no error in the description you provided.
As you can clearly see, the only thing you posted is a warning and it doesn't matter because you are not training the model.
I'll get the exact python file I am running and the corresponding output shortly...
Note: one.jpg is not an explicit image.
Python File:
from nudenet import NudeDetector
detector = NudeDetector()
# Performing detection
result = detector.detect('/nsfw/one.jpg')
print(result)
Output
root@eb44230d89e0:/nsfw# python3 detector.py
Using TensorFlow backend.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:4115: The name tf.random_normal is deprecated. Please use tf.random.normal instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:4138: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:1919: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:3976: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:4185: The name tf.truncated_normal is deprecated. Please use tf.random.truncated_normal instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras_retinanet/backend/tensorflow_backend.py:68: The name tf.image.resize_images is deprecated. Please use tf.image.resize instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras_retinanet/backend/tensorflow_backend.py:104: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:174: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:181: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:186: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
2020-02-14 05:37:43.969855: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: FMA
2020-02-14 05:37:43.997358: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3693225000 Hz
2020-02-14 05:37:43.997994: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0xad601f0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-02-14 05:37:43.998067: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:190: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:199: The name tf.is_variable_initialized is deprecated. Please use tf.compat.v1.is_variable_initialized instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:206: The name tf.variables_initializer is deprecated. Please use tf.compat.v1.variables_initializer instead.
/usr/local/lib/python3.6/dist-packages/keras/engine/saving.py:292: UserWarning: No training configuration found in save file: the model was *not* compiled. Compile it manually.
warnings.warn('No training configuration found in save file: '
[]
root@eb44230d89e0:/nsfw#
Is there any output provided when you feed a safe image through the detector?
[]
this is the output printed. That means, eveything works as expected.
Is there any output provided when you feed a safe image through the detector?
Yes!
Thank you, sorry for the questions 🙏
BTW, the warning is because, the retinanet model i provide is a "prediction" model. It is not compiled and doesn't have any optimizer information.
Hey mate, Docker running tensorflow 1.15.3 (python3) and your code.
When I try and run that example python script (detector):
it complains at this point:
Any pointers as to what might be happening here? Should I be running a specific version of tensorflow? The classify script works a treat but I cant seem to get detector to work.
Cheers,