Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
2 |
# Aesthetic Scorer
|
3 |
|
@@ -24,8 +35,8 @@ import torch
|
|
24 |
from PIL import Image
|
25 |
|
26 |
# Load the model
|
27 |
-
processor = CLIPProcessor.from_pretrained("
|
28 |
-
model = torch.load("
|
29 |
|
30 |
# Process an image
|
31 |
image = Image.open("your_image.jpg")
|
@@ -38,5 +49,5 @@ with torch.no_grad():
|
|
38 |
# Print results
|
39 |
aesthetic_categories = ["Overall", "Quality", "Composition", "Lighting", "Color", "Depth of Field", "Content"]
|
40 |
for category, score in zip(aesthetic_categories, scores):
|
41 |
-
print(f"{category}: {score.item():.2f}/
|
42 |
-
```
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
base_model:
|
6 |
+
- openai/clip-vit-base-patch32
|
7 |
+
pipeline_tag: image-classification
|
8 |
+
tags:
|
9 |
+
- aesthetics
|
10 |
+
- creativity
|
11 |
+
---
|
12 |
|
13 |
# Aesthetic Scorer
|
14 |
|
|
|
35 |
from PIL import Image
|
36 |
|
37 |
# Load the model
|
38 |
+
processor = CLIPProcessor.from_pretrained("rsinema/aesthetic-scorer")
|
39 |
+
model = torch.load("rsinema/aesthetic-scorer/model.pt")
|
40 |
|
41 |
# Process an image
|
42 |
image = Image.open("your_image.jpg")
|
|
|
49 |
# Print results
|
50 |
aesthetic_categories = ["Overall", "Quality", "Composition", "Lighting", "Color", "Depth of Field", "Content"]
|
51 |
for category, score in zip(aesthetic_categories, scores):
|
52 |
+
print(f"{category}: {score.item():.2f}/5")
|
53 |
+
```
|