Commit d173a8c
🤗 HuggingFace for pretrained model weights hosting (#945)
This PR migrates model weight hosting from TIA servers to HuggingFace for improved distribution and caching. The changes introduce HuggingFace Hub integration while modifying default behavior to avoid automatic ImageNet weight downloads.
Key changes:
- Replace custom download logic with [HuggingFace](https://huggingface.co/TIACentre/TIAToolbox_pretrained_weights) for pretrained model weights
- Update model architecture handling for Inception and GoogleNet models
- Use `huggingface_hub` for downloading/caching pretrained weights
- Use `None` model `pretrained` argument during model initialization, to avoid redundant downloading of ImageNet weights
---------
Co-authored-by: Jiaqi Lv <[email protected]>
Co-authored-by: Shan E Ahmed Raza <[email protected]>1 parent e1eb5bd commit d173a8c
File tree
5 files changed
+90
-80
lines changed- requirements
- tests
- tiatoolbox
- data
- models/architecture
5 files changed
+90
-80
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1618 | 1618 | | |
1619 | 1619 | | |
1620 | 1620 | | |
1621 | | - | |
| 1621 | + | |
| 1622 | + | |
1622 | 1623 | | |
1623 | 1624 | | |
1624 | 1625 | | |
1625 | | - | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
1626 | 1630 | | |
1627 | 1631 | | |
1628 | 1632 | | |
1629 | 1633 | | |
1630 | 1634 | | |
1631 | | - | |
| 1635 | + | |
1632 | 1636 | | |
1633 | 1637 | | |
1634 | | - | |
1635 | | - | |
| 1638 | + | |
1636 | 1639 | | |
1637 | 1640 | | |
1638 | 1641 | | |
| |||
0 commit comments