from transformers import AutoImageProcessor, AutoModel | |
if __name__ == "__main__": | |
model_name = "facebook/dinov2-base" | |
processor = AutoImageProcessor.from_pretrained(model_name) | |
model = AutoModel.from_pretrained(model_name) | |
# save pretrained | |
processor.save_pretrained("dinov2") | |
model.save_pretrained("dinov2") | |