hkondle commited on
Commit
9b3f6c2
·
verified ·
1 Parent(s): 7039cbd

Upload the checkpoint that produces the good descriptions

Browse files
Files changed (2) hide show
  1. README.md +15 -2
  2. model.safetensors +1 -1
README.md CHANGED
@@ -11,7 +11,20 @@ tags:
11
 
12
  # VisAble diagram captioner
13
 
14
- BLIP fine-tuned on AI2D-Caption dataset to produce part-to-whole descriptions for blind students.
 
 
15
 
16
- Trained for 5 epochs, batch size 8, learning rate 5e-05.
17
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  # VisAble diagram captioner
13
 
14
+ BLIP fine-tuned on AI2D-Caption diagrams to produce part-to-whole descriptions for blind and
15
+ low-vision students. The vision encoder was frozen and only the text decoder was trained, using a
16
+ cross entropy loss that up-weights AI2D entity labels by 5.0x.
17
 
18
+ Trained for 10 epochs, batch size 8, learning rate 5e-05.
19
 
20
+ ```python
21
+ from transformers import BlipForConditionalGeneration, BlipProcessor
22
+ from PIL import Image
23
+
24
+ processor = BlipProcessor.from_pretrained("hkondle/CapstoneMainModel-10ep")
25
+ model = BlipForConditionalGeneration.from_pretrained("hkondle/CapstoneMainModel-10ep")
26
+
27
+ image = Image.open("diagram.png").convert("RGB")
28
+ inputs = processor(images=image, return_tensors="pt")
29
+ print(processor.decode(model.generate(**inputs, max_length=256, num_beams=4)[0], skip_special_tokens=True))
30
+ ```
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:844a760f15d69feedd68c515b0bf69c29f57f56cfd88dd498ffaf02121e0c6dc
3
  size 989839224
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c079de1c52f8650f54c7b368e66de66bd0d1cf0bab76b0087f6c409d7aea8c0
3
  size 989839224