Multi-purpose processing library for downstream use
Project description
procslib
Multi-purpose processing library for downstream use. Project generated with copier-uv
Installation
pip install procslib
With uv:
uv tool install procslib
Usage
procslib allows inference with many models using a single interface, by sumbitting different keys, similar to Huggingface AutoModels:
from procslib import get_model_keys, get_model
# get available keys
print(get_model_keys())
# create a model
model = get_model("twitter_logfav")
# do inference
iamge_paths_list = ["path/to/image1.jpg", "path/to/image2.jpg"]
res_df = model.infer_many(image_paths_list)
Supported Models:
the models can be retrieved by calling get_model(key) where key is one of the following:
- note that Q-Align models requires
transformers==4.36.1, which is incompatible withsiglip_aesthetic.
| key | field | description | backbone |
|---|---|---|---|
twitter_logfav |
anime | log(predicted twitter favorite count) | convnext v2 base |
weakm_v2 |
anime | previous version of numerical aesthetics score | convnext v2 base |
siglip_aesthetic |
general | an Clip Aesthetics alternative that uses siglip backbone and with better performance on anime discus0434/aesthetic-predictor-v2-5 |
siglip (vit) + mlp |
pixiv_compound_score |
anime | numerical aesthetics score based on pixiv bookmarks and other metrics | convnext v2 tiny |
cv2_metrics |
general | many useful image related metrics, such as noise, exposure, edge count, etc | (Not a model) |
complexity_ic9600 |
general | a model that analyzes the "complexity" of images tinglyfeng/IC9600 |
ICNet (resnet18) |
rtmpose |
general | analyzes the presence of body parts of images mmpose/projects/rtmpose at main |
RTMDet |
depth |
general | using MiDaS 3.0 to analyze the "depthness" of images and returns a numerical metric Intel/dpt-hybrid-midas · Hugging Face |
MiDaS |
q_align_quality |
general | image quality assessment using Q-Align model (rough/distorted images = lower score; refined images = higher score) Q-Future/Q-Align |
VLM |
q_align_aesthetics |
general | image aesthetics assessment using Q-Align model (warn: has a western, or "midjourney-like" taste for higher qualities) Q-Future/Q-Align |
VLM |
laion_watermark |
general | a very fast watermark detection model that detects if there's text on the image. (works 80% of the time but could be inaccurate) LAION-AI/LAION-5B-WatermarkDetection |
EfficientNet B3 |
clip_aesthetic |
general | (WIP) caches clip embeddings, calculates similarities with a given list of prompts, then outputs aesthetics scores by supplying a list of MLP models. Very fast when embeddings are cached. troph-team/pixai-aesthetic |
clip (vit) + mlp |
Development
for how to navigate the project repo (generate changelogs, release versions, etc) see the project template documentation:
make setup # only once
<write code>
make format # to auto-format the code
<write tests>
make test # to run the test suite
make check # to check if everything is OK
<commit your changes>
make changelog # to update the changelog
<edit changelog if needed>
make release version=x.y.z # to release a new version (find the exact version number to use from CHANGELOG.md)
Documentation
To view (and live edit) the documentations, 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file procslib-0.4.1.tar.gz.
File metadata
- Download URL: procslib-0.4.1.tar.gz
- Upload date:
- Size: 60.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3fc12272d4c9220b3df8230ddf9a740575e4dbda87e8601f3955ac2c56c5f7f
|
|
| MD5 |
1279e44c7293684da53ae5a94d6aca7d
|
|
| BLAKE2b-256 |
ced435924da8c730b0eba5b91cd81751a453d49ecaf1e3e1b7612c6691197dfb
|
File details
Details for the file procslib-0.4.1-py3-none-any.whl.
File metadata
- Download URL: procslib-0.4.1-py3-none-any.whl
- Upload date:
- Size: 53.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bb6b0d331e71f68c6ba185619f91b0dc5dfbab95e550fe0cd068da7a5016ed3
|
|
| MD5 |
35ded5c337be828faf4c5fb0533c90a3
|
|
| BLAKE2b-256 |
14b57d8689fe68e0e309ae9c244500747350ad8402504de1b6c87f15dedab6f6
|