Update README.md
#1
by
HYENA-WON - opened
README.md
CHANGED
|
@@ -1,17 +1,33 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
-
base_model:
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
---
|
| 6 |
# MedGemma AE Detection
|
| 7 |
|
| 8 |
-
MedGemma 1.5-4B fine-tuned for **visual adverse event detection** from clinical photographs.
|
| 9 |
|
| 10 |
-
- **Base model**: `
|
| 11 |
-
- **Method**: LoRA fine-tuning (
|
| 12 |
-
- **
|
|
|
|
|
|
|
|
|
|
| 13 |
- **AE types**: maculopapular rash, acneiform rash, periorbital edema, SJS, stomatitis, pruritus, alopecia
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
## Usage
|
| 16 |
|
| 17 |
```python
|
|
@@ -21,4 +37,7 @@ model = AutoModelForImageTextToText.from_pretrained("AlphaRaven/medgemma-ae-dete
|
|
| 21 |
processor = AutoProcessor.from_pretrained("google/medgemma-1.5-4b-it")
|
| 22 |
```
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
base_model:
|
| 4 |
+
- google/medgemma-1.5-4b-it
|
| 5 |
+
- AlphaRaven/medgemma-4b-antihallu
|
| 6 |
+
tags:
|
| 7 |
+
- medical
|
| 8 |
+
- dermatology
|
| 9 |
+
- adverse-event-detection
|
| 10 |
+
- medgemma
|
| 11 |
---
|
| 12 |
# MedGemma AE Detection
|
| 13 |
|
| 14 |
+
MedGemma 1.5-4B fine-tuned for **visual adverse event detection** from clinical photographs using paired image comparison.
|
| 15 |
|
| 16 |
+
- **Base model**: `AlphaRaven/medgemma-4b-antihallu`
|
| 17 |
+
- **Method**: LoRA fine-tuning (r=8, alpha=16, target: q_proj/v_proj)
|
| 18 |
+
- **Training**: 100 epochs
|
| 19 |
+
- **Task**:
|
| 20 |
+
- 1. Paired comparison of baseline vs. current patient photos.
|
| 21 |
+
2. Classify skin AEs from patient photos into 21 categories (normal + 7 AE types × 3 CTCAE grades; alopecia G1-G2 only)
|
| 22 |
- **AE types**: maculopapular rash, acneiform rash, periorbital edema, SJS, stomatitis, pruritus, alopecia
|
| 23 |
|
| 24 |
+
## Performance (test set, 42 paired images):
|
| 25 |
+
- Accuracy: 95.2%
|
| 26 |
+
- Weighted F1: 0.951
|
| 27 |
+
-
|
| 28 |
+
## Dataset**: Synthetic clinical photographs (Gemini-generated)
|
| 29 |
+
- 147 train / 21 val / 42 test paired images
|
| 30 |
+
|
| 31 |
## Usage
|
| 32 |
|
| 33 |
```python
|
|
|
|
| 37 |
processor = AutoProcessor.from_pretrained("google/medgemma-1.5-4b-it")
|
| 38 |
```
|
| 39 |
|
| 40 |
+
Input: Two images (baseline photo + current photo) with a clinical reasoning prompt using CTCAE grading criteria.
|
| 41 |
+
Output: JSON array of detected AEs with ae_term, grade, and reasoning.
|
| 42 |
+
|
| 43 |
+
Part of the [Clinical Trial Simulation Engine](https://github.com/AlphaRaven/ClinicalTrialEngine) pipeline.
|