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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for procslib-0.5.0.tar.gz
Algorithm Hash digest
SHA256 fb9a582f6d7b837339b345c1762506cea21c29530e74f48a2051dc242b103701
MD5 b0d8e5002d82df5676aa43b2d7da7cbf
BLAKE2b-256 146e6a1cb740b46243a31bd4e3ec3aee529234b2610a795f42e4d4db66a2569e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: procslib-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 71.1 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa78768f1170bc8cc78a08245aa296ac4f3e8e8550d048789668d3fef2661634
MD5 25f8008620310effbb828e33f7b8934b
BLAKE2b-256 f06cce24419d184991dd7192f8b66f8d9b6b18e233be6307faf53b0fdb45ca36

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