This is an image reader that is implemented using Python.
How it Works
The application asks the user to select a file(limited to file type PNG, JPG, JPEG) from the local or connected external strorage. Once the file is selected the image is preprocessed(resizing, dilation and erosion). It is then converted to string using Pytesseract and displayed on the interface using Streamlit.
Requirements.
- Numpy - Used For Image Resizing
- OpenCV - Used for Image Manipulation and Preprocessing
- PyTesseract - convert the image to String
- Streamlit - A Python Front-End Framework
How To Run It.
Use the command streamlit run thefilename.py in this case it is streamlit run streamlit_image_reader.py
Screenshots
- The Initial Part For Selecting an Image
- A Selected Image(Left) and Expected Text Output(Right)
** Some Information has been coloured out since this is a Picture from the internet
To Note
- The Application is accurate to some extent, that is when working with clear images, with colour contrasting foregrounds and backgrounds. The text should also be legible. If a trained model is to be used it would improve the accuracy significantly.
- I had an issue trying to upload the file using streamlit and still reading the same file from the storage. My workarond: Saving uploaded files to a new folder that is being called within the application when I attempt to read the Image.(Suggestions on how to improve this are highly welcomed)