Skip to content

Commit

Permalink
Merge pull request #216 from InnopolisUni/examples_fix
Browse files Browse the repository at this point in the history
Fix axes order in tiff_dataset.SegmentationDataset samples
  • Loading branch information
InnopolisUni authored Jan 11, 2024
2 parents 088167f + 6cd28a7 commit f47a729
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions innofw/core/datasets/semantic_segmentation/tiff_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ def __getitem__(self, index) -> dict:
# out = self.transform(image=image, mask=mask)
# image, mask = out["image"], out["mask"]
image, mask = self.transform(image, mask)

try:
image = np.moveaxis(image, 2, 0) # todo: refactor
except:
pass
else:
try:
image = np.moveaxis(image, 2, 0)
except:
pass
try:
image = image.astype(np.float32) # todo: refactor
except:
Expand Down

0 comments on commit f47a729

Please sign in to comment.