Skip to content

Commit

Permalink
Refactor image name handling in SegmentationDOFA test step
Browse files Browse the repository at this point in the history
  • Loading branch information
valhassan committed Nov 27, 2024
1 parent 278e76c commit b7dd152
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions geo_deep_learning/tasks_with_models/segmentation_dofa.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def validation_step(self, batch, batch_idx):

def test_step(self, batch, batch_idx):
x = batch["image"]
image_names = batch["image_name"]
y = batch["mask"]
y = y.squeeze(1).long()
y_hat = self(x)
Expand All @@ -101,7 +100,7 @@ def test_step(self, batch, batch_idx):
num_samples = min(remaining_samples, len(x))
for i in range(num_samples):
image = x[i]
image_name = image_names[i]
image_name = batch["image_name"][i]
image = denormalization(image, mean=self.mean, std=self.std, data_type_max=self.data_type_max)
fig = visualize_prediction(image,
y[i],
Expand Down

0 comments on commit b7dd152

Please sign in to comment.