/Img3Sum

summarize and translate text of the image into 3 sentences

Primary LanguagePythonApache License 2.0Apache-2.0

Img3Sum



License Python Flask

English | 한국어

Open-source project that supports translating, summarizing and converting images to text.

Core Concept

When there is an image with bunch of English sentences, we want to know what the key sentence is in that image.

This open source project helps you identify important sentences in the image at your earliest convenience.

Official Site

Img3Sum Offical Site

Official Document

Img3Sum Offical Document

Features

  1. Optical character recognition of an image file with English text

  2. Summarize extracted English text to 3 sentences

  3. Translate summarized English text to Korean

  4. (planned) check for grammatical errors in extracted English text

  5. (planned) Optical character recognition of an image file with Korean text

How to Run?

Prerequisites & Installation

Papago API

To use Papago translation, you must first register the application at the Naver Developer Center and get a client ID and client secret issued. write your private key in extract.py

>export CLIENT_ID='Your application's client id'
>export CLIENT_SECRET='Your application's client secret'

Visit Naver Developers and Log in. If you don't have an ID, please sign up.

  1. Select Application > Application Registration from the menu of Naver Developer Center.
  2. The application details on the Application Registration (API Application) page are as follows:
    a. Enter the name of the application you want to register in the application name.
    b. Select and add Papago translation from the API used.
    c. Add an environment to service the application in a non-logged open API service environment and enter the necessary details.
  3. When the application is registered normally, a submenu is created under the Application > My Application menu in the Naver Developer Center.
  4. By clicking the application name, you can check the client ID and client secret assigned to the application on the Overview tab.
  5. Add your Client ID and Client Secret in extract.py

Register Application

Check client ID and Client Secret


OCR

Install tesseract to use OCR application in OCR_RUN.py

  • Windows

https://github.com/UB-Mannheim/tesseract/wiki

  • Mac
brew install tesseract
  • Linux
sudo apt-get update
sudo apt-get install libleptonica-dev 
sudo apt-get install tesseract-ocr tesseract-ocr-dev
sudo apt-get install libtesseract-dev

Flask

To use Papago translation, Flask should be installed. Please refer to the flask installation, version page.


[Flask Installation]: https://flask.palletsprojects.com/en/2.0.x/installation/#python-version

[Version Check]: https://flask.palletsprojects.com/en/2.0.x/changes/#

Running on Localhost

Clone

  $ git clone https://github.com/Lainshower/Img3Sum.git

Run

  1. Create conda environment and install packages
  $ conda env create --file requirements.yaml
  1. Activate conda environment
  $ conda activate env
  1. Run app.py
  $ python app.py

Running on External-hosting

Ngrok

If you want to proceed with external hosting, Please refer to the Ngrock site.
If you don't have account, Please sign up.

Ngrok

Run

After downloaded Ngrock.exe from the above site, Please proceed in the following order.

  1. Please put in your autotoken that you received.
  ngrok authtoken "your authtoken"
  1. Please run ngrock using your port.
  ngrok.exe http "your port"
  1. You can access it by entering "http ://XXXXXXXXXXXXX.ngrok.io" in Forwarding from the outside.

Demos

License

Release

v0.0.1

Authors

License

Copyright © 2021 Lainshower.
This project is available under the Apache-2.0 License.