eloise54 commited on
Commit
efc960f
·
1 Parent(s): 11cdd60

added dropout

Browse files
Files changed (4) hide show
  1. .gitattributes +2 -0
  2. PCAM-pipeline.ipynb +0 -0
  3. README.md +1 -1
  4. 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.9611```
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/17_06_2025_12_19_40/model_5.pt", map_location="cpu", weights_only=False)
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.45 else "No Tumor"
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: