metadata
license: apache-2.0
InkSight Small-p
Notice: Please use TensorFlow and tensorflow-text between version 2.15.0 and 2.17.0. Versions later than 2.17.0 may lead to unexpected behavior. We are currently investigating these issues.
Example Usage
from huggingface_hub import from_pretrained_keras
import tensorflow_text
model = from_pretrained_keras("Derendering/InkSight-Small-p")
cf = model.signatures['serving_default']
prompt = "Derender the ink." # "Recognize and derender." or "Derender the ink: <text>"
input_text = tf.constant([prompt], dtype=tf.string)
image_encoded = tf.reshape(tf.io.encode_jpeg(np.array(image)[:, :, :3]), (1, 1))
output = cf(**{'input_text': input_text, 'image/encoded': image_encoded})
For full usage, please refer to the notebook:
Citation
If you find our work useful for your research and applications, please cite using this BibTeX:
@article{mitrevski2024inksight,
title={InkSight: Offline-to-Online Handwriting Conversion by Learning to Read and Write},
author={Mitrevski, Blagoj and Rak, Arina and Schnitzler, Julian and Li, Chengkun and Maksai, Andrii and Berent, Jesse and Musat, Claudiu},
journal={arXiv preprint arXiv:2402.05804},
year={2024}
}