Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
55871dd
ENH: Use HF Hub for model weights and avoid imagenet weight downloading
mostafajahanifar Jul 11, 2025
b9dda0b
MAIN: no more download_data for model weights
mostafajahanifar Jul 11, 2025
c214608
MAINT: add huggingface_hub to requirements
mostafajahanifar Jul 11, 2025
ba874d5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2025
54ded49
ENH: adding overwrite option to force download files
mostafajahanifar Jul 11, 2025
3081922
Merge branch 'enhance-hf-weights' of https://github.com/TissueImageAn…
mostafajahanifar Jul 11, 2025
53352b7
BUG: replace cache_dir wirh local_dir for specify the saving directory
mostafajahanifar Jul 14, 2025
59d6e93
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 14, 2025
abe6f3d
MAIN: pin the huggingface_hub version
mostafajahanifar Jul 14, 2025
9e18775
Merge branch 'enhance-hf-weights' of https://github.com/TissueImageAn…
mostafajahanifar Jul 14, 2025
ad222c9
BUG: fix type checking
mostafajahanifar Jul 18, 2025
0b52138
Merge branch 'develop' into enhance-hf-weights
shaneahmed Jul 25, 2025
41ba556
Merge branch 'develop' into enhance-hf-weights
shaneahmed Aug 5, 2025
6721567
Merge branch 'develop' into enhance-hf-weights
shaneahmed Aug 8, 2025
c53b7b2
Merge branch 'develop' into enhance-hf-weights
shaneahmed Sep 2, 2025
630ee1c
Merge branch 'develop' into enhance-hf-weights
shaneahmed Oct 2, 2025
fb1ed53
Merge branch 'develop' into enhance-hf-weights
shaneahmed Oct 10, 2025
caff2ea
address comments
Jiaqi-Lv Oct 10, 2025
30f3492
Merge branch 'develop' into enhance-hf-weights
shaneahmed Oct 16, 2025
7cd2357
update docstring
Jiaqi-Lv Oct 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ filelock>=3.9.0
flask>=2.2.2
flask-cors>=4.0.0
glymur>=0.12.7, < 0.14 # 0.14 is not compatible with python3.9
huggingface_hub # do we need to pin it to 0.33.3?
imagecodecs>=2022.9.26
joblib>=1.1.1
jupyterlab>=3.5.2
Expand Down Expand Up @@ -37,4 +38,3 @@ tqdm>=4.64.1
umap-learn>=0.5.3
wsidicom>=0.18.0
zarr>=2.13.3, <3.0.0
huggingface_hub # do we need to pin it to 0.33.3?
5 changes: 2 additions & 3 deletions tiatoolbox/models/architecture/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
from typing import TYPE_CHECKING

import torch
from huggingface_hub import hf_hub_download

from tiatoolbox import rcParam
from tiatoolbox.models.dataset.classification import predefined_preproc_func

from huggingface_hub import hf_hub_download

if TYPE_CHECKING: # pragma: no cover
from tiatoolbox.models.models_abc import IOConfigABC

Expand Down Expand Up @@ -60,7 +59,7 @@ def fetch_pretrained_weights(

return hf_hub_download(
repo_id="TIACentre/TIAToolbox_pretrained_weights",
filename=file_name,
filename=file_name,
cache_dir=cache_dir,
)

Expand Down
1 change: 0 additions & 1 deletion tiatoolbox/models/architecture/vanilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def _get_architecture(
return model.features
if "alexnet" in arch_name:
return model.features


return model.features

Expand Down
Loading