Skip to main content

A small python package for detecting nsfw on a Windows display.

Project description

NSFW Screen Detect

PyPi version

A small python package for detecting NSFW content on a Windows display.

Usage

This package does the following by default:

  1. Take a screenshot on all connected displays. You can take a screenshot of just the active window by passing input='active_window' to the check method. You can also pass in a Pillow image like so : input=Image
  2. Detect actual images from the screenshot. You can skip this by passing parse_images=False to the check method.
  3. Run skin detection. You can set the skin_threshold parameter to have NSFW checking skipped if an image contains very little skin.
  4. Use AI to detect how NSFW each image is. You can pass check_type='skin' to just get a skin color score.
  5. Returns each analyzed picture along with its results.

Examples

# Import and initialize the main Checker class
from nsfw_screen_detect import Checker
checker = Checker()

# Run check on all monitors
results = checker.check()

# Run check on active window
results = checker.check(input='active_window')

# Run check for skin content
results = checker.check(check_type='skin')

# Run check without parsing real pictures from screenshot
results = checker.check(parse_images=False)

Big thanks to NudeNet for their AI model.

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

nsfw_screen_detect-0.2.1.tar.gz (76.7 MB view details)

Uploaded Source

Built Distribution

nsfw_screen_detect-0.2.1-py3-none-any.whl (76.7 MB view details)

Uploaded Python 3

File details

Details for the file nsfw_screen_detect-0.2.1.tar.gz.

File metadata

  • Download URL: nsfw_screen_detect-0.2.1.tar.gz
  • Upload date:
  • Size: 76.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for nsfw_screen_detect-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3ba8fae48a3bf508e728b5d8c24236a03e9a1d9b4b3f73ee363f343dcdd9f9ff
MD5 22e549def80025566a542ab3ba2afd98
BLAKE2b-256 32a42a3501113eeaa3139ec6bab0dd1873065a02ea8e015874eb73733f8955ef

See more details on using hashes here.

File details

Details for the file nsfw_screen_detect-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nsfw_screen_detect-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 25c0e1a3ddcec70c080802e331d2694b59d2517e55fcd57d524a9be6a0cf656c
MD5 a13fd4238846068d206ecbcc59dfb64d
BLAKE2b-256 7214cdfa24dd56ae9d6881aa70ad2c422419d753ddb0a52a5f9b6241afb805a6

See more details on using hashes here.

Supported by

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