Skip to content

sho6000/Extractor

Repository files navigation

Extractor

Features

  • Extract text from images or documents using Azure AI Computer Vision.
  • Translate extracted English text to multiple languages with the Azure AI Translator.
  • Supports various image formats, including JPEG, PNG, and PDF.
  • User-friendly interface for easy image upload and documents.
  • Seamless integration with Streamlit for interactive usage.

Project Details

Azure Services Used

→This project utilizes a total of three Azure Technologies which are

  • Azure AI Services | Computer Vision
  • Azure AI Services | Translator
  • Azure App Service

→Brief Description on the Services Used:

  • Azure AI Services
    • Azure AI Translator: To provide translation services for the extracted text to multiple languages.
    • Azure Computer Vision: To perform optical character recognition(OCR) and extract text from images or documents.
  • Azure App Service: To host the streamlit on Azure portal.

Screenshot 2023-10-20 004332

Azure AI Services | Computer Vision

  • In this project, this service is employed to perform character extraction on images(PNG, JPEG). It can effortlessly extract text from the mentioned and even PDF files. With its robust capabilities, it's an essential component for extracting text from scanned documents or images and making it available for further processing within your application.

  • It takes in any type of document or images written in English and is sent to the service to extract data from it

  • Inside Computer Vision Studio under the Optical Character Recognition , the feature Extract Text from Image is used to do the work of getting any complicated written text from the different formates. Screenshot 2023-10-20 235851

  • The given image below is the example of an extracted text from a pdf file into a json format Screenshot 2023-10-21 001322 Screenshot 2023-10-21 000643

  • After the text is extracted it sent one by one inside a for-loop to the Azure Translator API.

  • Below given is the Azure postal under Computer Vision: Screenshot 2023-10-20 004839 Screenshot 2023-10-20 004646


Azure AI Services | Translator

  • This Azure Service plays a crucial role in making the application multilingual and accessible to a global audience. This service is used to translate the extracted English text into multiple languages. It enables the application to break language barriers, providing seamless communication and understanding for users regardless of their language preferences. This feature is especially valuable in applications where content needs to be translated or localized, broadening the reach and impact of your project.

  • In this the extracted text is sent and then each line-by-line is translated from English to any preferred language provided in the application.

  • Below given image is an example of the translated English text into "Spanish" and like-wise the user can translated into any desired language from English to any language. This is the translated language from the previous previous example in a JSON format. Screenshot 2023-10-21 000717

  • Below given is the Azure postal under Translator:

Screenshot 2023-10-20 004813 Screenshot 2023-10-20 004813


Azure App Service

  • Azure App Service serves as the hosting platform for the application's user interface. With this service, I can deploy my application in a convenient and scalable manner. It allows me to focus on the development of my application without the need to manage the underlying infrastructure. This simplifies the deployment process and ensures that the application is easily accessible to users via the Azure portal. Azure App Service provides a robust and reliable environment for your Streamlit-based application, making it available to a broad audience.

  • The entire code related from extraction, translations to Streamlit(web-application) is pushed to the Github.

  • After the code is pushed successfully, the github project URL is then given to the Azure App service and then the deployment starts automatically.

  • Below is the deployment status of the website. Screenshot 2023-10-21 002809

  • Below given is the Azure postal under App Service:

Screenshot 2023-10-20 004919

Python Package

The project uses the following Python libraries:

  • azure-cognitiveservices-vision-computervision: Python SDK for Azure Computer Vision.
  • requests: For making HTTP requests to the Azure Translator API.
  • streamlit: For creating the user interface and interactive web app.
  • opencv-python: For capturing and processing images from the webcam.
  • #created/requirements.txt

Usage

  1. Clone the repository:
git clone https://github.com/yourusername/your-repo.git
cd your-repo
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Run the Streamlit app:
streamlit run main_script.py

Steps to Use

  • First we select any image or PDF to upload by clicking on the Browse files button. Screenshot 2023-10-20 012629

  • After the the file is selected then the Azure AI Computer Vision processes and then a extracted text is displayed below. Note

  • This is the extracted text from the above image: Screenshot 2023-10-21 004420

  • Then we go down and select the preferred language you want to translate.
  • Once that is selected the Azure AI Translator API translates and displays the text below.
  • In this example I have chosen Arabic: Screenshot 2023-10-21 004641

Screenshots

Screenshot 2023-10-21 004839

Screenshot 2023-10-21 004815

About

FRT Internship Project | Streamlit App using Azure AI Services

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages