Tools,

Scoreboard OCR, tested

160

of 160 frames right, on both LED boards

Get the script

LED boards: clean first, then ssocr

Two drawn gym boards, filmed with tilt, blur, noise, shake and H.264. Right: home, away and clock all right.

Frames right of 160
Way Amber Red
Our script: cleanup, then ssocr 160 160
ScoreSight's PP-OCR, after our cleanup 160 160
ScoreSight's PP-OCR, accurate model 3 1
Cleanup, then Tesseract 7seg 142 131
Tesseract English 0 0
Apple Vision 0 0

I tuned on the amber board. I drew the red one, smaller and tilted the other way, after the settings were fixed.

The trap: unlit segments that glow

Top: a camera crop of an amber clock reading 6:28, with the unlit segments of the blank first digit glowing faintly. Bottom: the same crop after cleanup, black digits on white, and no blank digit.
PP-OCR read the top crop as 86:28. Both readers got 6:28 from the bottom one.

Our boards draw each unlit segment as a dim shape. With the same board drawn without the glow, ScoreSight's PP-OCR read 160 of 160.

The cleanup keeps the brightest color channel, then splits digits from background with Otsu's method. In our clips, the glow went with the background.

ssocr reads the colon as a 1

After the cleanup, ssocr read every score and period, but 0 clocks: 6:28 came out as 6128. One option fixed it:

ssocr -d -1 -M 1x60 clock.png

-M 1x60 skips marks under 60 pixels tall. The cleanup makes each crop 140 pixels tall, so the digits pass and the colon does not.

Run the script on your video

  1. Install the tools: brew install ffmpeg ssocr, then pip install pillow in a Python virtual environment.
  2. Get scoreboard.py (MIT license).
  3. Write boxes.json: one box a field, in pixels of the frame scaled to 1280x720. Draw each box tight around its digits.
  4. Run it, as below.
  5. In OBS, add a Text source for each field. On Windows, tick "Read from file". On a Mac, set "Text input mode" to "From file".
{"clock": [446, 173, 841, 319],
 "home": [279, 389, 437, 512],
 "away": [846, 404, 1002, 526],
 "period": [611, 414, 674, 511]}

python3 scoreboard.py boxes.json -i game.mp4

Everything after boxes.json goes to ffmpeg as input options. I tested video files only, not a live camera.

One bad read never airs

The script shows a new value only after 2 reads in a row agree. At 2 reads a second, each change shows 0.5 to 1 second late.

153 red-board frames right: PP-OCR's fast model after our cleanup

0 frames that showed a number never on the board

The script read 80 seconds of video in 7.6 seconds on our Mac, about 21 frames a second.

TV score bars: ScoreSight's engine wins

Frames right of 160
Way Dark bar Light bar
ScoreSight's PP-OCR, accurate model 160 160
Apple Vision 159 106
Cleanup, then Tesseract English 159 85
Tesseract English, digits only 77 120
Tesseract English, defaults 0 0

On the light bar, after the cleanup, Tesseract read most 9s as 3s. ScoreSight is free and reads cameras, capture cards, NDI, RTSP and screens.

Other scoreboard OCR apps

Score sheets on paper? Use the Actor

Our OCR Actor reads scanned PDFs and photos of documents into Markdown, tables included. It reads pages, not video.

Pages with their own text are free. A scanned page costs $0.006, and each run has a $0.00005 start fee at the default 1 GB.

How I tested it
  • Clips: make.py drew 4 scenes of 20 seconds a clip at 30 frames a second, and kept every 15th frame: 160 frames. Our own drawing, no game footage.
  • Boards: amber and red seven-segment digits with dim unlit segments, plus an amber control without the glow. TV bars: white digits on navy, dark digits on light gray in Arial Narrow, over moving stripes, with H.264 only.
  • One fixed box a field. Right means the value after the script's clean step, so 05 counts as 5.
  • ScoreSight's PP-OCR engine code at commit 8bef5a9a, with its PP-OCRv6 models and its whitelists, on the color crops, as the app feeds them. The app's default switches between its accurate and fast models. The fast model got 0 and 1 LED frames right. I did not run the app itself.
  • ssocr 2.26.0 and Tesseract 5.5.4 from Homebrew. 7seg from tessdata_ssd, page mode 8. Apple Vision: accurate, no language correction.
What I did not test
  • Real boards, real cameras, glare and night games.
  • Shot clocks, tenths of a second, and team fouls.
  • The ScoreSight app, its Tesseract models with its own cleanup, and the paid Scoreboard OCR app.
Sources

Two ways to skip the work

Run it yourself. Our Apify Actor turns scanned PDFs into Markdown, tables included.

Try the Actor

Or send us the scan. Tack, our AI, does the job for $29, up to 50 pages. First page free.

Get one page free

Questions people ask

Why does OCR read an 8 on a blank scoreboard digit?

When the unlit segments glow dimly, a blank digit looks like a faint 8. Make the crop black and white with a threshold above the glow, then read it.

Can ssocr read a scoreboard clock?

Yes, with two changes in our test: clean the crop to black digits on white, and add -M 1x60 so that ssocr skips the colon. Then it read 320 of 320 clocks.

Is ScoreSight free?

Yes. ScoreSight is open source under the MIT license, with builds for Windows, macOS (Apple silicon) and Linux. Its PP-OCR engine read both of our TV score bars on every frame.