Skip to content

Commit

Permalink
Fixing #37
Browse files Browse the repository at this point in the history
  • Loading branch information
iago-suarez committed Nov 1, 2023
1 parent 4a82835 commit 0d93e4c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions gluefactory/datasets/augmentations.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,13 @@ def _init(self, conf):
[
A.Blur(**kwi(blur, p=0.1, blur_limit=(3, 9), n="blur")),
A.MotionBlur(
**kwi(blur, p=0.2, blur_limit=(3, 25), n="motion_blur")
**kwi(
blur,
p=0.2,
blur_limit=(3, 25),
allow_shifted=False,
n="motion_blur",
)
),
A.ISONoise(),
A.ImageCompression(),
Expand Down Expand Up @@ -222,14 +228,14 @@ def _init(self, conf):
A.OneOf(
[
A.Blur(blur_limit=(3, 9)),
A.MotionBlur(blur_limit=(3, 25)),
A.MotionBlur(blur_limit=(3, 25), allow_shifted=False),
A.ISONoise(),
A.ImageCompression(),
],
p=0.1,
),
A.Blur(p=0.1, blur_limit=(3, 9)),
A.MotionBlur(p=0.1, blur_limit=(3, 25)),
A.MotionBlur(p=0.1, blur_limit=(3, 25), allow_shifted=False),
A.RandomBrightnessContrast(
p=0.5, brightness_limit=(-0.4, 0.0), contrast_limit=(-0.3, 0.0)
),
Expand Down
2 changes: 1 addition & 1 deletion gluefactory/datasets/homographies.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def visualize(args):
images = []
for _, data in zip(range(args.num_items), loader):
images.append(
(data[f"view{i}"]["image"][0].permute(1, 2, 0) for i in range(2))
[data[f"view{i}"]["image"][0].permute(1, 2, 0) for i in range(2)]
)
plot_image_grid(images, dpi=args.dpi)
plt.tight_layout()
Expand Down
2 changes: 1 addition & 1 deletion gluefactory/datasets/hpatches.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def visualize(args):
images = []
for _, data in zip(range(args.num_items), loader):
images.append(
(data[f"view{i}"]["image"][0].permute(1, 2, 0) for i in range(2))
[data[f"view{i}"]["image"][0].permute(1, 2, 0) for i in range(2)]
)
plot_image_grid(images, dpi=args.dpi)
plt.tight_layout()
Expand Down

0 comments on commit 0d93e4c

Please sign in to comment.