tanganke commited on
Commit
2a201cd
·
verified ·
1 Parent(s): 681e51e

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -9,36 +9,16 @@ metrics:
9
 
10
  # Model Card
11
 
12
- ## Model Details
13
-
14
- - Architecture: ViT-Base with patch size 32
15
- - Training Data: oxford-iiit-pet dataset
16
-
17
  ## Training Details
18
 
19
- Adam Optimizer with a constant learning rate 1e-5 for 4000 steps training (batch_size=32).
20
- Only the vision encoder is fine-tuned.
21
-
22
- ## Evaluation Results
23
-
24
- - pre-trained: 0.8317149877548218
25
- - fine-tuned: 0.9084667563438416
26
 
27
- ## Usage
28
 
29
- load vision model
30
-
31
- ```python
32
- from transformers import CLIPVisionModel
33
-
34
- vision_model = CLIPVisionModel.from_pretrained('tanganke/clip-vit-base-patch32_oxford-iiit-pet')
35
- ```
36
-
37
- substitute the vision encoder of clip
38
 
39
- ```python
40
- from transformers import CLIPModel
41
 
42
- clip_model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
43
- clip_model.vision_model.load_state_dict(vision_model.vision_model.state_dict())
44
- ```
 
9
 
10
  # Model Card
11
 
 
 
 
 
 
12
  ## Training Details
13
 
14
+ Adam Optimizer with a constant learning rate 1e-5 for 4000 steps training (batch_size=128).
15
+ Only the vision encoder is fine-tuned.
 
 
 
 
 
16
 
17
+ ![alt text](image.png)
18
 
19
+ ## Evaluation Results
 
 
 
 
 
 
 
 
20
 
21
+ Test set accuracy:
 
22
 
23
+ - pre-trained: 0.8331970572471619
24
+ - fine-tuned: 0.9245026111602783
 
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "results/temp/",
3
  "architectures": [
4
  "CLIPVisionModel"
5
  ],
@@ -19,5 +19,5 @@
19
  "patch_size": 32,
20
  "projection_dim": 512,
21
  "torch_dtype": "float32",
22
- "transformers_version": "4.39.1"
23
  }
 
1
  {
2
+ "_name_or_path": "openai/clip-vit-base-patch32",
3
  "architectures": [
4
  "CLIPVisionModel"
5
  ],
 
19
  "patch_size": 32,
20
  "projection_dim": 512,
21
  "torch_dtype": "float32",
22
+ "transformers_version": "4.47.0"
23
  }
events.out.tfevents.1733995624.amax.1917161.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a1360573363a0d4e89d1704e5e79d890012f7ebe247b9a2d34d27f18b10eb0e
3
+ size 195958
image.png ADDED
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:37119d9b7fe99b0c8c21bd38be893f1a7fae1b35bd696805a80c2fa6c9aee7d0
3
  size 349847824
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af15c4b9c204083b5f173fab4b5fda95cbaac984f0eb8f8ecd948d8b80d22680
3
  size 349847824