martinsbruveris / tensorflow-image-models

TensorFlow port of PyTorch Image Models (timm) - image models with pretrained weights.
https://tfimm.readthedocs.io/en/latest/
Apache License 2.0
286 stars 25 forks source link

Add option to load weights from huggingface hub directly. #101

Closed MSchnei closed 9 months ago

MSchnei commented 10 months ago

This PR adds the ability to load weights for existing models directly from the hugging face hub. This need arises for example if there are interesting new pre-trained or fine-tuned model weights available on the hugging face hub that are not yet available directly in tfimm.

MSchnei commented 9 months ago

@martinsbruveris any chance you could review this PR?

martinsbruveris commented 9 months ago

Thank you! It is looking good. I changed the URL prefix from [hf] to [hf-pytorch] and made the filename optional in the URL. Will merge it once the tests pass.