Spaces:
Sleeping
Sleeping
added dropout
Browse files- .gitattributes +2 -0
- PCAM-pipeline.ipynb +0 -0
- README.md +1 -1
- app.py +2 -2
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
results/pcam/19_06_2025_17_32_18/model_3.pt filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
results/pcam/ filter=lfs diff=lfs merge=lfs -text
|
PCAM-pipeline.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
README.md
CHANGED
|
@@ -43,7 +43,7 @@ This study explores the application of DenseNet architectures to the PCam datase
|
|
| 43 |
|
| 44 |
The submission on kaggle with the model trained on this notebook is
|
| 45 |
|
| 46 |
-
```Public score: 0.
|
| 47 |
|
| 48 |
## ⚡ Try it now ! With gradio ⚡
|
| 49 |
|
|
|
|
| 43 |
|
| 44 |
The submission on kaggle with the model trained on this notebook is
|
| 45 |
|
| 46 |
+
```Public score: 0.9626```
|
| 47 |
|
| 48 |
## ⚡ Try it now ! With gradio ⚡
|
| 49 |
|
app.py
CHANGED
|
@@ -11,7 +11,7 @@ from PIL import Image
|
|
| 11 |
# ---------------------------------
|
| 12 |
torch.manual_seed(42)
|
| 13 |
torch.cuda.manual_seed_all(42)
|
| 14 |
-
model = torch.load("results/pcam/
|
| 15 |
model.eval()
|
| 16 |
|
| 17 |
# ---------------------------------
|
|
@@ -46,7 +46,7 @@ def get_sample(index: int):
|
|
| 46 |
with torch.no_grad():
|
| 47 |
output = model(image_tensor.unsqueeze(0)).squeeze()
|
| 48 |
probability = torch.sigmoid(output)
|
| 49 |
-
predicted_label = "Tumor" if probability >= 0.
|
| 50 |
true_label = "Tumor" if ground_truth == 1 else "No Tumor"
|
| 51 |
error_label = ""
|
| 52 |
if predicted_label != true_label:
|
|
|
|
| 11 |
# ---------------------------------
|
| 12 |
torch.manual_seed(42)
|
| 13 |
torch.cuda.manual_seed_all(42)
|
| 14 |
+
model = torch.load("results/pcam/19_06_2025_17_32_18/model_3.pt", map_location="cpu", weights_only=False)
|
| 15 |
model.eval()
|
| 16 |
|
| 17 |
# ---------------------------------
|
|
|
|
| 46 |
with torch.no_grad():
|
| 47 |
output = model(image_tensor.unsqueeze(0)).squeeze()
|
| 48 |
probability = torch.sigmoid(output)
|
| 49 |
+
predicted_label = "Tumor" if probability >= 0.4096705 else "No Tumor"
|
| 50 |
true_label = "Tumor" if ground_truth == 1 else "No Tumor"
|
| 51 |
error_label = ""
|
| 52 |
if predicted_label != true_label:
|