Views
No views yet
| Metric | Score |
|---|---|
| Accuracy | 91.83% |
| ROC-AUC | 96.50% |
| Recall (Pneumonia) | 98.21% |
| F1-Score | 93.76% |
1import torch
2from torchvision.models import resnet50
3
4CLASS_NAMES = ['NORMAL', 'PNEUMONIA']
5
6model = resnet50()
7model.fc = torch.nn.Sequential(
8 torch.nn.Dropout(0.4),
9 torch.nn.Linear(2048, 2)
10)
11model.load_state_dict(
12 torch.load("best_ResNet-50_.pth", map_location="cpu")
13)
14model.eval()