pix2tex: Using a ViT to convert images of equations into LaTeX code.

Overview

pix2tex - LaTeX OCR

The goal of this project is to create a learning based system that takes an image of a math formula and returns corresponding LaTeX code.

header

Requirements

Model

  • PyTorch (tested on v1.7.1)
  • Python 3.7+ & dependencies (requirements.txt)
    pip install -r requirements.txt
    

Dataset

In order to render the math in many different fonts we use XeLaTeX, generate a PDF and finally convert it to a PNG. For the last step we need to use some third party tools:

Using the model

  1. Download/Clone this repository
  2. For now you need to install the Python dependencies specified in requirements.txt (look above)
  3. Download the weights.pth (and optionally image_resizer.pth) file from my Google Drive and place it in the checkpoints directory

Thanks to @katie-lim, you can use a nice user interface as a quick way to get the model prediction. Just call the GUI with python gui.py. From here you can take a screenshot and the predicted latex code is rendered using MathJax and copied to your clipboard.

demo

If the model is unsure about the what's in the image it might output a different prediction every time you click "Retry". With the temperature parameter you can control this behavior (low temperature will produce the same result).

Alternatively you can use pix2tex.py with similar functionality as gui.py, only as command line tool. In this case you don't need to install PyQt5. Using this script you can also parse already existing images from the disk.

Note: As of right now it works best with images of smaller resolution. Don't zoom in all the way before taking a picture. Double check the result carefully. You can try to redo the prediction with an other resolution if the answer was wrong.

Update: I have trained an image classifier on randomly scaled images of the training data to predict the original size. This model will automatically resize the custom image to best resemble the training data and thus increase performance of images found in the wild. To use this preprocessing step, all you have to do is download the second weights file mentioned above. You should be able to take bigger (or smaller) images of the formula and still get a satisfying result

Training the model

  1. First we need to combine the images with their ground truth labels. I wrote a dataset class (which needs further improving) that saves the relative paths to the images with the LaTeX code they were rendered with. To generate the dataset pickle file run
python dataset/dataset.py --equations path_to_textfile --images path_to_images --tokenizer path_to_tokenizer --out dataset.pkl

You can find my generated training data on the Google Drive as well (formulae.zip - images, math.txt - labels). Repeat the step for the validation and test data. All use the same label text file.

  1. Edit the data entry in the config file to the newly generated .pkl file. Change other hyperparameters if you want to. See settings/default.yaml for a template.
  2. Now for the actual training run
python train.py --config path_to_config_file

Model

The model consist of a ViT [1] encoder with a ResNet backbone and a Transformer [2] decoder.

Performance

BLEU score normed edit distance
0.88 0.10

Data

We need paired data for the network to learn. Luckily there is a lot of LaTeX code on the internet, e.g. wikipedia, arXiv. We also use the formulae from the im2latex-100k dataset. All of it can be found here

Fonts

Latin Modern Math, GFSNeohellenicMath.otf, Asana Math, XITS Math, Cambria Math

TODO

  • add more evaluation metrics
  • create a GUI
  • add beam search
  • support handwritten formulae
  • reduce model size (distillation)
  • find optimal hyperparameters
  • tweak model structure
  • fix data scraping and scrape more data
  • trace the model

Contribution

Contributions of any kind are welcome.

Acknowledgment

Code taken and modified from lucidrains, rwightman, im2markup, arxiv_leaks, pkra: Mathjax, harupy: snipping tool

References

[1] An Image is Worth 16x16 Words

[2] Attention Is All You Need

Comments
  • The result of retraining is not good

    The result of retraining is not good

    I clone the project , changed nothing. except change the train&val.pkl path in the config file , use your images retrain. but i think my result is not good . i check the data , found nothing . here is my trian PS img; XVM_9A6MKXS0I6KP(S88VS9

    i don't know how to check and find the problem

    training 
    opened by JaosonMa 41
  • Data parallelism【multi-gpu train】+pure ViT work + small modify

    Data parallelism【multi-gpu train】+pure ViT work + small modify

    pure ViT structure

    We discussed pure ViT structure at https://github.com/lukas-blecher/LaTeX-OCR/discussions/131 .

    1. Initially, I used a pure ViT (6ecc3f4). But the encoder was just not performing very well. The model produced latex code but it has nothing to do with the input image.

    And I do come up with same result, the model can't converge. In fact, I would hope that larger pure vit can achieve high performance, it really frustrated me. But in recent days, https://github.com/lukas-blecher/LaTeX-OCR/issues/147#issuecomment-1125837771 give me some idea, because the training loss curve is so familiar like pure vit training curve, so I think the reason why pure vit can't fit maybe due to batch size.

    I taken and modified models.py from 844bc219a9469fa7e9dfc8626f74a705bd194d69.

    Here is the good news, it's working.

    image

    How to use

    # for vit
     python -m pix2tex.train --config model/settings/config-vit.yaml --structure vit
    # for hybrid, default is hybrid
     python -m pix2tex.train --config model/settings/config.yaml --structure hybrid
     python -m pix2tex.train --config model/settings/config.yaml
    
    

    Data parallelism

    I think multi-GPU training can save more time and a larger batch size, so refer to some documents and blogs and make such changes. Also, it's compatible with one GPU.

    How to use

    #for one GPU
    export CUDA_VISIBLE_DEVICES=6
     python -m pix2tex.train --config model/settings/config-vit.yaml --structure vit
    #for multi GPU
    export CUDA_VISIBLE_DEVICES=6,7
     python -m pix2tex.train --config model/settings/config-vit.yaml --structure vit
    

    References:

    1. Technique 1: Data Parallelism
    2. data_parallel_tutorial.ipynb
    3. https://github.com/jytime/Mask_RCNN_Pytorch/issues/2#issuecomment-423718196

    small modify

    I think both hybrid and pure vit work together, why not put them together. so create a folder named as structures.


    the branch is based on 720978d8c469780ed070d041d5795c55b705ac1b, please feel free to correct any inappropriate code.😁

    enhancement 
    opened by TITC 28
  • PermissionError: [Errno 13] Permission denied

    PermissionError: [Errno 13] Permission denied

    When I run latexocr in Windows Terminal, I got this error:

    Traceback (most recent call last):
      File "F:\Python\lib\runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "F:\Python\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "F:\Venv\pytorch_1.11\Scripts\latexocr.exe\__main__.py", line 7, in <module>
      File "F:\Venv\pytorch_1.11\lib\site-packages\pix2tex\gui.py", line 316, in main
        with in_model_path():
      File "F:\Python\lib\contextlib.py", line 119, in __enter__
        return next(self.gen)
      File "F:\Venv\pytorch_1.11\lib\site-packages\pix2tex\utils\utils.py", line 161, in in_model_path
        with path('pix2tex', 'model') as model_path:
      File "F:\Python\lib\contextlib.py", line 119, in __enter__
        return next(self.gen)
      File "F:\Python\lib\importlib\resources.py", line 175, in _path_from_reader
        opener_reader = reader.open_resource(norm_resource)
      File "<frozen importlib._bootstrap_external>", line 1055, in open_resource
    PermissionError: [Errno 13] Permission denied: 'F:\\Venv\\pytorch_1.11\\lib\\site-packages\\pix2tex\\model'
    
    help wanted windows 
    opened by calmisential 12
  • Re: Completely unusable

    Re: Completely unusable

    Hello!

    I am currently on macOS catalina 10.15.7, running python3.7. I went through the installation, and met the same problem as described in #33. I have tried all the fixes, including downgrading x-transformers, tuning the temperature, taking pictures of larger equations, and downloading the weights.pth and image_resizer.pth into the checkpoints folder, yet the program still gives out wrong results. Is there possibly some incompatibility with other distributions for my mac?

    Here are my installed packages.

    song12301(Jeb) ~ % pip3 list
    Package                              Version
    ------------------------------------ ---------
    albumentations                       1.1.0
    certifi                              2021.10.8
    chardet                              4.0.0
    charset-normalizer                   2.0.10
    click                                8.0.3
    Cython                               0.29.26
    einops                               0.4.0
    entmax                               1.0
    filelock                             3.4.2
    idna                                 3.3
    imageio                              2.14.0
    imagesize                            1.3.0
    joblib                               1.1.0
    munch                                2.5.0
    networkx                             2.6.3
    numpy                                1.22.1
    opencv-python-headless               4.5.5.62
    packaging                            21.3
    pandas                               1.4.0
    Pillow                               9.0.0
    pip                                  21.3.1
    pynput                               1.7.6
    pyobjc-core                          8.1
    pyobjc-framework-ApplicationServices 8.1
    pyobjc-framework-Cocoa               8.1
    pyobjc-framework-Quartz              8.1
    pyparsing                            3.0.7
    PyQt5                                5.15.6
    PyQt5-Qt5                            5.15.2
    PyQt5-sip                            12.9.0
    PyQtWebEngine                        5.15.5
    PyQtWebEngine-Qt5                    5.15.2
    python-dateutil                      2.8.2
    python-Levenshtein                   0.12.2
    pytz                                 2021.3
    PyWavelets                           1.2.0
    PyYAML                               6.0
    qudida                               0.0.4
    regex                                2022.1.18
    requests                             2.27.1
    sacremoses                           0.0.47
    scikit-image                         0.19.1
    scikit-learn                         1.0.2
    scipy                                1.7.3
    screeninfo                           0.8
    setuptools                           60.5.0
    six                                  1.16.0
    threadpoolctl                        3.0.0
    tifffile                             2021.11.2
    timm                                 0.5.4
    tokenizers                           0.9.4
    torch                                1.10.1
    torchtext                            0.11.1
    torchvision                          0.11.2
    tqdm                                 4.62.3
    typing_extensions                    4.0.1
    urllib3                              1.26.8
    wheel                                0.37.1
    wincertstore                         0.2
    x-transformers                       0.12.1
    

    Thanks a lot for your time!

    opened by jeb12301 11
  • generate the cromhe tokenizer.json  ,error,how to fix it ?

    generate the cromhe tokenizer.json ,error,how to fix it ?

    (tf_1.12) [email protected]:/home/code/LaTeX-OCR# python dataset/dataset.py --equations latex-ocr-data/crohme/CROHME_math.txt --vocab-size 8000 --out crohme-tokenizer.json Generate tokenizer Traceback (most recent call last): File "dataset/dataset.py", line 244, in generate_tokenizer(args.equations, args.out, args.vocab_size) File "dataset/dataset.py", line 228, in generate_tokenizer trainer = BpeTrainer(special_tokens=["[PAD]", "[BOS]", "[EOS]"], vocab_size=vocab_size, show_progress=True) TypeError: 'str' object cannot be interpreted as an integer (tf_1.12) [email protected]:/home/code/LaTeX-OCR# how to fix it ?

    question 
    opened by aspnetcs 11
  • how to convert my own latex line to yours like math.txt?

    how to convert my own latex line to yours like math.txt?

    here is my own latex data line ,there is no space . image here is you math.txt latex line, there is lots of sapce in the line , image i want to konw how to convert my own latex line to you style?

    opened by JaosonMa 10
  • some suggestions

    some suggestions

    1. normalization influenced by alpha.
    grayscale = (data[..., 0]-data[..., 0].min()) / (data[..., 0].max()-data[..., 0].min())*255
    
    1. paste size does not match
    padded.paste(im, (0, 0, im.size[0], im.size[1]))
    
    1. pad wrong pixel when text is inverted cause the text has inverted some times, but the padded pixel is hard code to 255
    padded = Image.new('L', dims, 255)
    

    I notice this will cause error recognition when the text's pixel is 255 and the pad pixel is also 255, then that pad part will be recognized as text.

    opened by TITC 10
  • PIL TypeError

    PIL TypeError

    Hi, I constantly get a TypeError when trying to run gui.py.

    Traceback (most recent call last):
      File "/Applications/LaTeX-OCR-main/gui.py", line 266, in mouseReleaseEvent
        img = ImageGrab.grab(bbox=(x1, y1, x2, y2), all_screens=True)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PIL/ImageGrab.py", line 42, in grab
        im_resized = im.resize((right - left, bottom - top))
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PIL/Image.py", line 2040, in resize
        im = im.resize(size, resample, box)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PIL/Image.py", line 2062, in resize
        return self._new(self.im.resize(size, resample, box))
    TypeError: integer argument expected, got float
    zsh: abort      '/usr/local/bin/python3.8' '/Applications/LaTeX-OCR-main/gui.py'
    [email protected] LaTeX-OCR-main % 
    

    Pix2Tex works, even though I get an unsupported hardware notification. I'm on a M1 MacBook Air. Any help would be great. Kind regards

    gui macOS 
    opened by PhilP88 9
  • Issue in Generate Tokenizer for CROHME dataset

    Issue in Generate Tokenizer for CROHME dataset

    Hey Buddy, first of all, great work here, I followed the instructions, and it works amazingly for most of the equations. Now I want to train the model for handwritten equations to predict LaTeX. Following README.MD, I'm trying to generate the tokenizer for the CROHME dataset for which I entered the following command:

    python dataset/dataset.py --equations dataset/CROHME_math.txt --vocab-size 8000 --out tokenizer.json

    I'm getting the following error:

    Generate tokenizer
    Traceback (most recent call last):
      File "C:\Users\Saad\OneDrive\Desktop\LaTeX-OCR-main\dataset\dataset.py", line 244, in <module>
        generate_tokenizer(args.equations, args.out, args.vocab_size)
      File "C:\Users\Saad\OneDrive\Desktop\LaTeX-OCR-main\dataset\dataset.py", line 228, in generate_tokenizer     
        trainer = BpeTrainer(special_tokens=["[PAD]", "[BOS]", "[EOS]"], vocab_size=vocab_size, show_progress=True)
    TypeError: 'str' object cannot be interpreted as an integer
    

    How am I to solve this? I'm assuming that I'll first generate the tokenizer.json file and then train the model on CROHME Dataset. Once I'm done, I'll be able to input handwritten equations and get the corresponding LaTeX. Am I on the right track? Thanks!

    opened by Agha-Muqarib 9
  • Image grab not supported in Linux

    Image grab not supported in Linux

    Take a snapshot of the clipboard image, if any. Only macOS and Windows are currently supported. https://pillow.readthedocs.io/en/stable/reference/ImageGrab.html#PIL.ImageGrab.grabclipboard

    pix2tex.py uses this method but it is not supported in Linux. Need to find a workaround.

    opened by lukas-blecher 9
  • "--no-cuda" does not work

    When using the --no-cuda argument, it returns an error.

    (env) λ python pix2tex.py --no-cuda
    Traceback (most recent call last):
      File "H:\pytlat\ocr\pix2tex.py", line 84, in <module>
        args, model, tokenizer = initialize(args)
      File "H:\pytlat\ocr\pix2tex.py", line 33, in initialize
        model.load_state_dict(torch.load(args.checkpoint))
      File "H:\pytlat\env\lib\site-packages\torch\serialization.py", line 594, in load
        return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
      File "H:\pytlat\env\lib\site-packages\torch\serialization.py", line 853, in _load
        result = unpickler.load()
      File "H:\pytlat\env\lib\site-packages\torch\serialization.py", line 845, in persistent_load
        load_tensor(data_type, size, key, _maybe_decode_ascii(location))
      File "H:\pytlat\env\lib\site-packages\torch\serialization.py", line 834, in load_tensor
        loaded_storages[key] = restore_location(storage, location)
      File "H:\pytlat\env\lib\site-packages\torch\serialization.py", line 175, in default_restore_location
        result = fn(storage, location)
      File "H:\pytlat\env\lib\site-packages\torch\serialization.py", line 151, in _cuda_deserialize
        device = validate_cuda_device(location)
      File "H:\pytlat\env\lib\site-packages\torch\serialization.py", line 135, in validate_cuda_device
        raise RuntimeError('Attempting to deserialize object on a CUDA '
    RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
    

    I use torch 1.7.+cpu, cuda version is not installed, and can't use cuda.

    opened by KIVix 9
  • When I try to recognize a series of equations, I get an error

    When I try to recognize a series of equations, I get an error

    When I try to recognize a series of equations, I get an error,

    here is the equations image.

    image

    here is the result.

    image

    Is there any way to fix this error? Thank you for taking the time to look at this issue and reply to it.

    opened by luis-arch 1
  • Possible bug in computing positional embeddings for patches

    Possible bug in computing positional embeddings for patches

    Hi all - currently looking into fine-tuning this model and have run into an issue with images of varying different sizes. For this example:

    max_height = 192, max_width = 672, patch_size=16

    The error causing line is here:

            x += self.pos_embed[:, pos_emb_ind]
    

    (pix2tex.models.hybrid line 25 in CustomVisionTransformer forward_features)

    If I have an image of size 522 x 41, this line will throw an error. X consists of 99 patches (+ the cls tokens) making it size [100, 256]

    However, the positional embedding indices are only 66 in length. I am currently investigating this issue but don't quite understand the formula used to compute how many positional embedding indicies we are going to need. Right now it is computing 66 different indicies when we should be getting 100 different indicies. I think the issue arises when convolutions from the resnet embedder overlap and the formula doesn't account for this (it requires the image to be divisible by patch_size X patch_size for this formula to work).

    If anyone has any thoughts on how to fix this let me know! I'm definitely no computer vision expert but I believe a simple change to account for overlapping convolutions in the embedding may be enough to fix this!

    opened by ByrdOfAFeather 1
  • Effect of resolution

    Effect of resolution

    Sorry to bother you again. I found that different resolution of an image will have a big impact on the recognition effect. For example, if the original resolution of some input images is reduced to 80% or enlarged to 120 percent, the recognition effect will change significantly, and the identification results will be too uncertain.

    opened by with-him777 4
  • formula recognition

    formula recognition

    There are some errors in formula recognition. 12 11 The following are the results of the identification: y=\prod x_{i}^{v}
    y=\sum w_{i} x These are the images generated in cli.py: 12 11

    opened by with-him777 4
  • How can I generate training data ?

    How can I generate training data ?

    As you've mentioned, to generate dataset the command should go like this "python -m pix2tex.dataset.dataset --equations path_to_textfile --images path_to_images --out dataset.pkl" and the dataset class basically takes the filename and splits it from "." and takes that first splited part as the line number of the equation file and grab that line as the ground truth data of the image.(Correct me if I'm wrong). My question is how can I generate my own dataset to train the model. Is it necessary to have "000" kind of stuffs before the file name of the image ? Because your google drive data is kind of confusing ! it contains

    1. Train Images -> 158480 number of files
    2. Valid Images -> 6780 number of files
    3. Test Images -> 30637 number of files 195882 Files in total but your ground truth data contains more than that. I found 234484 lines in math.txt file . Can you please explain how can align my own data to generate the dataset.pkl file. Or how can I name the image files and how can I write my math.txt file ?
    opened by Rahul99887trt 1
Releases(0.0.29)
  • 0.0.29(Sep 25, 2022)

    What's Changed

    GUI and CLI improvements.

    • use same parser to parse cli and gui arguments by @Freed-Wu in https://github.com/lukas-blecher/LaTeX-OCR/pull/179
    • add support for readline by @Freed-Wu in https://github.com/lukas-blecher/LaTeX-OCR/pull/185
    • Fix #184, add highlight by @Freed-Wu in https://github.com/lukas-blecher/LaTeX-OCR/pull/186
    • Use gnome-screenshot automatically by @Freed-Wu in https://github.com/lukas-blecher/LaTeX-OCR/pull/188
    • Fix --file and support expanding ~ by @Freed-Wu in https://github.com/lukas-blecher/LaTeX-OCR/pull/187
    • Solved Retina display issues by @FrankFrank9 in https://github.com/lukas-blecher/LaTeX-OCR/pull/195
    • Update Snip button on MacOs by @FrankFrank9 in https://github.com/lukas-blecher/LaTeX-OCR/pull/196
    • Make gui better and fix bug of QWebEngine doesn't display eq on linux by @muyuuuu in https://github.com/lukas-blecher/LaTeX-OCR/pull/190

    New Contributors

    • @Freed-Wu made their first contribution in https://github.com/lukas-blecher/LaTeX-OCR/pull/179
    • @FrankFrank9 made their first contribution in https://github.com/lukas-blecher/LaTeX-OCR/pull/195
    • @muyuuuu made their first contribution in https://github.com/lukas-blecher/LaTeX-OCR/pull/190

    Full Changelog: https://github.com/lukas-blecher/LaTeX-OCR/compare/0.0.26...0.0.29

    Source code(tar.gz)
    Source code(zip)
  • 0.0.26(May 20, 2022)

    What's Changed

    Mainly improved training

    • add micro batches by @lukas-blecher in https://github.com/lukas-blecher/LaTeX-OCR/pull/148
    • Data parallelism + pure ViT working by @TITC in https://github.com/lukas-blecher/LaTeX-OCR/pull/150

    Full Changelog: https://github.com/lukas-blecher/LaTeX-OCR/compare/0.0.24...0.0.26

    Breaking Changes

    models.py moved into new module models. Model class has forward moved to generate.

    Source code(tar.gz)
    Source code(zip)
  • 0.0.24(May 3, 2022)

    What's Changed

    • Better dataset render pipeline by @TITC in https://github.com/lukas-blecher/LaTeX-OCR/pull/141
    • Add some documentation by @lukas-blecher in https://github.com/lukas-blecher/LaTeX-OCR/pull/142
    • Add docker image for API by @lukas-blecher in https://github.com/lukas-blecher/LaTeX-OCR/pull/143

    Full Changelog: https://github.com/lukas-blecher/LaTeX-OCR/compare/0.0.20...0.0.24

    Source code(tar.gz)
    Source code(zip)
  • 0.0.20(Apr 27, 2022)

    What's Changed

    • Add Api by @lukas-blecher in https://github.com/lukas-blecher/LaTeX-OCR/pull/140 The new functionality is built on new dependenciew. They can be installed by using the [api] or [all] tag when installing pix2tex[tag]
    • LaTeX-OCR/dataset to LaTeX-OCR/pix2tex/dataset by @TITC in https://github.com/lukas-blecher/LaTeX-OCR/pull/123
    • import problem by @TITC in https://github.com/lukas-blecher/LaTeX-OCR/pull/125
    • preprocessing file missing by @TITC in https://github.com/lukas-blecher/LaTeX-OCR/pull/135

    Breaking Changes

    Methods in cli.py initialize and call_model have been moved into a the class LatexOCR.

    Full Changelog: https://github.com/lukas-blecher/LaTeX-OCR/compare/0.0.4...0.0.20

    Source code(tar.gz)
    Source code(zip)
  • 0.0.4(Apr 13, 2022)

    What's Changed

    • Add desktop entry script for the GUI by @JCGoran in https://github.com/lukas-blecher/LaTeX-OCR/pull/34
    • :hammer: fix the image resize in pix2tex.call_model by @rainyl in https://github.com/lukas-blecher/LaTeX-OCR/pull/105
    • alpha bug fixes by @TITC in https://github.com/lukas-blecher/LaTeX-OCR/pull/112
    • [Feature] Add a cmdline option to use gnome-screenshot instead of pyqt to capture screenshots by @kxxt in https://github.com/lukas-blecher/LaTeX-OCR/pull/111
    • img has been cut off abnormally by @TITC in https://github.com/lukas-blecher/LaTeX-OCR/pull/119
    • Install via PyPI by @lukas-blecher in https://github.com/lukas-blecher/LaTeX-OCR/pull/121

    New Contributors

    • @JCGoran made their first contribution in https://github.com/lukas-blecher/LaTeX-OCR/pull/34
    • @rainyl made their first contribution in https://github.com/lukas-blecher/LaTeX-OCR/pull/105
    • @TITC made their first contribution in https://github.com/lukas-blecher/LaTeX-OCR/pull/112
    • @kxxt made their first contribution in https://github.com/lukas-blecher/LaTeX-OCR/pull/111
    • @frankier made their first contribution in https://github.com/lukas-blecher/LaTeX-OCR/pull/94

    Full Changelog: https://github.com/lukas-blecher/LaTeX-OCR/compare/v0.0.1...0.0.4

    No new model checkpoints. See first release.

    Source code(tar.gz)
    Source code(zip)
  • v0.0.1(Oct 28, 2021)

Owner
Lukas Blecher
Physics student at Heidelberg University, interested in machine learning
Lukas Blecher
Extract the temperature data of each wire from the thermal imager raw data.

Wire-Tempurature-Detection Extract the temperature data of each wire from the thermal imager raw data. The motivation of this computer vision project

JohanAckerman 1 Nov 03, 2021
QR Generator using GUI with Tinker

BinCat Token System Very simple python script with GUI that generates QR codes. It don't include a QR "decription" tool. It only generate-it and thats

Hipotesi 1 Nov 06, 2021
A quick and dirty QT Statusbar implementation for grabbing GIFs from Tenor, since there is no offical or unofficial one I found. This was intended for use under Linux, however it was also functional enough on MacOS.

Statusbar-TenorGIF App for Linux A quick and dirty QT Statusbar implementation for grabbing GIFs from Tenor, since there is no offical one and I didnt

Luigi DaVinci 1 Nov 01, 2021
QSIprep: Preprocessing and analysis of q-space images

QSIprep: Preprocessing and analysis of q-space images Full documentation at https://qsiprep.readthedocs.io About qsiprep configures pipelines for proc

Lifespan Informatics and Neuroimaging Center 88 Dec 15, 2022
A Python3 library to generate dynamic SVGs

The Python library for generating dynamic SVGs using Python3

1 Dec 23, 2021
OctoPrint is the snappy web interface for your 3D printer!

OctoPrint OctoPrint provides a snappy web interface for controlling consumer 3D printers. It is Free Software and released under the GNU Affero Genera

OctoPrint 7.1k Jan 03, 2023
Easily turn large sets of image urls to an image dataset. Can download, resize and package 100M urls in 20h on one machine.

img2dataset Easily turn large sets of image urls to an image dataset. Can download, resize and package 100M urls in 20h on one machine. Also supports

Romain Beaumont 1.4k Jan 01, 2023
Image Compression GUI APP Python: PyQt5

Image Compression GUI APP Image Compression GUI APP Python: PyQt5 Use : f5 or debug or simply run it on your ids(vscode , pycham, anaconda etc.) socia

Sourabh Dhalia 1 May 21, 2022
Generate your own QR Code and scan it to see the results! Never use it for malicious purposes.

QR-Code-Generator-Python Choose the name of your generated QR .png file. If it happens to open the .py file (the application), there are specific comm

1 Dec 23, 2021
A simple plugin to view APR images in napari

napari-apr-viewer A simple plugin to view APR images in napari This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-

5 Jan 24, 2022
A Python package implementing various CFA (Colour Filter Array) demosaicing algorithms and related utilities.

Colour - Demosaicing A Python package implementing various CFA (Colour Filter Array) demosaicing algorithms and related utilities. It is open source a

colour-science 218 Dec 04, 2022
Leshycam - Generate Inscryption styled portrait sprites from any image

Leshy's Camera Generate Inscryption styled portrait sprites from any image. Setu

3 Sep 27, 2022
Kimimaro: Skeletonize Densely Labeled Images

Kimimaro: Skeletonize Densely Labeled Images # Produce SWC files from volumetric images. kimimaro forge labels.npy --progress # writes to ./kimimaro_o

92 Dec 17, 2022
Alternate Python bindings for the Open Asset Import Library (ASSIMP)

Impasse A simple Python wrapper for assimp using cffi to access the library. Requires Python = 3.7. It's a fork of PyAssimp, Assimp's official Python

Salad Dais 3 Sep 26, 2022
Png2Jpg tool will help you convert from png image format to jpg images format.

PNG 2 JPG All codes assume running from root directory. Please update the sys path at the beginning of the codes before running. Over View Png2Jpg too

Nguyễn Trường Lâu 2 Dec 27, 2021
利用近邻法的弱点实现图片缩小后变成另一张图

这是我一个视频的配套代码。 视频是:利用近邻法的弱点实现图片缩小后变成另一张图 https://www.bilibili.com/video/BV1Lf4y1r7dZ 配套代码中,仅generate.py是核心文件,其余的图片神马的,都是赠品。 这个核心文件利用了近邻法缩放的弱点,可以将图a的像素按

偶尔有点小迷糊 182 Dec 19, 2022
💯 Watermark your images with one line of command

Watermarker 💯 Watermark your images with one line of command 🧐 $ pip3 install

Orhan Emre Dikicigil 3 May 01, 2022
Fast Image Retrieval (FIRe) is an open source image retrieval project

Fast Image Retrieval (FIRe) is an open source image retrieval project release by Center of Image and Signal Processing Lab (CISiP Lab), Universiti Malaya. This project implements most of the major bi

CISiP Lab 39 Nov 25, 2022
A proof-of-concept implementation of a parallel-decodable PNG format

mtpng A parallelized PNG encoder in Rust by Brion Vibber [email protected] Backgrou

Brion Vibber 193 Dec 16, 2022