Coder Social home page Coder Social logo

text-detection's People

Contributors

azmiozgen avatar azmiozgenrempeople avatar dependabot[bot] avatar feeeper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

text-detection's Issues

SyntaxError: invalid syntax

yin@yin-00:~/text-detection-master/text-detection-master$ python3 text_detect.py -i ./images/scenetext01.jpg -f
File "text_detect.py", line 130
def getStrokes(self, (x, y, w, h)):
^
SyntaxError: invalid syntax

yin@yin-00:~/text-detection-master/text-detection-master$ python3 text_detect.py -i ./images/scenetext01.jpg -o ./output
File "text_detect.py", line 130
def getStrokes(self, (x, y, w, h)):
^
SyntaxError: invalid syntax

How should this problem be solved?

Thank you for your code. I have a question

In the process of using your code, I encountered a small problem, that is, only a part of the text can be recognized. I guess the recognition threshold needs to be adjusted. Because of the time constraint, I didn't see your code well, so I want to ask you how to adjust the threshold value!

Why did my test result so bad?

Thank you for sharing your code.

When I run your code for test image, I get the result here.

result

It seems to be much worse than your result. But I have no idea why that happens. Can you help me solve this problem?

how can I use python pytesseract

Thanks for sharing. When I run the code, there'is some errors that I have no idea to work out, " File "D:\Program Files\Anaconda3\envs\test_py2\lib\site-packages\pytesseract\pytesseract.py", line 116, in run_tesseract
raise TesseractError(status_code, get_errors(error_string))
pytesseract.pytesseract.TesseractError: (1, u'Error opening data file ./tessdata/eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory. Failed loading language 'eng' Tesseract couldn't load any languages! Could not initialize tesseract.')"
Would you please tell me something that I need to check out?
非常感谢,尝试了先使用短的代码来实验,还是会报同样的error,实验和error如下:

from PIL import Image
import pytesseract
imageObject=Image.open('test.jpg')
print (imageObject)
<PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=800x600 at 0x5BE4CF8>
print (pytesseract.image_to_string(imageObject))
Traceback (most recent call last):
File "", line 1, in
File "D:\Program Files\Anaconda3\envs\test_py2\lib\site-packages\pytesseract\pytesseract.py", line 193, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File "D:\Program Files\Anaconda3\envs\test_py2\lib\site-packages\pytesseract\pytesseract.py", line 140, in run_and_get_output
run_tesseract(**kwargs)
File "D:\Program Files\Anaconda3\envs\test_py2\lib\site-packages\pytesseract\pytesseract.py", line 116, in run_tesseract
raise TesseractError(status_code, get_errors(error_string))
pytesseract.pytesseract.TesseractError: (1, u'Error opening data file ./tessdata/eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory. Failed loading language 'eng' Tesseract couldn't load any languages! Could not initialize tesseract.')

Getting TypeError

Command ran: python detect.py -i input_scenetext01.jpg

Output:

[================================================================] 1524 of 1524
0 regions left.
Traceback (most recent call last):
File "C:\Workspaces\Python\text-detection\src\detect.py", line 41, in
res = td.detect()
File "C:\Workspaces\Python\text-detection\src\lib\text_detection.py", line 280, in detect
for i, (contour, hierarchy) in enumerate(zip(contours, hierarchies[0])):
TypeError: 'NoneType' object is not subscriptable

requirements ( pip freeze ):

contourpy==1.2.0
cycler==0.12.1
fonttools==4.47.0
importlib-resources==6.1.1
kiwisolver==1.4.5
matplotlib==3.8.2
numpy==1.26.3
opencv-python==4.9.0.80
packaging==23.2
pillow==10.2.0
progressbar==2.5
pyparsing==3.1.1
pytesseract==0.3.10
python-dateutil==2.8.2
scipy==1.11.4
six==1.16.0
zipp==3.17.0

Error with no detection happen!

I've executed this command python text_detect.py -i images/scenetext01.jpg , but got this error

Traceback (most recent call last): File "text_detect.py", line 344, in <module> res = td.detect() File "text_detect.py", line 286, in detect image, contours, hierarchies = cv2.findContours(dilated, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) ValueError: not enough values to unpack (expected 3, got 2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.