Skip to content

Commit

Permalink
update ct
Browse files Browse the repository at this point in the history
  • Loading branch information
nnaakkaaii committed Jul 12, 2024
1 parent a050aad commit 472a4e6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion hrdae/conf
6 changes: 4 additions & 2 deletions hrdae/dataloaders/datasets/ct.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ def __init__(
if in_memory:
for path in tqdm(self.paths, desc="loading datasets..."):
t = from_numpy(np.load(path)["arr_0"])
if transform is not None:
t = transform(t)
self.data.append(t)

self.slice_indexer = slice_indexer
Expand All @@ -117,8 +119,8 @@ def __getitem__(self, index: int) -> dict[str, Tensor]:
else: # not in memory
assert not self.in_memory
x_3d = from_numpy(np.load(str(self.paths[index]))["arr_0"])
if self.transform is not None:
x_3d = self.transform(x_3d)
if self.transform is not None:
x_3d = self.transform(x_3d)

x_3d = x_3d.float()
n, d, h, w = x_3d.size()
Expand Down

0 comments on commit 472a4e6

Please sign in to comment.