Closed remusnegrota closed 4 years ago
Yikes, I might have done this.
@remusnegrota Where are you seeing this error? A stack trace + command used would help. I can't even find an import of NSFWDetector, its only defined nsfw_model\tf1\nsfw_detector\__init__.py
@TechnikEmpire If you simply import the package as before and as it is stated in the Usage readme, like so:
from nsfw_detector import NSFWDetector
then it throws that error directly, no other stack trace
ImportError: cannot import name 'NSFWDetector' from 'nsfw_detector' (unknown location)
Maybe its a documentation issue and the way you need to import the package changed, in that case just update the Usage instructions.
The new version does need a little work to fix the package and documentation, but here's how to run it. Most notably, the simple run directions are out of date.
git clone git@github.com:GantMan/nsfw_model.git
cd nsfw_model/nsfw_detector
(download model from release, unzip model, assume it's in `mobilenet_v2_140_224`)
(download images, place them in `images`)
python predict.py --saved_model_path mobilenet_v2_140_224 --image_dir images
BTW, I will try to push a change for this tonight.
Getting this error:
ImportError: cannot import name 'NSFWDetector' from 'nsfw_detector' (unknown location)