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

Finetune the released MetaCLIP models on my own dataset #31

Open
ShuxunoO opened this issue Nov 20, 2023 · 1 comment
Open

Finetune the released MetaCLIP models on my own dataset #31

ShuxunoO opened this issue Nov 20, 2023 · 1 comment

Comments

@ShuxunoO
Copy link

Hello~

How can I finetune the released MetaCLIP models on my own dataset(Img-Txt paires) and how do I organize the data?

@howardhsu
Copy link
Contributor

Thx, for your interests in this project. It can be very similar to pre-training and here's a suggested steps:

  1. check the pre-training setup: https://github.com/facebookresearch/MetaCLIP#training
  2. derive a new config from b32_400m and add `pretrained="metaclip_400m"
def b32_400m_ft():
    return b32_400m(
        pretrained="metaclip_400m",  # should download pre-trained MetaCLIP ViT-B/32 400M
    )

(we will have a new config system released soon)

  1. depends on your fine-tuning set format, properly set train_data for https://github.com/facebookresearch/MetaCLIP/blob/main/src/training/data.py and we highly recommend use your own dataloader to control randomness instead of built-in one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants