Skip to content
Snippets Groups Projects
Commit 6d142c3b authored by Anjith GEORGE's avatar Anjith GEORGE
Browse files

Changed default transform and fixes

parent 95a6b40b
No related branches found
No related tags found
1 merge request!30Mc deep pixbis
Pipeline #28698 passed
......@@ -25,7 +25,7 @@ class MCDeepPixBiSExtractor(Extractor):
"""
def __init__(self, transforms = transforms.Compose([transforms.ToTensor(),transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])]), model_file=None, num_channels=8, scoring_method='pixel_mean'):
def __init__(self, transforms = transforms.Compose([transforms.ToTensor(),transforms.Normalize(mean=[0.5], std=[0.225])]), model_file=None, num_channels=8, scoring_method='pixel_mean'):
""" Init method
......@@ -91,7 +91,7 @@ class MCDeepPixBiSExtractor(Extractor):
"""
input_image = np.rollaxis(np.rollaxis(image, 2),2) # changes to 128x128xnum_channels
input_image = np.rollaxis(np.rollaxis(image, 2),2) # changes to 224x224xnum_channels
input_image = self.transforms(input_image)
input_image = input_image.unsqueeze(0)
......@@ -110,4 +110,4 @@ class MCDeepPixBiSExtractor(Extractor):
# output is a scalar score
return score
\ No newline at end of file
return np.reshape(score,(1,-1))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment