Improve model card: Add pipeline tag, library name, paper link, and fix sample usage
Browse filesThis PR enhances the model card for StainNet by:
- Adding `pipeline_tag: image-feature-extraction` to the metadata, improving discoverability on the Hugging Face Hub under the relevant task.
- Adding `library_name: timm` to the metadata, as evidenced by the sample usage, which will enable the automated "how to use" widget for `timm` models.
- Including a direct link to the paper, [StainNet: A Special Staining Self-Supervised Vision Transformer for Computational Pathology](https://huggingface.co/papers/2512.10326), in the main content for easier access.
- Correcting the sample usage code snippet by adding `import torchvision.transforms as transforms`, which is necessary for the provided `transforms.Compose` to function correctly.
README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
| 1 |
---
|
| 2 |
-
license: cc-by-nc-nd-4.0
|
| 3 |
language:
|
| 4 |
- en
|
|
|
|
|
|
|
|
|
|
| 5 |
---
|
|
|
|
| 6 |
# Model Card for StainNet
|
| 7 |
|
| 8 |
<!-- Provide a quick summary of what the model is/does. -->
|
|
@@ -11,11 +14,14 @@ language:
|
|
| 11 |
|
| 12 |
The model is a Vision Transformer Small/16 with DINO [1] self-supervised pre-training on 1,418,938 patch images from 20,231 special staining whole slide images (WSIs) in HISTAI [2].
|
| 13 |
|
|
|
|
|
|
|
| 14 |
## Using StainNet to extract features from special staining pathology image
|
| 15 |
|
| 16 |
```python
|
| 17 |
import timm
|
| 18 |
import torch
|
|
|
|
| 19 |
|
| 20 |
model = timm.create_model('hf_hub:JWonderLand/StainNet', pretrained=True)
|
| 21 |
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
+
license: cc-by-nc-nd-4.0
|
| 5 |
+
pipeline_tag: image-feature-extraction
|
| 6 |
+
library_name: timm
|
| 7 |
---
|
| 8 |
+
|
| 9 |
# Model Card for StainNet
|
| 10 |
|
| 11 |
<!-- Provide a quick summary of what the model is/does. -->
|
|
|
|
| 14 |
|
| 15 |
The model is a Vision Transformer Small/16 with DINO [1] self-supervised pre-training on 1,418,938 patch images from 20,231 special staining whole slide images (WSIs) in HISTAI [2].
|
| 16 |
|
| 17 |
+
This model was presented in the paper [StainNet: A Special Staining Self-Supervised Vision Transformer for Computational Pathology](https://huggingface.co/papers/2512.10326).
|
| 18 |
+
|
| 19 |
## Using StainNet to extract features from special staining pathology image
|
| 20 |
|
| 21 |
```python
|
| 22 |
import timm
|
| 23 |
import torch
|
| 24 |
+
import torchvision.transforms as transforms
|
| 25 |
|
| 26 |
model = timm.create_model('hf_hub:JWonderLand/StainNet', pretrained=True)
|
| 27 |
|