{"id":26911353,"url":"https://github.com/kimrass/clip","last_synced_at":"2025-06-19T17:34:21.192Z","repository":{"id":201144628,"uuid":"707061604","full_name":"KimRass/CLIP","owner":"KimRass","description":"PyTorch implementation of 'CLIP' (Radford et al., 2021) and training it on Flickr8k + Flickr30k","archived":false,"fork":false,"pushed_at":"2024-03-14T09:09:05.000Z","size":19170,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-03-14T10:30:17.887Z","etag":null,"topics":["clip","flickr30k","flickr8k","linear-classification","multi-modal","text-image-retrieval","zero-shot-classification"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KimRass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-10-19T06:36:41.000Z","updated_at":"2024-03-12T03:07:55.000Z","dependencies_parsed_at":"2023-10-21T18:24:30.621Z","dependency_job_id":"30b33931-90ab-4e72-80d4-9c6955e77505","html_url":"https://github.com/KimRass/CLIP","commit_stats":null,"previous_names":["kimrass/clip"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KimRass%2FCLIP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KimRass%2FCLIP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KimRass%2FCLIP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KimRass%2FCLIP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KimRass","download_url":"https://codeload.github.com/KimRass/CLIP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246656836,"owners_count":20812895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clip","flickr30k","flickr8k","linear-classification","multi-modal","text-image-retrieval","zero-shot-classification"],"created_at":"2025-04-01T14:37:59.490Z","updated_at":"2025-04-01T14:38:00.166Z","avatar_url":"https://github.com/KimRass.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 'CLIP' (Radford et al., 2021) implementation from scratch in PyTorch\n- [Learning Transferable Visual Models From Natural Language Supervision](https://github.com/KimRass/CLIP/blob/main/papers/learning_transferable_visual_models_from_natural_language_supervision.pdf)\n## Pretrained Model\n- CLIP trained on Flickr8k + Flickr30k for 200 epochs\n    - [clip_flickr.pth](https://drive.google.com/file/d/1BEKphn5BULRIMYJr5JT5_p2W8sYzJKHO/view?usp=drive_link)\n## Linear Classification on ImageNet1k (mini) Dataset\n```bash\n# e.g.,\npython3 linear_classification.py\\\n    --ckpt_path=\"../clip_flickr.pth\"\\\n    --data_dir=\"../imagenet-mini/\"\\\n    --n_epochs=64\\\n    --batch_size=128\\\n    --n_cpus=4 # Optional\n```\n- Top-5 accuracy on validation set: 5.8%\n## Zero-shot Classification on ImageNet1k (mini) Dataset\n```bash\n# e.g.,\npython3 zero_shot_classification.py\\\n    --ckpt_path=\"../clip_flickr.pth\"\\\n    --data_dir=\"../imagenet-mini/\"\\\n    --batch_size=16\\\n    --n_cpus=4\\ # Optional\n    --max_len=128\\ # Optional\n    --k=10 # Optional\n```\n- Top-10 accuracy on train + validation set: 3.0%\n## Implementation Details\n- Temperature와 관련한 부분은 구현하지 않았습니다.\n    - \"The learnable temperature parameter was clipped to prevent scaling the logits by more than 100 which we found necessary to prevent training instability.\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkimrass%2Fclip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkimrass%2Fclip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkimrass%2Fclip/lists"}