nuua commited on
Commit
534880f
1 Parent(s): a98b3ce

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +55 -1
README.md CHANGED
@@ -6,4 +6,58 @@ language:
6
  pipeline_tag: visual-question-answering
7
  tags:
8
  - text2text-generation
9
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  pipeline_tag: visual-question-answering
7
  tags:
8
  - text2text-generation
9
+ base_model: google/deplot
10
+ ---
11
+ # **Ko-Deplot**
12
+
13
+ Ko-Deplot is a korean Visual-QA model based on the Google's Pix2Struct architecture. It was fine-tuned from [Deplot](https://huggingface.co/google/deplot), using korean chart image-text pairs.
14
+
15
+ Ko-Deplot은 Google의 Pix2Struct 구조를 기반으로 한 한국어 Visual-QA 모델입니다. [Deplot](https://huggingface.co/google/deplot) 모델을 한국어 차트 이미지-텍스트 쌍 데이터셋을 이용하여 파인튜닝하였습니다.
16
+
17
+ - **Developed by:** [NUUA](https://www.nuua.ai/en/): Yohan Kim, Jiyou Shin, Robin Lee
18
+ - **Model type:** Visual Question Answering
19
+ - **License:** apache-2.0
20
+ - **Finetuned from model:** [google/deplot](https://huggingface.co/google/deplot)
21
+
22
+ # **Model Usage**
23
+ You can run a prediction by querying an input image together with a question as follows:
24
+
25
+ ```python
26
+ from transformers import Pix2StructProcessor, Pix2StructForConditionalGeneration
27
+ import requests
28
+ from PIL import Image
29
+
30
+ processor = Pix2StructProcessor.from_pretrained('nuua/Ko-Deplot')
31
+ model = Pix2StructForConditionalGeneration.from_pretrained('nuua/Ko-Deplot')
32
+
33
+ IMAGE_PATH = "LOCAL_PATH_TO_IMAGE"
34
+ image = Image.open(IMAGE_PATH)
35
+
36
+ inputs = processor(images=image, text="Generate underlying data table of the figure below:", return_tensors="pt")
37
+ predictions = model.generate(**inputs, max_new_tokens=512)
38
+ print(processor.decode(predictions[0], skip_special_tokens=True))
39
+ ```
40
+
41
+ # **Training Details**
42
+
43
+ ## Training Data
44
+
45
+ Synthetic chart data from three libraries were used:
46
+
47
+ - [GenPlot](https://github.com/brendanartley/genplot)
48
+ - [Chart.js](https://github.com/chartjs/Chart.js)
49
+ - [Plotly](https://github.com/plotly/plotly.py)
50
+
51
+ ## Training Procedure
52
+
53
+ The model was first exposed to a short warmup stage, following its [original paper](https://arxiv.org/pdf/2210.03347.pdf). It was then trained using the chart data for 50,000 steps.
54
+
55
+ # **Technical Specifications**
56
+
57
+ ## Hardware
58
+
59
+ Ko-Deplot was trained by using A100 80G.
60
+
61
+ # **Contact**
62
+
63
+ Any questions and suggestions, please use the discussion tab. If you want to contact us directly, email robin@nuua.ai.