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.6.0.tar.gz (94.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.6.0-py3-none-any.whl (81.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for procslib-0.6.0.tar.gz
Algorithm Hash digest
SHA256 8e8d62b41acc743ef94315993f11db205025dc0536fba2ca0fc9c7cefcde1f64
MD5 e98feb26b0bf72c146853736efae1b95
BLAKE2b-256 f61f47350264ba38703537510bf33b50444aab0d88579c76432e04a1f065bf43

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for procslib-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b865882b397c98aa4d7c5e3baebf3bca0713915bf5c4f90444819130bf3db957
MD5 2d40c3f4bc0b8c021362f13bbb8f7f07
BLAKE2b-256 37638edbfb9605b47b6b1094c09b7598e8b8c579df15d30b8c6dda51b10766a5

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