TF-Keras
chengkunli commited on
Commit
66d2226
·
verified ·
1 Parent(s): 806ceb9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -3
README.md CHANGED
@@ -1,3 +1,51 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+
5
+ # InkSight Small-p
6
+
7
+ <div style="display: flex; gap: 10px; justify-content: left;">
8
+ <a href="https://arxiv.org/abs/2402.05804">
9
+ <img src="https://img.shields.io/badge/📄_Read_the_Paper-4CAF50?style=for-the-badge&logo=arxiv&logoColor=white" alt="Read the Paper">
10
+ </a>
11
+ <a href="https://github.com/google-research/inksight">
12
+ <img src="https://img.shields.io/badge/View_on_GitHub-181717?style=for-the-badge&logo=github&logoColor=white" alt="View on GitHub">
13
+ </a>
14
+ <a href="https://research.google/blog/a-return-to-hand-written-notes-by-learning-to-read-write/">
15
+ <img src="https://img.shields.io/badge/🌐_Google_Research_Blog-333333?style=for-the-badge&logo=google&logoColor=white" alt="Google Research Blog">
16
+ </a>
17
+ <a href="https://charlieleee.github.io/publication/inksight/">
18
+ <img src="https://img.shields.io/badge/ℹ️_Info-FFA500?style=for-the-badge&logo=info&logoColor=white" alt="Info">
19
+ </a>
20
+ </div>
21
+
22
+
23
+ ## Example Usage
24
+
25
+ ```python
26
+ from huggingface_hub import from_pretrained_keras
27
+ import tensorflow_text
28
+
29
+ model = from_pretrained_keras("Derendering/InkSight-Small-p")
30
+ cf = model.signatures['serving_default']
31
+
32
+ prompt = "Derender the ink." # "Recognize and derender." or "Derender the ink: <text>"
33
+
34
+ input_text = tf.constant([prompt], dtype=tf.string)
35
+ image_encoded = tf.reshape(tf.io.encode_jpeg(np.array(image)[:, :, :3]), (1, 1))
36
+ output = cf(**{'input_text': input_text, 'image/encoded': image_encoded})
37
+ ```
38
+
39
+
40
+
41
+ ## Citation
42
+
43
+ If you find our work useful for your research and applications, please cite using this BibTeX:
44
+ ```bibtex
45
+ @article{mitrevski2024inksight,
46
+ title={InkSight: Offline-to-Online Handwriting Conversion by Learning to Read and Write},
47
+ author={Mitrevski, Blagoj and Rak, Arina and Schnitzler, Julian and Li, Chengkun and Maksai, Andrii and Berent, Jesse and Musat, Claudiu},
48
+ journal={arXiv preprint arXiv:2402.05804},
49
+ year={2024}
50
+ }
51
+ ```