Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,83 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model:
|
| 4 |
+
- Ultralytics/YOLO11
|
| 5 |
+
pipeline_tag: object-detection
|
| 6 |
+
tags:
|
| 7 |
+
- biology
|
| 8 |
+
- nft
|
| 9 |
+
- neurofibrillary tangle
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for Model ID
|
| 13 |
+
A Yolo 11 Object detector for [Neurofibrillary tangles](https://en.wikipedia.org/wiki/Neurofibrillary_tangle).
|
| 14 |
+
|
| 15 |
+
Model is trained from Dataset provided by Vizcarra et al.
|
| 16 |
+
**Citation:**
|
| 17 |
+
|
| 18 |
+
Vizcarra JC, Pearce TM, Dugger BN, Keiser MJ, Gearing M, Crary JF, Kiely EJ, Morris M, White B, Glass JD, Farrell K, Gutman DA. Toward a generalizable machine learning workflow for neurodegenerative disease staging with focus on neurofibrillary tangles. *Acta Neuropathol Commun*. 2023 Dec 18;11(1):202.
|
| 19 |
+
|
| 20 |
+
**DOI:** [10.1186/s40478-023-01691-x](https://doi.org/10.1186/s40478-023-01691-x)
|
| 21 |
+
**PubMed ID (PMID):** [38110981](https://pubmed.ncbi.nlm.nih.gov/38110981/)
|
| 22 |
+
**PubMed Central ID (PMCID):** [PMC10726581](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10726581/)
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
## Model Details
|
| 26 |
+
* This Model was trained on immunohistochemically stained slides of brain matter at a resolution of **0.25 microns per pixels**.
|
| 27 |
+
* Slides are tiled into 1280x1280 segments before being fed to the detector.
|
| 28 |
+
* Out of band testing appears to produce good results at **.5049 microns per pixel**
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
## Example Ouput
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
### Usage
|
| 37 |
+
|
| 38 |
+
#### Generating Tiles
|
| 39 |
+
This model expects 1280x1280 sized images. If you are working with a whole slide like an .svs file you can generate tiles using [openslide](https://openslide.org/api/python/):
|
| 40 |
+
|
| 41 |
+
```py
|
| 42 |
+
tile_width=1280
|
| 43 |
+
tile_height=1280
|
| 44 |
+
svsfile = "myslide.svs"
|
| 45 |
+
|
| 46 |
+
slide = openslide.OpenSlide(svsfile)
|
| 47 |
+
slide_width, slide_height = slide.level_dimensions[level]
|
| 48 |
+
for y in range(0, slide_height, tile_height):
|
| 49 |
+
for x in range(0, slide_width, tile_width):
|
| 50 |
+
region = slide.read_region((x, y), level, (tile_width, tile_height)).convert("RGB")
|
| 51 |
+
filename = f"segments/segment_{x}_{y}.png"
|
| 52 |
+
region.save(filename)
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
#### With The Yolo Command Line
|
| 56 |
+
```sh
|
| 57 |
+
# pip install ultralytics
|
| 58 |
+
yolo predict model=.\yolo11n-nft-detector.pt source=some_tile.png
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
#### With The Yolo API
|
| 62 |
+
```py
|
| 63 |
+
from ultralytics import YOLO
|
| 64 |
+
|
| 65 |
+
model_path = "yolo11n-nft-detector.pt"
|
| 66 |
+
image_path = "some_tile.png"
|
| 67 |
+
model = YOLO(model)
|
| 68 |
+
res = model(image_path)
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
## Training Results
|
| 72 |
+
🎯 Final Model Performance Summary
|
| 73 |
+
Overall Metrics:
|
| 74 |
+
|
| 75 |
+
* mAP50: 80.8%
|
| 76 |
+
* mAP50-95: 62.3%
|
| 77 |
+
* Precision: 72.8% -
|
| 78 |
+
* Recall: 74.4% -
|
| 79 |
+
* Class Performance:
|
| 80 |
+
|
| 81 |
+
* Pretangle (Type 0): 71.8% mAP50, 66.3% recall
|
| 82 |
+
* Tangle (Type 1): 89.7% mAP50, 82.4% recall
|
| 83 |
+
* Speed: 1.2ms inference - 4080 Super
|