Hannes Kuchelmeister
commited on
Commit
·
1a31ea8
1
Parent(s):
d5c44c3
fix mdct (add square)
Browse files
src/models/focus_traditional.py
CHANGED
@@ -37,7 +37,7 @@ def midfrequency_dct(img):
|
|
37 |
)
|
38 |
|
39 |
img_grey = torch.mean(img, dim=0).unsqueeze(0)
|
40 |
-
filtered = kornia.filters.filter2d(img_grey, kernel)
|
41 |
sum = torch.sum(filtered)
|
42 |
return 100 / sum
|
43 |
|
|
|
37 |
)
|
38 |
|
39 |
img_grey = torch.mean(img, dim=0).unsqueeze(0)
|
40 |
+
filtered = torch.square(kornia.filters.filter2d(img_grey, kernel))
|
41 |
sum = torch.sum(filtered)
|
42 |
return 100 / sum
|
43 |
|