Update README.md
Browse files
README.md
CHANGED
@@ -77,17 +77,17 @@ def IQA_preprocess():
|
|
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 |
-
|
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.
|
86 |
|
87 |
-
min_pred =
|
88 |
-
max_pred =
|
89 |
-
max_score =
|
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}")
|
|
|
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 |
+
scores = 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.
|
86 |
|
87 |
+
min_pred = -6.52
|
88 |
+
max_pred = 3.11
|
89 |
+
max_score = 4.32
|
90 |
+
min_score = 1
|
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}")
|