notAI-tech / NudeNet

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

classifier output order #76

Closed AbdallaHefny closed 3 years ago

AbdallaHefny commented 3 years ago

The classifier's default categories are [unsafe, safe]. But in the readme you reversed the order:

classifier.classify('path_to_image_1')
# Returns {'path_to_image_1': {'safe': PROBABILITY, 'unsafe': PROBABILITY}}

This may be so misleading if not clear.

bedapudi6788 commented 3 years ago

how does that matter? it is a dict. not a list or tuple where order matters.

AbdallaHefny commented 3 years ago

you are right, I thought you were mapping first output(unsafe) to first dictionary key. But I checked the code again, it is dynamic. Thanks for the clarification.