Skip to main content

A Python package for classifying nude images as real (3D) or drawn (2D) using a pre-trained EfficientNet-B0 model.

Project description

Nude Classifier

A Python package for binary classification of images to determine if they are real (3D) or drawn (2D) nude images using a pre-trained EfficientNet-B0 model.

Installation

Using pip

pip install nude-classifier-2d-3d

Using Poetry

poetry add nude-classifier-2d-3d

Requirements

  • Python 3.8+
  • PyTorch
  • torchvision
  • PIL (Pillow)

See requirements.txt or pyproject.toml for a full list of dependencies.

Usage

from nude_classifier_2d_3d import ClassifyNudeAs2dOr3d

# Initialize the classifier
classifier = ClassifyNudeAs2dOr3d()

# Classify an image
image_path = "path/to/your/image.jpg"
prob_3d = classifier.is_3d_nude_prob(image_path)
prob_2d = classifier.is_2d_nude_prob(image_path)

print(f"Probability of 3D (real) nude: {prob_3d:.2f}")
print(f"Probability of 2D (drawn) nude: {prob_2d:.2f}")

Model Details

  • Architecture: EfficientNet-B0
  • Input: RGB images (will be resized to 224x224 pixels)
  • Output: Probability score for 3D (real) nude images
  • Pre-trained Model: Included in the package (models/best_efficientnet_b0.pth)

License

This project is licensed under the MIT License. See the LICENSE file for details.

Disclaimer

This package is intended for research purposes only. Use responsibly and in compliance with applicable laws and regulations.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nude_classifier_2d_3d-1.0.3.tar.gz (15.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nude_classifier_2d_3d-1.0.3-py3-none-any.whl (15.1 MB view details)

Uploaded Python 3

File details

Details for the file nude_classifier_2d_3d-1.0.3.tar.gz.

File metadata

  • Download URL: nude_classifier_2d_3d-1.0.3.tar.gz
  • Upload date:
  • Size: 15.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.11 Windows/10

File hashes

Hashes for nude_classifier_2d_3d-1.0.3.tar.gz
Algorithm Hash digest
SHA256 5a5ee5c492f47b8922db3fc315983242e86f78afcb17b0cea30782a868d5bf1e
MD5 099e7a459360dadd3be6dc2b02b790f2
BLAKE2b-256 0ae338a07353a283e20390538901a2d7012070f567218b664322df1c9cff1063

See more details on using hashes here.

File details

Details for the file nude_classifier_2d_3d-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nude_classifier_2d_3d-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 acac342a31d27a30787031d63b66f9069dd2b507a7e8e623a283e75414038731
MD5 e83d267b675400fd5085e1e8aaa6f0d6
BLAKE2b-256 02f893457bcffa8213853a6eecc2ac13b284f43863755b1e02c4b57b750d1eae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page