Closed flashultra closed 5 years ago
@bedapudi6788 does this look easy for you?
@GantMan @flashultra will check this and update you in a few hours.
Thank you for looking for that. Do you have any progress / update ?
@flashultra I couldn't reproduce the issue. Please take a look at https://colab.research.google.com/drive/1xxiTYyEsW1w1RpG3rco72eMNpB3A-0nh
Thank you. It works with latest git git clone https://github.com/GantMan/nsfw_model
Not have any problem with nsfw.299x299.h5 model , but give error when I tried with nsfw_mobilenet2.224x224.h5
.
The warrning is
keras-2.2.4-py3.6.egg\keras\engine\saving.py:327: UserWarning: Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer. warnings.warn('Error in loading the saved optimizer '
and the error is
ValueError: Error when checking input: expected input_1 to have shape (224, 224, 3) but got array with shape (299, 299, 3)
It's expecting 224 , but receive 299.
@flashultra that means, the model is expecting a different image size. just pass the correct image size to the predict function
predict(image_paths = [], image_size = (224, 224))
@GantMan I think you can go ahead and close this issue.
Thank you.
I have the same problem. How did you solve it
I have this problem @GantMan !
from nsfw_detector import NSFWDetector
ImportError: cannot import name 'NSFWDetector' from 'nsfw_detector' (/content/nsfw_detector/init.py)
I'm trying to run example and just for test I created file with only one row inside:
from nsfw_detector import NSFWDetector
but I've got the errorNo module named 'nsfw_detector'
I have tensorflow ( 1.13.1 ) , keras ( 2.2.4 ) and also usesetup.py install
for nsfw_model repository. What I miss ?Thank you.