I am working on a project to convert equations to LaTeX code. After segmenting out the characters, I got stuck on the detection part and was looking for some pre-trained model that could detect characters of the equation for later conversion to LaTeX. Is there any such pre-trained model available on the internet that could be used in Python to identify characters. If not then can somebody share some source to find a dataset to train such kind of model in Keras? I was able to find one on GitHub but It doesn't detect symbols accurately.


1 Answer 1


Detexify is a service that recognizes LaTeX symbols from handwritten figures. Their training dataset is freely available on Github.

  • $\begingroup$ can I use it in python? $\endgroup$
    – Saqeeb
    Commented Jun 25, 2020 at 10:39
  • $\begingroup$ which libraries would be required to train the model? $\endgroup$
    – Saqeeb
    Commented Jun 25, 2020 at 10:40
  • 1
    $\begingroup$ A dataset can be used in any language, as long as someone (most likely you) can program a way to read the data. Judging from the example, the data seems to be a not too complicated json format. I'm sure you'll be able to find a library to read .json in python, and reading the problem will probably be a bit of work, but that is often what has to be done. You could also search a bit more for references to this dataset, if you're lucky you may find someone else has already written the code you need. $\endgroup$
    – Discrete lizard
    Commented Jun 25, 2020 at 11:03
  • $\begingroup$ Detection is not the prime subject in our project. That's why I don't want to spend much time on it. Isn't there any pre-built model in Keras/tensorflow available that would be PnP to use in code. Be it only for the detection of basic arithmetic characters and digits. $\endgroup$
    – Saqeeb
    Commented Jun 25, 2020 at 11:31
  • 2
    $\begingroup$ @Saqeeb Sure, I understand that you don't want to spend time on getting your dataset to work. However, most people don't, but have to do so anyway (e.g. data scientists would rather not, but have to). The reality is that collecting data is tedious and it cannot always be provided on a silver platter even if those collecting the data try their best to do so. Of course, as I said, you may be lucky and find that someone else has done the work, but this is not guaranteed. $\endgroup$
    – Discrete lizard
    Commented Jun 25, 2020 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.