Code Monkey home page Code Monkey logo

image-to-text's Introduction

image-to-text

Video -> Text extraction

Extracting text from video with pytesseract.

First clone the repository.

git clone https://github.com/saty101/image-to-text.git
cd image-to-text/
pip install -r requirements.txt

If you encounter file note found as below:

FileNotFoundError: [Errno 2] No such file or directory: 'tesseract'

Run the following command -

apt install tesseract


You can download a youtube video using the youtube_video.py and change the link to your desired video.

python youtube_video.py

Since we mainly work with news videos/videos with text embedded in it, it will be saved as news.mp4 in the same directory. The mp4 file is downloaded in the same directory.


For annotating the videos, run

python main.py

This will create a labeled_news.mp4 along with annotations.txt where you can find the annotated video along with a file of captions produced in the video.

You can also find the kaggle notebook where you can find the code with embedded videos(along with the results)

The full workflow code is in this notebook which shows how annotations with one image and then creating the whole vide0 but the videos are not visible in the jupyter notebook. Colab notebook link of the same notebook - link

Simply change the link = <desired link> to annotate the video you want to.

Colab noteboook but the videos can only be downloaded as embedded videos in colab crash and cause the runtime to start again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.