We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
**lines: 41-69**
Should this section not account for when mask does not exist?
see code change suggestion in docstring at end
The text was updated successfully, but these errors were encountered:
@Alexandra-Smith I see you already discovered this during inference --> can you check if you happy with my suggested code replace from line 41
As in script under Ask Alex:
image = np.load(self.imgs[idx]) image = torch.from_numpy(image) # 4, 240, 240, 155 if self.mode == "labels": mask = np.load(self.lbls[idx]) mask = torch.from_numpy(mask) # 240, 240, 155 if self.transform is not None: if self.mode == "labels": subject = tio.Subject( image=tio.ScalarImage(tensor=image), mask=tio.LabelMap(tensor=mask) ) tranformed_subject = self.transform(subject) if self.SSA == False and self.SSAtransform is not None: tranformed_subject = self.SSAtransform(tranformed_subject) print("Tranformed_subject: ", tranformed_subject) image = tranformed_subject["image"].data mask = tranformed_subject["mask"].data return image, mask, self.imgs[idx] else: subject = tio.Subject( image=tio.ScalarImage(tensor=image), ) tranformed_subject = self.transform(subject) print("Tranformed_subject: ", tranformed_subject) image = tranformed_subject["image"].data return image, self.imgs[idx]
Sorry, something went wrong.
Alexandra-Smith
No branches or pull requests
UNN_BraTS23/scripts/data_class.py
Should this section not account for when mask does not exist?
see code change suggestion in docstring at end
The text was updated successfully, but these errors were encountered: