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']))
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sdeval-0.0.4.tar.gz
(17.3 kB
view details)
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
sdeval-0.0.4-py3-none-any.whl
(17.7 kB
view details)
File details
Details for the file sdeval-0.0.4.tar.gz.
File metadata
- Download URL: sdeval-0.0.4.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e241b4c16328e3d42aa5d0d4a97298c2a18196210e1f1c111101af80bbb29521
|
|
| MD5 |
f0aabc2d256ec7b0af1fb3016084ec02
|
|
| BLAKE2b-256 |
cafc213d53da150bed6baf1328593973c4fdc0e60663c4aa9c4557b083aac853
|
File details
Details for the file sdeval-0.0.4-py3-none-any.whl.
File metadata
- Download URL: sdeval-0.0.4-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
860eb5b0d79a99cfb7142c86922902bc944dece8486dcc692181434681f3bcf4
|
|
| MD5 |
7313dd2cf07f7aec974e65eccee519f7
|
|
| BLAKE2b-256 |
bf1192814dac5f4601d05bf062f646fa3729d97d5ef73df54455ec947d007c56
|