sdeval
Evaluation for stable diffusion model training
Installation
You can simply install it with pip command line from the official PyPI site.
pip install sdeval
If your operating environment includes a available GPU, you can use the following installation command to achieve higher performance:
pip install sdeval[gpu]
For more information about installation, you can refer to Installation.
Quick Start
CCIP Metrics
from sdeval.fidelity import CCIPMetrics
ccip = CCIPMetrics(images='/path/of/character/dataset')
# ccip score of one image
print(ccip.score('/path/of/one/image'))
# ccip score of a directory of images
print(ccip.score('/directory/of/images'))
Bikini Plus Metrics
from sdeval.controllability import BikiniPlusMetrics
# build bikini plus score metrics
bp = BikiniPlusMetrics(
tag_blacklist=[
'bangs', 'long_hair', 'blue_eyes', 'animal_ears', 'sleeveless',
'breasts', 'grey_hair', 'medium_breasts'
]
)
# bp score of one image
# the image should contain a1111 webui's metadata of prompts
print(bp.score('/path/of/one/image'))
# bp score of a directory of images
# the images should contain a1111 webui's metadata of prompts
print(bp.score('/directory/of/images'))
AI Corrupt Metrics
from sdeval.corrupt import AICorruptMetrics
# build metrics
metrics = AICorruptMetrics()
# get ai corrupt score for one image file
print(metrics.score('/path/of/one/image'))
# get ai corrupt score of a directory of image files
print(metrics.score('/directory/of/images'))
# get ai corrupt score of list of images
print(metrics.score(['image1.png', 'image2.png']))
Metadata
Release files for sdeval 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sdeval-0.0.4.tar.gz | 17.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sdeval-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.1 kB
Release files / sdeval-0.0.4.tar.gz
| Download URL | sdeval-0.0.4.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e241b4c16328e3d42aa5d0d4a97298c2a18196210e1f1c111101af80bbb29521
|
|
BLAKE2b-256 checksum How to use checksums |
cafc213d53da150bed6baf1328593973c4fdc0e60663c4aa9c4557b083aac853
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / sdeval-0.0.4-py3-none-any.whl
| Download URL | sdeval-0.0.4-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
860eb5b0d79a99cfb7142c86922902bc944dece8486dcc692181434681f3bcf4
|
|
BLAKE2b-256 checksum How to use checksums |
bf1192814dac5f4601d05bf062f646fa3729d97d5ef73df54455ec947d007c56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for sdeval 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.