{"id":29709169,"url":"https://github.com/jackvial/tuatara","last_synced_at":"2025-10-12T12:24:55.587Z","repository":{"id":189249442,"uuid":"623267451","full_name":"jackvial/tuatara","owner":"jackvial","description":"Tuatara: Deep Learning OCR Engine","archived":false,"fork":false,"pushed_at":"2023-09-04T15:37:38.000Z","size":98625,"stargazers_count":13,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-23T19:34:53.251Z","etag":null,"topics":["computer-vision","deep-learning","machine-learning","neural-networks","nlp","ocr","text-detection","text-recognition","transformer"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jackvial.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-04T03:05:22.000Z","updated_at":"2025-06-15T06:56:05.000Z","dependencies_parsed_at":"2023-08-19T01:20:58.458Z","dependency_job_id":null,"html_url":"https://github.com/jackvial/tuatara","commit_stats":null,"previous_names":["jackvial/tuatara"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jackvial/tuatara","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackvial%2Ftuatara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackvial%2Ftuatara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackvial%2Ftuatara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackvial%2Ftuatara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackvial","download_url":"https://codeload.github.com/jackvial/tuatara/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackvial%2Ftuatara/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278366702,"owners_count":25975102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","deep-learning","machine-learning","neural-networks","nlp","ocr","text-detection","text-recognition","transformer"],"created_at":"2025-07-23T19:34:52.600Z","updated_at":"2025-10-04T20:16:22.633Z","avatar_url":"https://github.com/jackvial.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tuatara: Deep Learning OCR Engine\n\nTuatara is a deep learning based OCR engine built on [CRAFT](https://github.com/clovaai/CRAFT-pytorch) for text detection, and [PARSEQ](https://github.com/baudm/parseq) for text recognition. This project is mainly a way for me to explore and experiment with vision and NPL model performance.\n\nThis code is currently a work in progress and is not intended for production use.\n\nThe project is named after the [tuatara](https://en.wikipedia.org/wiki/Tuatara), a lizard-like ([rhynchocephalia](https://en.wikipedia.org/wiki/Rhynchocephalia)) reptile native to New Zealand. Like it's lizard cousin's the tuatara has a parietal eye/third eye, symbolic of prescient abilities.\n\n## Example\n![funsd_0001129658 annotated with OCR results](images/funsd_0001129658_annotated_with_ocr_results.png)\n\n## Design Goals\n1. Easy to understand and hackable - All the main code is in tuatara.cpp and is currently about 500 LOC\n2. Preference for targeting CPU over GPU and focus on CPU performance\n3. Minimal dependencies and small binary - The plan is to replace both the two main dependencies OpenCV and LibTorch with [Eigen](https://eigen.tuxfamily.org/index.php?title=Main_Page). I believe this will support goals 1 and 2.\n\n## Setup\nRun `./setup.sh` or do following steps\n1. Download model weights `git clone https://huggingface.co/jackvial/tuatara-ocr-craft-and-parseq weights`\n2. Download LibTorch `curl -O https://download.pytorch.org/libtorch/cpu/libtorch-macos-2.0.0.zip \u0026\u0026 unzip libtorch-macos-2.0.0.zip`\n3. Install opencv `brew install opencv`\n4. Download and build pybind11 `git clone https://github.com/pybind/pybind11.git \u0026\u0026 cd pybind11 \u0026\u0026 mkdir build \u0026\u0026 cd build \u0026\u0026 cmake .. \u0026\u0026 make`\n\n## Build\n```\nmkdir -p build\ncd build\ncmake ..\n```\n\n## Run Example with Python Bindings\n- `cd bindings \u0026\u0026 python3 run_ocr.py`\n\n## Debug C++ in VSCode\n- Install the CodeLLDB VSCode extension\n- Set a breakpoint in examples/resume.cpp or tuatara.cpp\n- Run the \"Debug Resume Example\" under the VSCode \"Run and Debug\" tab\n\n## TODO\n- Replace LibTorch dependency with Eigen implementations of CRAFT and PARSEQ models.\n- Replace OpenCV dependency with Eigen. OpenCV is mainly used for connected component labeling and other post processing after the CRAFT model based text detection stage. OpenCV may still be used in python examples for debugging results.\n- Retrain PARSEQ model to support a larger character set. The current model does not support the space character.\n- Performance improvements: weight quantization, memory mapping, experiment with alternative model architectures, etc.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackvial%2Ftuatara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackvial%2Ftuatara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackvial%2Ftuatara/lists"}