Skip to content

Commit

Permalink
Fix topdown aug
Browse files Browse the repository at this point in the history
  • Loading branch information
gitttt-1234 committed Aug 19, 2024
1 parent 8704e22 commit d8f49a8
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions sleap_nn/data/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,21 @@ def make_training_pipeline(
provider=provider,
)

if use_augmentations and "intensity" in self.data_config.augmentation_config:
datapipe = KorniaAugmenter(
datapipe,
**dict(self.data_config.augmentation_config.intensity),
image_key="image",
instance_key="instances",
)
if use_augmentations:
if "intensity" in self.data_config.augmentation_config:
datapipe = KorniaAugmenter(
datapipe,
**dict(self.data_config.augmentation_config.intensity),
image_key="image",
instance_key="instances",
)
if "geometric" in self.data_config.augmentation_config:
datapipe = KorniaAugmenter(
datapipe,
**dict(self.data_config.augmentation_config.geometric),
image_key="image",
instance_key="instances",
)

datapipe = InstanceCentroidFinder(
datapipe, anchor_ind=self.confmap_head.anchor_part
Expand All @@ -83,14 +91,6 @@ def make_training_pipeline(
self.data_config.preprocessing.crop_hw,
)

if use_augmentations and "geometric" in self.data_config.augmentation_config:
datapipe = KorniaAugmenter(
datapipe,
**dict(self.data_config.augmentation_config.geometric),
image_key="instance_image",
instance_key="instance",
)

datapipe = Resizer(
datapipe,
scale=self.data_config.preprocessing.scale,
Expand Down

0 comments on commit d8f49a8

Please sign in to comment.