Swekerr commited on
Commit
d74135d
1 Parent(s): c1e0a70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -48,11 +48,13 @@ model = SqueezeNet(out_channels=1)
48
  model.load_state_dict(torch.load("squeezenet.pth", map_location=torch.device('cpu')))
49
  model.eval()
50
 
51
- transform = transforms.Compose([
52
- transforms.Resize((128, 128)),
53
- transforms.ToTensor(),
54
- transforms.Normalize([0.5], [0.5])
55
- ])
 
 
56
 
57
  def classify_brain_tumor(image):
58
  image = transform(image).unsqueeze(0)
 
48
  model.load_state_dict(torch.load("squeezenet.pth", map_location=torch.device('cpu')))
49
  model.eval()
50
 
51
+ transform = transforms.Compose([transforms.Resize((224,224)),
52
+ transforms.RandomHorizontalFlip(0.2),
53
+ transforms.RandomVerticalFlip(0.1),
54
+ transforms.RandomAutocontrast(0.2),
55
+ transforms.RandomAdjustSharpness(0.3),
56
+ transforms.ToTensor()
57
+ ])
58
 
59
  def classify_brain_tumor(image):
60
  image = transform(image).unsqueeze(0)