Image Classification
timm
English
medical-imaging
knee-mri
acl-tear-detection
deep-learning
convnext
self-attention
masked-slice-modeling
radiology
orthopedics
Eval Results (legacy)
Instructions to use shareefch1413/ACL-LKNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use shareefch1413/ACL-LKNet with timm:
import timm model = timm.create_model("hf_hub:shareefch1413/ACL-LKNet", pretrained=True) - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: mit
|
| 5 |
+
library_name: timm
|
| 6 |
+
pipeline_tag: image-classification
|
| 7 |
+
tags:
|
| 8 |
+
- medical-imaging
|
| 9 |
+
- knee-mri
|
| 10 |
+
- acl-tear-detection
|
| 11 |
+
- deep-learning
|
| 12 |
+
- convnext
|
| 13 |
+
- self-attention
|
| 14 |
+
- masked-slice-modeling
|
| 15 |
+
- radiology
|
| 16 |
+
- orthopedics
|
| 17 |
+
datasets:
|
| 18 |
+
- stanford-mrnet
|
| 19 |
+
metrics:
|
| 20 |
+
- roc_auc
|
| 21 |
+
- accuracy
|
| 22 |
+
- f1
|
| 23 |
+
model-index:
|
| 24 |
+
- name: ACL-LKNet
|
| 25 |
+
results:
|
| 26 |
+
- task:
|
| 27 |
+
type: image-classification
|
| 28 |
+
name: Knee MRI ACL Tear Detection
|
| 29 |
+
dataset:
|
| 30 |
+
type: stanford-mrnet
|
| 31 |
+
name: Stanford MRNet Locked Test Cohort (N=120)
|
| 32 |
+
metrics:
|
| 33 |
+
- type: roc_auc
|
| 34 |
+
value: 0.9639
|
| 35 |
+
name: AUROC
|
| 36 |
+
- type: precision_recall_auc
|
| 37 |
+
value: 0.9293
|
| 38 |
+
name: AUPRC
|
| 39 |
+
- type: accuracy
|
| 40 |
+
value: 0.8167
|
| 41 |
+
name: Accuracy
|
| 42 |
+
- type: specificity
|
| 43 |
+
value: 0.9394
|
| 44 |
+
name: Specificity
|
| 45 |
+
- type: sensitivity
|
| 46 |
+
value: 0.6667
|
| 47 |
+
name: Sensitivity
|
| 48 |
+
- type: f1
|
| 49 |
+
value: 0.7660
|
| 50 |
+
name: F1 Score
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
# ACL-LKNet: Self-Supervised Large-Kernel Network for ACL Tear Detection in Knee MRI
|
| 54 |
+
|
| 55 |
+
[](https://github.com)
|
| 56 |
+
[](https://opensource.org/licenses/MIT)
|
| 57 |
+
[](https://github.com)
|
| 58 |
+
[](https://github.com)
|
| 59 |
+
|
| 60 |
+
**ACL-LKNet** is an anatomically grounded deep learning architecture specifically engineered for automated Anterior Cruciate Ligament (ACL) tear detection from tri-planar (Sagittal, Coronal, and Axial) volumetric knee MRI examinations.
|
| 61 |
+
|
| 62 |
+
Developed as part of a doctoral investigation in computational musculoskeletal radiology, ACL-LKNet combines:
|
| 63 |
+
1. **Large-Kernel 2D Backbone (ConvNeXt-Tiny)**: Large $7 \times 7$ depthwise convolutions capturing the complete oblique trajectory of intra-articular ligaments.
|
| 64 |
+
2. **Masked Slice Modeling (MSM)**: Volumetric self-supervised pretext reconstruction across anisotropic slice stacks.
|
| 65 |
+
3. **Parametric Slice Attention**: Dynamic slice sequence pooling that outputs explicit, interpretable slice attention weights $\alpha_{p,s}$.
|
| 66 |
+
4. **Tri-Planar Cross-Attention Fusion**: 2-head self-attention operating over learned plane positional embeddings ($e_{\text{sag}}, e_{\text{cor}}, e_{\text{axi}}$).
|
| 67 |
+
5. **Strict Anatomical Invariants**: No horizontal/vertical flipping during training to preserve internal knee joint chirality and oblique ACL orientation.
|
| 68 |
+
|
| 69 |
+
---
|
| 70 |
+
|
| 71 |
+
## Benchmark Performance on Stanford MRNet
|
| 72 |
+
|
| 73 |
+
Evaluated on the locked, official **Stanford MRNet benchmark test set** ($N=120$ examinations, 54 tears, 66 controls) with empirical 95% bootstrap confidence intervals ($N=1{,}000$ iterations):
|
| 74 |
+
|
| 75 |
+
| Diagnostic Metric | ACL-LKNet (5-Fold Ensemble) | 95% Bootstrap CI | Stanford MRNet Baseline (Bien et al., 2018) | Absolute $\Delta$ Gain |
|
| 76 |
+
| :--- | :---: | :---: | :---: | :---: |
|
| 77 |
+
| **AUROC** | **0.9639** | **[0.9277, 0.9919]** | 0.9370 | **+0.0269** |
|
| 78 |
+
| **AUPRC** | **0.9293** | **[0.8492, 0.9889]** | -- | -- |
|
| 79 |
+
| **Accuracy** | **81.67%** | **[75.00%, 88.33%]** | 82.50% | $-0.0083$ |
|
| 80 |
+
| **Specificity** | **93.94%** | **[87.69%, 98.59%]** | 96.80% | $-0.0286$ |
|
| 81 |
+
| **Sensitivity** | **66.67%** | **[53.22%, 79.25%]** | 75.90% | $-0.0923$ |
|
| 82 |
+
| **F1-Score** | **0.7660** | **[0.6585, 0.8519]** | -- | -- |
|
| 83 |
+
| **Brier Score** | **0.1184** | **[0.0891, 0.1520]** | -- | Well-Calibrated |
|
| 84 |
+
|
| 85 |
+
> **Statistical Significance (RQ1)**: Paired DeLong test comparing ConvNeXt-Tiny against ResNet-18 yields **$z = 3.864, p = 0.000104$** ($p < 0.001$), establishing the statistical superiority of large receptive fields for elongated ligament structures.
|
| 86 |
+
|
| 87 |
+
---
|
| 88 |
+
|
| 89 |
+
## Quickstart: Python Inference via Hugging Face Hub
|
| 90 |
+
|
| 91 |
+
```python
|
| 92 |
+
import torch
|
| 93 |
+
from huggingface_hub import hf_hub_download
|
| 94 |
+
|
| 95 |
+
# 1. Download model weights from Hugging Face Hub
|
| 96 |
+
checkpoint_path = hf_hub_download(
|
| 97 |
+
repo_id="your-username/ACL-LKNet",
|
| 98 |
+
filename="acl_lknet_fold1_best.pt"
|
| 99 |
+
)
|
| 100 |
+
|
| 101 |
+
# 2. Instantiate model architecture
|
| 102 |
+
from src.config import Config
|
| 103 |
+
from src.models.acl_lknet import create_model_from_config
|
| 104 |
+
|
| 105 |
+
config = Config(backbone_name="convnext_tiny")
|
| 106 |
+
model = create_model_from_config(config)
|
| 107 |
+
|
| 108 |
+
state_dict = torch.load(checkpoint_path, map_location="cpu")
|
| 109 |
+
model.load_state_dict(state_dict["ema_state_dict"] if "ema_state_dict" in state_dict else state_dict["model_state_dict"])
|
| 110 |
+
model.eval()
|
| 111 |
+
|
| 112 |
+
# 3. Predict on tri-planar MRI volume (Sagittal, Coronal, Axial)
|
| 113 |
+
# Each volume tensor is shape: (1, 24, 3, 224, 224)
|
| 114 |
+
dummy_exam = {
|
| 115 |
+
"sagittal": torch.randn(1, 24, 3, 224, 224),
|
| 116 |
+
"coronal": torch.randn(1, 24, 3, 224, 224),
|
| 117 |
+
"axial": torch.randn(1, 24, 3, 224, 224)
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
with torch.no_grad():
|
| 121 |
+
output = model(dummy_exam)
|
| 122 |
+
tear_probability = torch.sigmoid(output["logits"]).item()
|
| 123 |
+
|
| 124 |
+
print(f"Predicted ACL Tear Probability: {tear_probability * 100:.2f}%")
|
| 125 |
+
```
|
| 126 |
+
|
| 127 |
+
---
|
| 128 |
+
|
| 129 |
+
## Clinical Interpretability: Grad-CAM++ and Slice Attention
|
| 130 |
+
|
| 131 |
+
* **Parametric Slice Attention Profiles**: Learns autonomous focus on central intercondylar notch slices (11--15/24) where the ACL is anatomically situated without requiring slice-level bounding box supervision.
|
| 132 |
+
* **High-Resolution Grad-CAM++**: Hooks into ConvNeXt-Tiny Stage 2 ($14 \times 14$ feature map) to generate intra-articular gradient heatmaps localized to the femoral footprint and midsubstance tear site.
|
| 133 |
+
* **Decision Curve Analysis (DCA)**: Demonstrates superior clinical net benefit over "treat all" and "treat none" policies across all relevant surgical intervention thresholds ($p_t \in [0.10, 0.75]$).
|
| 134 |
+
|
| 135 |
+
---
|
| 136 |
+
|
| 137 |
+
## Citation
|
| 138 |
+
|
| 139 |
+
```bibtex
|
| 140 |
+
@article{acl_lknet2026,
|
| 141 |
+
title={ACL-LKNet: Anatomically Constrained Large-Kernel Network with Multi-Plane Self-Attention for Volumetric ACL Tear Detection in Knee MRI},
|
| 142 |
+
author={PhD Candidate in Biomedical Engineering and Computational Medicine},
|
| 143 |
+
journal={IEEE Transactions on Medical Imaging (Preprint / PhD Dissertation Protocol)},
|
| 144 |
+
year={2026}
|
| 145 |
+
}
|
| 146 |
+
```
|