Pytorch implementation of PSEnet with Pyramid Attention Network as feature extractor

Overview

Scene Text-Spotting based on PSEnet+CRNN

Pytorch implementation of an end to end Text-Spotter with a PSEnet text detector and CRNN text recognizer. We plan to grow this repository into an open research platform for multi-lingual text detection and recognition from natural scene images, targeted towards low-resource languages.

Requirements

  • Python 3.6.5
  • Pytorch 1.2
  • pyclipper
  • Polygon 3.0.8
  • OpenCV 3.4.1

Demo

  • Download the trained CRNN and PSEnet models from the links provided below.
  • Copy paths of the models and paste them in params.py
  • run end-end.py
python end-end.py --img [path to image] --e2e_config_name [end to end config name]

Pre-trained Models

Both PSEnet and CRNN pre-trained models can be found here: gdrive

  • the PSEnet model is a multi-lingual text detector, trained on MLT 2019. Works quite well!
  • the CRNN recognizes Hindi, Bangla, Malayalam, Kanada, Tamil, Telugu, Odia, Sanskrit, Marathi!

Download the models in models/ directory and modify params.py if required.

Training instructions

  • To train your own detection model refer to this file.
  • To train your own recognition model refer to this file.

Samples

Original Image

After Text Detection

After Text Recognition

Contributors

Work done as part of Internship with OffNote Labs.

References

  1. https://github.com/whai362/PSENet
  2. https://github.com/Holmeyoung/crnn-pytorch

If this repository helps you, please star it. Thank you!

You might also like...
Single Shot Text Detector with Regional Attention
Single Shot Text Detector with Regional Attention

Single Shot Text Detector with Regional Attention Introduction SSTD is initially described in our ICCV 2017 spotlight paper. A third-party implementat

🖺 OCR using tensorflow with attention

tensorflow-ocr 🖺 OCR using tensorflow with attention, batteries included Installation git clone --recursive http://github.com/pannous/tensorflow-ocr

A Tensorflow model for text recognition (CNN + seq2seq with visual attention) available as a Python package and compatible with Google Cloud ML Engine.
A Tensorflow model for text recognition (CNN + seq2seq with visual attention) available as a Python package and compatible with Google Cloud ML Engine.

Attention-based OCR Visual attention-based OCR model for image recognition with additional tools for creating TFRecords datasets and exporting the tra

Visual Attention based OCR
Visual Attention based OCR

Attention-OCR Authours: Qi Guo and Yuntian Deng Visual Attention based OCR. The model first runs a sliding CNN on the image (images are resized to hei

CNN+Attention+Seq2Seq
CNN+Attention+Seq2Seq

Attention_OCR CNN+Attention+Seq2Seq The model and its tensor transformation are shown in the figure below It is necessary ch_ train and ch_ test the p

An Implementation of the FOTS: Fast Oriented Text Spotting with a Unified Network

FOTS: Fast Oriented Text Spotting with a Unified Network Introduction This is a pytorch re-implementation of FOTS: Fast Oriented Text Spotting with a

TensorFlow Implementation of FOTS, Fast Oriented Text Spotting with a Unified Network.
TensorFlow Implementation of FOTS, Fast Oriented Text Spotting with a Unified Network.

FOTS: Fast Oriented Text Spotting with a Unified Network I am still working on this repo. updates and detailed instructions are coming soon! Table of

This is the implementation of the paper
This is the implementation of the paper "Gated Recurrent Convolution Neural Network for OCR"

Gated Recurrent Convolution Neural Network for OCR This project is an implementation of the GRCNN for OCR. For details, please refer to the paper: htt

EQFace: An implementation of EQFace: A Simple Explicit Quality Network for Face Recognition
EQFace: An implementation of EQFace: A Simple Explicit Quality Network for Face Recognition

EQFace: A Simple Explicit Quality Network for Face Recognition The first face recognition network that generates explicit face quality online.

Comments
  • No module named 'util.tflogger'

    No module named 'util.tflogger'

    @ekshaks @rahzaazhar When running

    python ./Detection/PSEnet/train_ic19MLT.py
    

    I am getting error:

    (final) home@home-desktop:~/p8/PAN-PSEnet$ python ./Detection/PSEnet/train_ic19MLT.py
    Traceback (most recent call last):
      File "./Detection/PSEnet/train_ic19MLT.py", line 22, in <module>
        from util.tflogger import tfLogger 
    ModuleNotFoundError: No module named 'util.tflogger'
    
    opened by ghost 3
  • recognize pth file

    recognize pth file

    Hi, thank you for your excellent job. I found a few pth files in your recognition folder on gdrive and downloaded them all. But I don't know which one is the model to recognize which language. I choosed the 'hin_best.pth' to recognize the image in your demo folder, but it seems work not quite well and I can not read Hindi. So, please tell me the meaning of abbreviation in your file name, thanks again!!

    opened by daben233-bit 2
  • Documentation on how to train, along with only detecting text boxes

    Documentation on how to train, along with only detecting text boxes

    @rahzaazhar @ekshaks Thank you for your hard work,

    • If I want to only detect the text boxes of an image, what command shall I run
    • Documentation on how to train
    opened by ghost 0
Owner
azhar shaikh
azhar shaikh
PSENet - Shape Robust Text Detection with Progressive Scale Expansion Network.

News Python3 implementations of PSENet [1], PAN [2] and PAN++ [3] are released at https://github.com/whai362/pan_pp.pytorch. [1] W. Wang, E. Xie, X. L

null 1.1k Dec 24, 2022
Repository for Scene Text Detection with Supervised Pyramid Context Network with tensorflow.

Scene-Text-Detection-with-SPCNET Unofficial repository for [Scene Text Detection with Supervised Pyramid Context Network][https://arxiv.org/abs/1811.0

null 121 Oct 15, 2021
CUTIE (TensorFlow implementation of Convolutional Universal Text Information Extractor)

CUTIE TensorFlow implementation of the paper "CUTIE: Learning to Understand Documents with Convolutional Universal Text Information Extractor." Xiaohu

Zhao,Xiaohui 147 Dec 20, 2022
MORAN: A Multi-Object Rectified Attention Network for Scene Text Recognition

MORAN: A Multi-Object Rectified Attention Network for Scene Text Recognition Python 2.7 Python 3.6 MORAN is a network with rectification mechanism for

Canjie Luo 595 Dec 27, 2022
📷 This repository is focused on having various feature implementation of OpenCV in Python.

?? This repository is focused on having various feature implementation of OpenCV in Python. The aim is to have a minimal implementation of all OpenCV features together, under one roof.

Aditya Kumar Gupta 128 Dec 4, 2022
Code for CVPR2021 paper "Learning Salient Boundary Feature for Anchor-free Temporal Action Localization"

AFSD: Learning Salient Boundary Feature for Anchor-free Temporal Action Localization This is an official implementation in PyTorch of AFSD. Our paper

Tencent YouTu Research 146 Dec 24, 2022
A python scripts that uses 3 different feature extraction methods such as SIFT, SURF and ORB to find a book in a video clip and project trailer of a movie based on that book, on to it.

A python scripts that uses 3 different feature extraction methods such as SIFT, SURF and ORB to find a book in a video clip and project trailer of a movie based on that book, on to it.

tooraj taraz 3 Feb 10, 2022
Using Opencv ,based on Augmental Reality(AR) and will show the feature matching of image and then by finding its matching

Using Opencv ,this project is based on Augmental Reality(AR) and will show the feature matching of image and then by finding its matching ,it will just mask that image . This project ,if used in cctv then it will detect black listed people if mentioned properly with their images.

null 1 Feb 13, 2022
textspotter - An End-to-End TextSpotter with Explicit Alignment and Attention

An End-to-End TextSpotter with Explicit Alignment and Attention This is initially described in our CVPR 2018 paper. Getting Started Installation Clone

Tong He 323 Nov 10, 2022
Implement 'Single Shot Text Detector with Regional Attention, ICCV 2017 Spotlight'

SSTDNet Implement 'Single Shot Text Detector with Regional Attention, ICCV 2017 Spotlight' using pytorch. This code is work for general object detecti

HotaekHan 84 Jan 5, 2022