Skip to content

purylte/ocr-webui

Repository files navigation

OCR WebUI

OCR WebUI allows users to upload images, crop specific sections, and extract text using Optical Character Recognition (OCR). The project is built in Go, leveraging gosseract for OCR and HTMX for seamless interactions while being lightweight.

Installation

Docker

  1. Run docker run -p 3000:3000 ghcr.io/purylte/ocr-webui:latest
  2. Open http://localhost:3000/app

Local

  1. Ensure Tesseract and Leptonica is installed
  2. Add required languages by placing traineddata file in your tesseract installation.
  3. Run ./ocr-webui
  4. Open http://localhost:3000/app

Development

Using Dev Container (VS Code)

  1. Ensure Docker and Dev Containers extension is installed
  2. Open this project in VS Code
git clone https://github.com/purylte/ocr-webui.git
code ocr-webui
  1. Run "Dev Containers: Reopen in Container" in VS Code
  2. Run air to start hot reload

Manually

  1. Clone the repository
git clone https://github.com/purylte/ocr-webui.git
cd ocr-webui
  1. Install Tesseract and Leptonica

  2. Install the required Go tools:

go install github.com/a-h/templ/cmd/templ@latest
go install github.com/air-verse/air@latest```
  1. Run air to start hot reload

Todo

  1. Preprocess image before doing OCR using gocv
  2. Test
  3. Better logging & error handling

Contributing

Feel free to fork this project, submit issues, and create pull requests. Contributions are welcome!

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages