Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 857 Bytes

README.md

File metadata and controls

50 lines (30 loc) · 857 Bytes

7-Segment-Digit-OCR

Red 7 segment digit OCR.


Install

git clone https://github.com/tdat97/7-Segment-Digit-OCR.git
cd 7-Segment-Digit-OCR
pip install -r requirments.txt

Example

from utils.ocr import OcrEngine
import matplotlib.pyplot as plt
img = plt.imread("./temp/test_digit.jpg")
plt.imshow(img)

test_digit

ocr_engine = OcrEngine("./models/7seg_ocr.h5")
print(ocr_engine(img)) # '267'

Loss Figure

epoch_loss


Prediction Plot

savef_plt