Skip to main content

Multi-purpose processing library for downstream use

Project description

procslib

ci documentation pypi version gitter

Multi-purpose processing library for various inference tasks.
Generated with copier-uv.


Installation

pip install procslib

Or using uv:

uv tool install procslib

Note: The inference requirements are not included for faster unittesting. See Dev Guide for a proper inference setup.

Quick Usage

Below is a minimal example of how to infer images with procslib:

from procslib import get_model_keys, get_model

# List available models
print(get_model_keys())

# Create a model, e.g. "twitter_logfav"
model = get_model("twitter_logfav")

# Infer on some images
image_paths = ["path/to/image1.jpg", "path/to/image2.jpg"]
results_df = model.infer_many(image_paths)
print(results_df.head())

Supported Models

You can retrieve a model via get_model(key). Here’s a quick reference:

Key Description
twitter_logfav Predicts log-scaled Twitter favorites for anime images.
weakm_v2 Aesthetic prediction model for anime images using WeakM v2 scoring.
weakm_v3 Updated WeakM v3-based aesthetic scoring model for anime images.
siglip_aesthetic A Siglip-based model for aesthetic prediction (requires specific transformers versions).
pixiv_compound_score Predicts a compound aesthetic score for Pixiv-based anime images.
cv2_metrics Computes basic image quality metrics (noise, brightness, contrast, sharpness, etc.).
complexity_ic9600 Predicts image complexity using the IC9600 model.
rtmpose Detects human pose keypoints in images using RTMPose.
depth Uses MiDaS-based depth estimation to provide a "depthness" score (0.0-1.0).
q_align_quality Predicts image quality scores using the QAlign model.
q_align_aesthetics Predicts image aesthetics using the QAlign model.
laion_watermark Detects watermarks in images using a model from LAION.
clip_aesthetic Uses CLIP-based embeddings for aesthetic scoring and zero-shot classification.
vila Generates textual descriptions of images using the NVILA-15B model.
jz_tagger Multi-label image classification model with aesthetic scoring (Danbooru-based).
aigc_classifier Classifies images as AI-generated or real using incantor/aigc_real_cls.
szh_image_category Categorizes images using szh/image_category_cls.
anime_real_cls Classifies images as anime or real with confidence scores using incantor/anime_real_cls.

Note: Q-Align and Siglip Aesthetics are incompatible with each other’s transformers version. If you need both, see Docs: Handling Conflicting Dependencies.

Development

For development tasks (testing, formatting, releasing), see Dev Guide or run:

make setup   # one-time
make format  # auto-format
make test
make check
make changelog
make release version=x.y.z

To build wheels manually, run the following commands:

python -m pip install build twine
python -m build
twine check dist/*
twine upload dist/*

Documentation

To learn more, visit our MkDocs-based docs or run:

make docs host=0.0.0.0

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

procslib-0.7.1.tar.gz (103.9 kB view details)

Uploaded Source

Built Distribution

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

procslib-0.7.1-py3-none-any.whl (90.3 kB view details)

Uploaded Python 3

File details

Details for the file procslib-0.7.1.tar.gz.

File metadata

  • Download URL: procslib-0.7.1.tar.gz
  • Upload date:
  • Size: 103.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for procslib-0.7.1.tar.gz
Algorithm Hash digest
SHA256 fa8211addc80ecd65529fe909a6004531b82712706200a7874fa2193b973e967
MD5 14f5bbfb4cada09ff915e411fd4d0960
BLAKE2b-256 7a44422275896cfb34f06742b03b0a95c69d4f39a0be89a14daa336e7df41f55

See more details on using hashes here.

File details

Details for the file procslib-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: procslib-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 90.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for procslib-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ef04124967548735bfa90ae2bf8219e3a4da19757a76d4ccadaf80f7cb5c1bc
MD5 8ef508f63721da7ed23e6ba68d2c984d
BLAKE2b-256 45a599f1c0d1216e9c511bad78a565fbf216042e7fc2bd469f75dbbf10cb7088

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