simplified code a bit

This commit is contained in:
Lincoln Stein 2023-01-26 09:46:34 -05:00
parent 288e31fc60
commit a49d546125

View File

@ -108,8 +108,7 @@ class Txt2Mask(object):
padding=True,
return_tensors='pt')
outputs = self.model(**inputs)
preds = outputs.logits
heatmap = torch.sigmoid(preds)
heatmap = torch.sigmoid(outputs.logits)
return SegmentedGrayscale(image, heatmap)
def _scale_and_crop(self, image:Image)->Image: