File size: 1,924 Bytes
364fdf2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
931afb7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d63f918
 
931afb7
 
d63f918
931afb7
 
364fdf2
931afb7
 
364fdf2
931afb7
 
364fdf2
931afb7
 
364fdf2
931afb7
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
language: en
license: mit
tags:
  - deep-learning
  - cancer-detection
  - histopathology
  - tensorflow
  - efficientnet
  - vision-transformer
  - ViT
  - medical-imaging
model_name: EfficientNetV2S & ViT-Hybrid for Histopathologic Cancer Detection
library_name: tensorflow
datasets:
  - histopathologic-cancer-detection
  - PatchCamelyon
---


# Histopathologic Cancer Detection - EfficientNetV2S & ViT-Hybrid
This repository contains models for detecting metastatic cancer in histopathologic images.
- **EfficientNetV2S**: A Baseline CNN-based model for local feature extraction.
- **ViT-Hybrid**: A Transformer-based model that learns global dependencies.
Both models were trained on the [Histopathologic Cancer Detection Kaggle dataset](https://www.kaggle.com/competitions/histopathologic-cancer-detection/data)

## Model Performance
- **EfficientNetV2S**
  - Accuracy: 93.59% (Private), 93.74% (Public)
  - AUC: 0.9774
- **ViT-Hybrid**
  - Accuracy: 95.07% (Private), 94.87% (Public)
  - AUC: 0.9791
- **ViT-Hybrid + TTA (Test-Time Augmentation)**
  - Accuracy: 96.50% (Private), 96.75% (Public)

## Model Use

```sh
from huggingface_hub import hf_hub_download
from tensorflow.keras.models import load_model
```

# Download EfficientNetV2S model
```sh
model_path = hf_hub_download(repo_id="MooseML/EfficientNet-Cancer-Detection", filename="efficientnet_cancer_model.h5")
model = load_model(model_path)
```

# Download ViT-Hybrid model
```sh
model_path_vit = hf_hub_download(repo_id="MooseML/EfficientNet-Cancer-Detection", filename="ViT_hybrid_cancer_model.h5")
model_vit = load_model(model_path_vit)
```

## Github and Kaggle Links for Full Training Pipeline
- Full Training Code: [GitHub Repository](https://github.com/MooseML/Histopathologic-Cancer-Detection)
- Kaggle Competition: [Histopathologic Cancer Detection](https://www.kaggle.com/competitions/histopathologic-cancer-detection)


---
license: mit
---