Skip to content

Assistance required -- woud love your help!!! #2

Description

@gogitsome

I've desperately searched for ability to automatically extract manually highlighted text from photos and was delighted/relieved/excited to find your pyhighlight project. However, I can't seem to get it to work after downloading it and would greatly value your help!! I'm not completely technically illiterate, but I'm not overly familiar with using github and while I understand the fundamentals of coding, I have very limited proficiency in setting up the right environmental conditions to run and troubleshoot raw code like this (I can figure some stuff out by googling, looking at stack-exchange, etc., but sadly that only gets me so far...).

More specifically, after downloading the repository, installing things like pytesseract, opencvv, etc. and trying to run main.py, there seems to be some kind of issue with the very bottom of the code related to the line "parser.add_argument('img_input', type=Path, help="Input image")" and where you call main(args). Some kind of mismatch on the dictionary type I think. Based on random comments from others online, I can prevent the error by changing that line of code to the following instead:

parser.add_argument('--img_input', '--i', required = False, help = "Path to input image", default='/content/pyhighlight-ocr/Source')
parser.add_argument("-f", "--file", required=False)

However, after resolving that (not that I'm confident what I did was correct), I run into the following error, and have very little understanding on how to resolve it.
cv2.error: OpenCV(4.9.0) /Users/runner/work/opencv-python/opencv-python/opencv/modules/imgproc/src/color.cpp:196: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

Beyond that, do you have any instructions, a guide, or a help file of some kind that you would be willing/able to share? For example, where do I put the photo files I want to extract the highlighted text so that when I run the main.py file everything works automatically? Do the input files need certain names/file formats? Will this work on more than one photo at a time? Do I need to download any other programs to get this work? Basically, how does one get this code to work, practically speaking???

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions