--- license: mit base_model: - Ultralytics/YOLO11 pipeline_tag: object-detection tags: - biology - nft - neurofibrillary tangle --- # Model Card for Model ID A Yolo 11 Object detector for [Neurofibrillary tangles](https://en.wikipedia.org/wiki/Neurofibrillary_tangle). Model is trained from Dataset provided by Vizcarra et al. **Citation:** 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. **DOI:** [10.1186/s40478-023-01691-x](https://doi.org/10.1186/s40478-023-01691-x) **PubMed ID (PMID):** [38110981](https://pubmed.ncbi.nlm.nih.gov/38110981/) **PubMed Central ID (PMCID):** [PMC10726581](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10726581/) ## Model Details * This Model was trained on immunohistochemically stained slides of brain matter at a resolution of **0.25 microns per pixels**. * Slides are tiled into 1280x1280 segments before being fed to the detector. * Out of band testing appears to produce good results at **.5049 microns per pixel** ## Example Ouput ![image/png](/static-proxy?url=https%3A%2F%2Fcdn-uploads.huggingface.co%2Fproduction%2Fuploads%2F6668c6eac79894103f8026d5%2FC4N4Q8IReeAclJg60UgeA.png) ### Usage #### Generating Tiles 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/): ```py tile_width=1280 tile_height=1280 svsfile = "myslide.svs" slide = openslide.OpenSlide(svsfile) slide_width, slide_height = slide.level_dimensions[level] for y in range(0, slide_height, tile_height): for x in range(0, slide_width, tile_width): region = slide.read_region((x, y), level, (tile_width, tile_height)).convert("RGB") filename = f"segments/segment_{x}_{y}.png" region.save(filename) ``` #### With The Yolo Command Line ```sh # pip install ultralytics yolo predict model=.\yolo11n-nft-detector.pt source=some_tile.png ``` #### With The Yolo API ```py from ultralytics import YOLO model_path = "yolo11n-nft-detector.pt" image_path = "some_tile.png" model = YOLO(model) res = model(image_path) ``` ## Training Results 🎯 Final Model Performance Summary Overall Metrics: * mAP50: 80.8% * mAP50-95: 62.3% * Precision: 72.8% - * Recall: 74.4% - * Class Performance: * Pretangle (Type 0): 71.8% mAP50, 66.3% recall * Tangle (Type 1): 89.7% mAP50, 82.4% recall * Speed: 1.2ms inference - 4080 Super