Skip to content
프로젝트

discus0434/aesthetic-predictor-v2-5

GitHub에서 보기

소개

SigLIP 기반 미적 점수 예측기

기타 프로젝트

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
+1
in 7 days
+1
in 15 days
+2
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Aesthetic Predictor V2.5

Aesthetic Predictor V2.5 is a SigLIP-based predictor that evaluates the aesthetics of an image on a scale from 1 to 10.

Compared to Aesthetic Predictor V2, it has been improved to evaluate a wider range of image domains such as illustrations.

Unlike V2, 5.5+ is considered to be a great aesthetic score.

You can try Aesthetic Predictor V2.5 at Hugging Face Spaces!

Hugging Face Spaces

Installation

pip install aesthetic-predictor-v2-5

Usage

This repository features an interface similar to Hugging Face Transformers, almost same as Simple Aesthetics Predictor, making it easy to use.

from pathlib import Path

import torch
from aesthetic_predictor_v2_5 import convert_v2_5_from_siglip
from PIL import Image

SAMPLE_IMAGE_PATH = Path("path/to/image")

# load model and preprocessor
model, preprocessor = convert_v2_5_from_siglip(
    low_cpu_mem_usage=True,
    trust_remote_code=True,
)
model = model.to(torch.bfloat16).cuda()

# load image to evaluate
image = Image.open(SAMPLE_IMAGE_PATH).convert("RGB")

# preprocess image
pixel_values = (
    preprocessor(images=image, return_tensors="pt")
    .pixel_values.to(torch.bfloat16)
    .cuda()
)

# predict aesthetic score
with torch.inference_mode():
    score = model(pixel_values).logits.squeeze().float().cpu().numpy()

# print result
print(f"Aesthetics score: {score:.2f}")

With ComfyUI, you can use this custom node.

관련 프로젝트 살펴보기

불러오는 중…