DMA902 / gocv-dnn-text-detection

GoCV implementation of the OpenCV text detection sample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GoCV DNN Text Detection

A implementation of the OpenCV /dnn/text_detection sample written in Go, and using the GoCV package. The implementation attempts to stay as faithful as the original C++ and Python sample provided in the OpenCV repository which uses the pre-trained EAST Text Detection Tensorflow Model.

Requirements

In order to run the example, the following must be installed:

  • GoCV v0.27
  • OpenCV 4.5.1

Instructions to install these two dependencies can be found here

The EAST Text Detection Model and the Text Recognition Model must be downloaded via the links in the Resources section below.

How to Run

Specify a file in the input if you wish to perform text detection against a static image.

go run main.go -input images/bottle.jpg -model frozen_east_text_detection.pb -ocr CRNN_VGG_BiLSTM_CTC.onnx 

Omit the input flag if you wish to perform text detection from a camera source. Other optional flags are available to adjust the default confidence levels.

Sample Results

When ran against the bottle.jpg sample image, the EAST Text Detection Model correctly identifies the text on this bottle. image

It is also able to correctly identify the words ALTO in this image below. image

Resources

About

GoCV implementation of the OpenCV text detection sample


Languages

Language:Go 100.0%