Skip to content

Commit

Permalink
Add: fix image transform to float
Browse files Browse the repository at this point in the history
Signed-off-by: Bepitic <[email protected]>
  • Loading branch information
Bepitic committed Mar 24, 2024
1 parent a07d47e commit dabd0ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/anomalib/data/base/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def __getitem__(self, index: int) -> dict[str, str | torch.Tensor]:
msg = "self.indexer must be an instance of ClipsIndexer."
raise TypeError(msg)
item = self.indexer.get_item(index)
item["image"] = item["image"].to(torch.float32)
# include the untransformed image for visualization
item["original_image"] = item["image"].to(torch.uint8)

Expand Down

0 comments on commit dabd0ff

Please sign in to comment.