Deevyankar commited on
Commit
14d82e5
·
1 Parent(s): d4c1135

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -132,7 +132,7 @@ if len(file_upload) == 1:
132
  model = EfficientNetBN(
133
  "efficientnet-b0", spatial_dims=3, in_channels=1, num_classes=3)
134
  model.load_state_dict(torch.load(
135
- 'MCEBNfold1.pth', map_location='cpu'))
136
  model.eval()
137
  prediction = model(test_images.unsqueeze(1))
138
  pred = prediction.argmax(dim=1).item()
@@ -161,7 +161,7 @@ if len(file_upload) == 1:
161
  with st.spinner('Please wait...verifying the model output with another model'):
162
  model_verify = monai.networks.nets.DenseNet264(spatial_dims=3, in_channels=1, out_channels=2)
163
  model_verify.load_state_dict(torch.load(
164
- 'F3DENSENET264ADvsCNbest_metric_model_classification3d_dict.pth', map_location='cpu'))
165
  model_verify.eval()
166
  prediction_verify = model_verify(test_images.unsqueeze(1))
167
  pred_verify = prediction_verify.argmax(dim=1).item()
@@ -310,7 +310,7 @@ if len(file_upload) > 1:
310
  model = EfficientNetBN(
311
  "efficientnet-b0", spatial_dims=3, in_channels=1, num_classes=3)
312
  model.load_state_dict(torch.load(
313
- 'MCEBNfold1.pth', map_location='cpu'))
314
  model.eval()
315
  prediction = model(test_images.unsqueeze(1))
316
  pred = prediction.argmax(dim=1).item()
@@ -340,7 +340,7 @@ if len(file_upload) > 1:
340
  with st.spinner('Please wait...verifying the model output with another model'):
341
  model_verify = monai.networks.nets.DenseNet264(spatial_dims=3, in_channels=1, out_channels=2)
342
  model_verify.load_state_dict(torch.load(
343
- 'F3DENSENET264ADvsCNbest_metric_model_classification3d_dict.pth', map_location='cpu'))
344
  model_verify.eval()
345
  prediction_verify = model_verify(test_images.unsqueeze(1))
346
  pred_verify = prediction_verify.argmax(dim=1).item()
 
132
  model = EfficientNetBN(
133
  "efficientnet-b0", spatial_dims=3, in_channels=1, num_classes=3)
134
  model.load_state_dict(torch.load(
135
+ 'MCEBNfold5.pth', map_location='cpu'))
136
  model.eval()
137
  prediction = model(test_images.unsqueeze(1))
138
  pred = prediction.argmax(dim=1).item()
 
161
  with st.spinner('Please wait...verifying the model output with another model'):
162
  model_verify = monai.networks.nets.DenseNet264(spatial_dims=3, in_channels=1, out_channels=2)
163
  model_verify.load_state_dict(torch.load(
164
+ 'DENSENET264ADvsCNbest_metric_model_classification3d_dict.pth', map_location='cpu'))
165
  model_verify.eval()
166
  prediction_verify = model_verify(test_images.unsqueeze(1))
167
  pred_verify = prediction_verify.argmax(dim=1).item()
 
310
  model = EfficientNetBN(
311
  "efficientnet-b0", spatial_dims=3, in_channels=1, num_classes=3)
312
  model.load_state_dict(torch.load(
313
+ 'MCEBNfold5.pth', map_location='cpu'))
314
  model.eval()
315
  prediction = model(test_images.unsqueeze(1))
316
  pred = prediction.argmax(dim=1).item()
 
340
  with st.spinner('Please wait...verifying the model output with another model'):
341
  model_verify = monai.networks.nets.DenseNet264(spatial_dims=3, in_channels=1, out_channels=2)
342
  model_verify.load_state_dict(torch.load(
343
+ 'DENSENET264ADvsCNbest_metric_model_classification3d_dict.pth', map_location='cpu'))
344
  model_verify.eval()
345
  prediction_verify = model_verify(test_images.unsqueeze(1))
346
  pred_verify = prediction_verify.argmax(dim=1).item()