Update README.md
Browse files
README.md
CHANGED
@@ -74,10 +74,12 @@ def IQA_preprocess():
|
|
74 |
])
|
75 |
return transform
|
76 |
|
77 |
-
|
78 |
|
79 |
with torch.no_grad():
|
80 |
-
iqa_score = model(
|
|
|
|
|
81 |
|
82 |
# maps the predicted score from the model's range [min_pred, max_pred]
|
83 |
# to the actual range [min_score, max_score] using min-max scaling.
|
@@ -88,4 +90,4 @@ max_score =
|
|
88 |
min_score =
|
89 |
|
90 |
normalized_score = ((iqa_score - min_pred) / (max_pred - min_pred)) * (max_score - min_score) + min_score
|
91 |
-
print(f"Predicted quality Score: {
|
|
|
74 |
])
|
75 |
return transform
|
76 |
|
77 |
+
batch = torch.stack([IQA_preprocess()(image) for _ in range(15)]).to(device) # Shape: (15, 3, 224, 224)
|
78 |
|
79 |
with torch.no_grad():
|
80 |
+
iqa_score = model(batch).cpu().numpy()
|
81 |
+
|
82 |
+
iqa_score = np.mean(scores)
|
83 |
|
84 |
# maps the predicted score from the model's range [min_pred, max_pred]
|
85 |
# to the actual range [min_score, max_score] using min-max scaling.
|
|
|
90 |
min_score =
|
91 |
|
92 |
normalized_score = ((iqa_score - min_pred) / (max_pred - min_pred)) * (max_score - min_score) + min_score
|
93 |
+
print(f"Predicted quality Score: {normalized_score:.4f}")
|