Hannes Kuchelmeister
commited on
Commit
·
d8d5dd8
1
Parent(s):
a2ca8ad
fix vol4 function
Browse files
notebooks/5.0-hfk-comparing-to-traditional.ipynb
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a72d81240eb43d09e8fb55c2c58331e083050f35d99a150044cd4296953f4c30
|
3 |
+
size 26285
|
src/models/focus_traditional.py
CHANGED
@@ -12,7 +12,7 @@ import kornia
|
|
12 |
|
13 |
def vol4(img):
|
14 |
img_grey = torch.mean(img, dim=0)
|
15 |
-
return torch.sum(torch.mul(img_grey[:-1, :], img_grey[1:, :])) - torch.sum(
|
16 |
torch.mul(img_grey[:-2, :], img_grey[2:, :])
|
17 |
)
|
18 |
|
|
|
12 |
|
13 |
def vol4(img):
|
14 |
img_grey = torch.mean(img, dim=0)
|
15 |
+
return 100 / torch.sum(torch.mul(img_grey[:-1, :], img_grey[1:, :])) - torch.sum(
|
16 |
torch.mul(img_grey[:-2, :], img_grey[2:, :])
|
17 |
)
|
18 |
|