Views
No views yet
| Class | Precision | Recall | F1-Score |
|---|---|---|---|
| Cyst | High | High | High |
| Normal | High | High | High |
| Stone | Good | Good | Good |
| Tumor | Good | Good | Good |
pip install torch torchvision pillow1import torch
2from PIL import Image
3from torchvision import transforms
4
5# Load model
6model = torch.load('model.pth')
7model.eval()
8
9# Prepare image
10transform = transforms.Compose([
11 transforms.Resize((384, 384)),
12 transforms.ToTensor(),
13 transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
14])
15
16# Predict
17image = Image.open('kidney_ct.jpg').convert('RGB')
18image_tensor = transform(image).unsqueeze(0)
19
20with torch.no_grad():
21 output = model(image_tensor)
22 probs = torch.softmax(output, dim=1)
23 pred = output.argmax(1).item()
24
25classes = ['Cyst', 'Normal', 'Stone', 'Tumor']
26print(f"Prediction: {classes[pred]} ({probs[0][pred].item()*100:.1f}% confidence)")1@misc{kidneyctclassifierefficientnet,
2author = {Arko007},
3title = {Kidney Ct Classifier Efficientnet},
4year = {2025},
5publisher = {Hugging Face},
6howpublished = {\url{[https://huggingface.co/](https://huggingface.co/)Arko007/Kidney Ct Classifier Efficientnet}}
7}