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

Using Poetry

poetry add nude-classifier

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.2.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.2-py3-none-any.whl (15.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nude_classifier_2d_3d-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 0db4a028290a7492afab25752d6af6b50461c849ecbf514a26f5f9e127503bf7
MD5 28e08c2334013d67529e83c3ded6f408
BLAKE2b-256 34e2011c4b07e8c4e9c4d04ba58b0f2fc4722cb828fb7b35f8578be63ec606e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nude_classifier_2d_3d-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 00a45e1b24185c07a6ed802f37226d613eeffb929b7064699c905557093029ab
MD5 f012982d7c30f1750bca637d86173409
BLAKE2b-256 04fd3a125bf259d3c1af14f890af6344fda598af46bdc7c7517aaff198c08498

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