Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HF integration #49

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion models_mae_cross.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@

from util.pos_embed import get_2d_sincos_pos_embed

class SupervisedMAE(nn.Module):
from huggingface_hub import PyTorchModelHubMixin


class SupervisedMAE(nn.Module, PyTorchModelHubMixin,
repo_url="https://github.com/Verg-Avesta/CounTR", pipeline_tag="zero-shot-image-classification", license="mit"):
def __init__(self, img_size=384, patch_size=16, in_chans=3,
embed_dim=1024, depth=24, num_heads=16,
decoder_embed_dim=512, decoder_depth=2, decoder_num_heads=16,
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ pandas==1.5.2
six==1.16.0
wandb
tqdm
huggingface_hub>=0.24.6