Skip to content

lingkuma/ohmytext

Repository files navigation

English | 中文

Ohmytext

A pure OCR-based game text recognition overlay solution that uses PaddleOCR to detect text line positions in game screenshots, merges nearby lines into larger rectangles, crops and sends them to LunaTranslator's OCR API for text recognition, generates corresponding rectangles on a webpage based on their positions, inserts the OCR text, and finally uses AI to correct the recognized text.

PaddleOCR Detection and Merge Results

TextDetection_ocr_debug.py

Algorithm Merge

In-Game Usage Demo

Game Screenshot

Webpage (with screenshot, opaque)

Webpage (transparent overlay)


Usage Guide

Determine PaddlePaddle and CUDA Version

Getting Started - PaddlePaddle

sdcb/PaddleSharp: .NET/C# binding for Baidu paddle inference library and PaddleOCR

Install CUDA

Install PaddleOCR

Text Detection Module - PaddleOCR Documentation Installation - PaddleOCR Documentation

Start the Overlay Web Service

cd ocr-server
npm install
npm start

Start LunaTranslator OCR API Service

HIllya51/LunaTranslator: Visual Novel Translator

Select an OCR engine, SnippingTool is recommended.

Note: We only use PaddleOCR's text box detection, not its OCR recognition, because PaddleOCR's OCR recognition performance is not ideal, while its text box detection works exceptionally well.

Start the OCR Recognition Program

Edit the .env file and set the variables

cd paddleOcr_archieve
python TextDetection_ocr_Cover_ai.py

Tips

Browser Transparency

iwill123/Window2Clear: A lightweight Windows desktop tool for controlling window transparency, centering, and shake effects.

Web Application Mode

Install the application as an app through the browser to display only the top bar without other browser elements.

About

oh god ! i want my text! just one click!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors