Skip to content

VisualOCR using a language model. Produces extremely clean output.

Notifications You must be signed in to change notification settings

NullMagic2/SmartOCR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

SmartOCR – extremely clean AI-powered results, no matter the layout!

What is SmartOCR?

Imagine if you could use an AI to understand and render your document for you. Well, that's what SmartOCR is. SmartOCR is an OCR tool powered by a visual language model. It extracts the text from a page and renders it into ASCII – no matter how complex the output is.

Example of OCR output of a very complicated image layout

Smart in all senses

SmartOCR isn't just smart because it is AI-powered. It was designed to do the OCR in small batches and then join the results together (this behavior can be tweaked in the settings). This means that while it is powerful, it can also handle very long, 400+ page documents. It also was designed with multithreading in mind, so it'll always attempt to stay as responsive as possible.

Sounds great! How do I run it?

  1. First, download LmStudio.
  2. Your next step is to download the language model. Due to how it is designed, a vision-enabled model is MANDATORY. At the time of my writing, the most powerful language model is Gemma 3 QAT. The 12B parameter model, which is reasonable enough in most cases, will take around 6-7 GB RAM. Download it here, clicking on the button "Use in LMStudio."

image

  1. When you are done, open the console and run the program with python SmartOCR.py. Install any necessary dependencies.

  2. Enjoy!

Known limitations

Please be aware that this program does not replicate the original document layout or extract any images. Those features are intended in the future, but are not guaranteed.

About

VisualOCR using a language model. Produces extremely clean output.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages