notAI-tech / NudeNet

Lightweight nudity detection
https://nudenet.notai.tech/
GNU Affero General Public License v3.0
1.66k stars 335 forks source link

Classify works and gives values but detector returns empty array ( [] ) #100

Closed FrancisGuindon closed 3 years ago

FrancisGuindon commented 3 years ago

Describe the bug and error messages (if any) Pretty much title, I made sure to setup, create a main, and install tensorflow + keras. I'm totally new in python, so it might be a rookie mistake.

**The code snippet which gave this error***

# Import module
from nudenet import NudeDetector

# initialize detector (downloads the checkpoint file automatically the first time)
detector = NudeDetector() # detector = NudeDetector('base') for the "base" version of detector.

# Detect single image
print(detector.detect('image_path'))

(Yes, I did replace the image path by an actual path. Classify worked with the same image.)

Specify versions of the following libraries

  1. nudenet 2.0.9
  2. tensorflow/ tensorflow-gpu 2.5.0
  3. keras 2.4.3
  4. Python 3.9

Expected behavior Gives empty array ( [] )

FrancisGuindon commented 3 years ago

Sorry, apparently it wouldn't work well with anime. Tried actual pictures and it worked. My bad. Please delete the issue