Skip to content

Releases: VoxelCubes/Hand-TeX

Release 1.0.0

05 Mar 01:35
Compare
Choose a tag to compare

This is the first release of Hand TeX.

Note: on Windows, Windows Defender may complain about the exe and flag it. Unfortunately, I can't do anything about that, since this app is new and still unknown to Windows Defender. I also use pyinstaller for the exe build, which often results in projects getting flagged. If you don't wish to use the exe, installing with pip or from source is always an option. This is open source, after all.

Unfortunately, technical issues have prevented me from getting pyinstaller to work on Linux since the latest version, but installing from the AUR, Flathub, or pip is better anyway.

Hotfix 1.0.1 addressed a package metadata issue.

Hotfix 1.0.2 added Flatpak metadata

Hotfix 1.0.3

  • Fix a few missing icons
  • Remind the user to check where the new data folder is pointing to, before making new training data
  • Immediately swap to new symbol to train if specifying one manually

Hand TeX model

02 Mar 20:57
Compare
Choose a tag to compare

This is the model data used to run the neural network. These files are included in the distributions of Hand TeX, they do not need to be downloaded from here. You can re-create these files if you run the train.py file, provided you have the database file downloaded.
Training on GPU only takes a couple minutes, but may take well over an hour or two if performed on CPU, so this is provided here for everyone that wishes to run from source, without needing to wait for training.

These files belong in: Hand-TeX/handtex/data/model/

You may also use the model for other projects, provided they are licensed in a way that is compatible with the GPLv3.

  • handtex.safetensors is used to package the model weights. The safetensors format protects you from having malicious code hidden in the model file.
  • encodings.txt enumerates the symbol identifiers the model is trained on, one per line. The neural network can only output numbers, this number corresponds to a line number in that text file (starting at 0). The identifiers correspond to the key column in the database.

Note: The source code below is appended by github automatically, disregard it.

Hand TeX dataset

01 Mar 16:24
Compare
Choose a tag to compare

This is a superset of the Detexify dataset, therefore offered under the same license, the Open Database License.

The data format differs from the original in the following ways:

  • The database was converted to sqlite.
  • The timestamp information was stripped, since Hand TeX does not use this information.
  • The coordinate space was stretched and normalized around a 1000x1000 canvas.
  • Strokes were re-sampled to compress the dataset, simplifying the shapes a bit.
  • Some outliers and mislabeled samples were corrected. (In particular, a large amount of symbols for latex2e-OT1-/ were removed)
  • The keys were changed to remove the font encoding information, since this was always dictated by the package.
  • New samples were added: Original: 221263, New: 11000+

Database format:

CREATE TABLE samples (
    id INTEGER PRIMARY KEY,
    key TEXT,
    strokes TEXT
)

CREATE INDEX key_index ON samples (key)

Data format:

  • key: latex package and symbol command. Example: textcomp-_texttimes
  • strokes: JSON string for a list of lists of tuples containing x,y coordinates. Lists of coordinate tuples make up strokes.
    Example: [[[739, 0], [715, 32], [703, 76], [583, 218], [464, 446], [327, 641], [288, 731], [247, 774], [101, 999]], [[204, 27], [363, 259], [563, 446], [583, 499], [645, 581], [665, 622], [746, 721], [824, 847], [862, 883], [894, 936]]]

Have fun!

Note: The source code below is appended by github automatically, disregard it.