Skip to content

Azure-powered OCR and Translator solution. Break language barriers effortlessly with its user-friendly interface. Empower communication globally.

License

Notifications You must be signed in to change notification settings

meaviral17/LingualLens-Project

Repository files navigation

The Lingual Lens Project

GitHub Issues Contributions welcome License Hits

Project Description

Lingual Lens tackles the prevalent challenge of language barriers in global communication. The project is a response to the existing problem where individuals from non-English-speaking communities face difficulties in understanding English content in documents and images. By providing a seamless solution for text recognition and translation, Lingual Lens transforms this challenge into an opportunity for inclusive communication. It innovatively leverages Azure technologies, creating a novel solution that transcends traditional language barriers. The project's goal is to bridge linguistic divides, empower marginalized communities, and foster a more connected and inclusive global society.

Project Details


Table of Contents


Tech Stack

  • Frontend:
    • Streamlit (Python library for creating interactive web applications)
  • Backend:
    • Azure App Service (Cloud-based platform for deploying and managing web applications)
  • OCR and Translation Services:
    • Azure AI Document Intelligence (for detecting text from images and documents)
    • Azure AI Translator (for translating recognised text into multiple languages)
  • Development Environment:
    • Visual Studio Code (Code editor for efficient development)
  • Cloud Management:
    • Microsoft Azure Portal (for centralized management, configuration, and monitoring)
  • Programming Language:
    • Python (utilized for backend development and integration with Streamlit)
  • Version Control:
    • Git (for version control and collaborative development)
  • Dependency Management:
    • Python Pip (for managing Python package dependencies)

Key Features

  1. Multilingual Text Recognition: Utilize cutting-edge OCR technology to accurately recognize text from images and documents in various formats, including JPEG, PNG, and PDF.
  2. Translation Diversity: Seamlessly translate retrieved text into over 50+ languages, promoting inclusive communication for individuals in diverse communities.
  3. User-Friendly Interface: Experience a smooth and intuitive interface designed for easy image uploads and document processing, ensuring accessibility for users of all technical backgrounds.
  4. Streamlined Deployment: LinguaLens is deployed effortlessly with Azure App Service, providing a scalable and reliable platform for managing the web application.
  5. Azure Integration: Leverage the power of Azure AI Document Intelligence and Azure AI Translator for robust text detection, translation, and seamless integration with the LinguaLens application.
  6. Global Collaboration: Foster collaboration in a corporate setting by enabling smooth communication between colleagues who speak different languages.
  7. Educational Empowerment: Empower individuals from marginalized communities with access to information in their native language, potentially opening doors to educational opportunities and knowledge.

Explaination of Azure Services Used

1. Azure AI Translator

  • The Translator service plays a pivotal role in making the application globally accessible by translating extracted English text into multiple languages. This functionality eradicates language barriers, fostering effective communication and understanding among users with diverse language preferences.

  • The service operates by sending the extracted text, translating each line sequentially from English to the user's preferred language. The translated output, exemplified in JSON format, demonstrates the service's versatility.

  • Attached below are 2 examples which demonstrate how the input text is converted to a request object. Then, the AI Translator detects the language of the input, and converts the input string to the target language. This data is stored as the response object. (JSON objects)

  • Example 1 image

  • Example 2 image

  • Attached below is the "translator1700" resource we have created for this project.

image

2. Azure AI Document Intelligence (Computer Vision)

  • Incorporated for character extraction from images (PNG, JPEG), and PDFs, Azure AI Document Intelligence (Computer Vision) excels in extracting text from diverse formats. Its advanced capabilities make it a vital component for processing scanned documents or images, with seamless integration into applications.

  • The Optical Character Recognition (OCR) feature within the Computer Vision Studio facilitates the extraction of intricate written text from various formats. The resulting text, exemplified in JSON format, showcases the service's proficiency in handling complex document structures.

  • Post-extraction, each line of text undergoes translation through the Azure Translator API, enhancing the application's multilingual functionality.

  • Case 1: This is the home page of a popular open-source project. Notice how the text is getting recognised.

image

  • Case 2: This is an event poster. It demonstrates the utility of Azure AI Document Intelligence.

image

  • Attached below is the "vision1700" Computer Vision resource we have created for this project.

image

3. Azure App Service

  • Functioning as the hosting platform for the application's user interface, Azure App Service streamlines deployment and ensures scalability. This service simplifies the development process by eliminating the need to manage underlying infrastructure, providing a reliable environment for Streamlit-based applications.

  • As shown in the screenshot below, we can see the App Service "linguallens" we have created to deploy our project using Azure App Service in the East Asia sector. It is configured to a B1 App Service Plan.

image

  • Attached below is the configured Linux plan "ASP-azureintern-ab84" for our App Service Deployment.

image

  • This is the startup configuration for "linguallens" in order to successfully start the deployed web app.

image

  • The deployment process involves pushing the entire code, covering text recognition, translations, and the Streamlit web application, to GitHub. Upon successful code push, the GitHub project URL is provided to the Azure App service, triggering an automatic deployment process.
  • The workflow run of the project deployment is attached below: image image image

4. Microsoft Azure Portal

  • Serves as the central hub for managing and monitoring the deployed application. The portal provides a comprehensive view of the application's status, including deployment details, making it a vital tool for overseeing the entire project.

image

  • Given below is the resource group "azureintern", we have created to keep track of all Azure resources created for this project, and track their performance with a single dashboard interface.

image


Clone and run this project

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

Steps to use LingualLens

  1. Commence the process by initiating the upload of any image or PDF through the Browse files button. Commencement

-> The WebApp also contains a side menu offering various functionalities like Rerun, Record screencast, Print and Theme-related settings:

image


  1. Following the selection of the file, the Azure AI Document Intelligence engages in processing, culminating in the presentation of the extracted text. Let's take the file given below as input. Text Extraction Process

  1. Scrutinize the extracted text obtained from the provided image: Extracted Content

  1. Proceed by navigating downwards to opt for the preferred language for translation.
  2. Upon language selection, the Azure AI Translator API undertakes the translation process, showcasing the translated text underneath. Extracted Content

  1. Observe the translated text in the chosen languages, illustrated here with Hindi, Tamil, Spanish, and Greek options:

a. Spanish Translation Outcome


b. Tamil Translation Outcome


c. Hindi Translation Outcome


d. Greek Translation Outcome


About

Azure-powered OCR and Translator solution. Break language barriers effortlessly with its user-friendly interface. Empower communication globally.

Topics

Resources

License

Stars

Watchers

Forks

Languages