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

Related tags

Computer Vision FOTS
Overview

FOTS: Fast Oriented Text Spotting with a Unified Network

Introduction

This is a pytorch re-implementation of FOTS: Fast Oriented Text Spotting with a Unified Network. The features are summarized blow:

  • Only detection part is implemented.

Contents

  1. Installation
  2. Download
  3. Train
  4. Test

Installation

  1. Any version of torch version >= 0.3.1 should be ok.

Download

  1. Models trained on ICDAR 2015 (training set) + ICDAR 2017 (training set)

Train

If you want to train the model, you should provide the dataset path, in the dataset path, a separate gt text file should be provided for each image and run

python main_train.py

Test

run

python eval.py

a text file will be then written to the output path.

Comments
  • ModuleNotFoundError: No module named 'pretrainedmodels'

    ModuleNotFoundError: No module named 'pretrainedmodels'

    Traceback (most recent call last): File "eval.py", line 6, in from models.FOTS import FOTS File "/home/kobe/workspace/FOTS/models/init.py", line 1, in from models.FOTS import FOTS File "/home/kobe/workspace/FOTS/models/FOTS.py", line 3, in import pretrainedmodels as pm ModuleNotFoundError: No module named 'pretrainedmodels' I don't know how to fix the above problem.

    opened by poppy007 2
  • ModuleNotFoundError: No module named 'logger.logger'

    ModuleNotFoundError: No module named 'logger.logger'

    Get this error on running python3 eval.py

    make: Entering directory '/home/sam/CVPlayground/FOTS/utils/lanms'
    make: 'adaptor.so' is up to date.
    make: Leaving directory '/home/sam/CVPlayground/FOTS/utils/lanms'
    Loading checkpoint: models/retrained_model.pth.tar ...
    Traceback (most recent call last):
      File "eval.py", line 54, in <module>
        main(args)
      File "eval.py", line 33, in main
        model = load_model(model_path, with_gpu)
      File "eval.py", line 15, in load_model
        checkpoints = torch.load(model_path)
      File "/home/sam/.local/lib/python3.6/site-packages/torch/serialization.py", line 368, in load
        return _load(f, map_location, pickle_module)
      File "/home/sam/.local/lib/python3.6/site-packages/torch/serialization.py", line 542, in _load
        result = unpickler.load()
    ModuleNotFoundError: No module named 'logger.logger'
    
    opened by Samleo8 1
  • What are metric values for the re-implementation?

    What are metric values for the re-implementation?

    @xieyufei1993 What results is it possible to achieve with the code on ICDAR 2015/ICDAR 2017? @MaxwellRebo, @Samleo8, @thuyngch, may be you can comment, since you did some updates on your forks. What results did you manage to get?

    opened by Wovchena 1
  • poly in wrong direction?

    poly in wrong direction?

    hey, i've tried to train your model with RCTW dataset. It works. However:

    Epoch 1 / 30000 126 poly in wrong direction poly in wrong direction poly in wrong direction poly in wrong direction poly in wrong direction

    Then I had to stop.

    The label looks as:

    390,902,1856,902,1856,1225,390,1225,0,"金氏眼镜" 1875,1170,2149,1170,2149,1245,1875,1245,0,"创于1989" 2054,1277,2190,1277,2190,1323,2054,1323,0,"城建店" ...

    Seems that it works in other models' training like ctpr. Is there anything wrong? I'm really confused.

    opened by iPrayerr 0
  • RuntimeError: expected a non-empty list of Tensors

    RuntimeError: expected a non-empty list of Tensors

    Hi @xieyufei1993, when training model I got an error such as: (fots) loitg@loitg-Precision-T3600:~/Desktop/tu_workspace/FOTS$ python main_train.py use config: initial_epoch 0 epoch_num 30000 lr 0.001 decay 0.0005 use_gpu True batch_size 64 num_workers 10 optmizer RMSprop betas (0.5, 0.999) epsilon 0.0001 shrink_side_ratio 0.6 shrink_ratio 0.2 model FOTS patience 2 load_weights False lambda_inside_score_loss 4.0 lambda_side_vertex_code_loss 1.0 lambda_side_vertex_coord_loss 1.0 load_model_path checkpoints/model.pth save_path save_model/ total_img 16243 validation_split_ratio 0.1 max_train_img_size 736 max_predict_img_size 2400 parse <bound method parse of <config.DefaultConfig object at 0x7fe4ff6d5cc0>> end the parse!!!


    Epoch 1 / 30000 Traceback (most recent call last): File "main_train.py", line 95, in main() File "main_train.py", line 90, in main save_step=5, weight_decay=weight_decay) File "main_train.py", line 32, in train for i, (img, score_map, geo_map, training_mask) in enumerate(trainloader): File "/home/loitg/miniconda3/envs/fots/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 582, in next return self._process_next_batch(batch) File "/home/loitg/miniconda3/envs/fots/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch raise batch.exc_type(batch.exc_msg) RuntimeError: Traceback (most recent call last): File "/home/loitg/miniconda3/envs/fots/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop samples = collate_fn([dataset[i] for i in batch_indices]) File "/home/loitg/Desktop/tu_workspace/FOTS/data/dataset.py", line 672, in collate_fn images = torch.stack(images, 0) RuntimeError: expected a non-empty list of Tensors

    How to fix this error ?. I hope to see your reply soon.

    opened by trantuuit 2
  • Training on own data

    Training on own data

    How should I proceed to train on my own data. I didn't understand the meaning of separate gt text file for each image. What should the image be and the corresponding gt text file content? Thanks a lot!

    opened by Abhijith9 0
Owner
GeorgeJoe
Focus on NLP and OCR
GeorgeJoe
FOTS Pytorch Implementation

News!!! Recognition branch now is added into model. The whole project has beed optimized and refactored. ICDAR Dataset SynthText 800K Dataset detectio

Ning Lu 599 Dec 19, 2022
The code of "Mask TextSpotter: An End-to-End Trainable Neural Network for Spotting Text with Arbitrary Shapes"

Mask TextSpotter A Pytorch implementation of Mask TextSpotter along with its extension can be find here Introduction This is the official implementati

Pengyuan Lyu 261 Nov 21, 2022
An Implementation of the alogrithm in paper IncepText: A New Inception-Text Module with Deformable PSROI Pooling for Multi-Oriented Scene Text Detection

InceptText-Tensorflow An Implementation of the alogrithm in paper IncepText: A New Inception-Text Module with Deformable PSROI Pooling for Multi-Orien

GeorgeJoe 115 Dec 12, 2022
Total Text Dataset. It consists of 1555 images with more than 3 different text orientations: Horizontal, Multi-Oriented, and Curved, one of a kind.

Total-Text-Dataset (Official site) Updated on April 29, 2020 (Detection leaderboard is updated - highlighted E2E methods. Thank you shine-lcy.) Update

Chee Seng Chan 671 Dec 27, 2022
An Implementation of the seglink alogrithm in paper Detecting Oriented Text in Natural Images by Linking Segments

Tips: A more recent scene text detection algorithm: PixelLink, has been implemented here: https://github.com/ZJULearning/pixel_link Contents: Introduc

dengdan 484 Dec 7, 2022
RRD: Rotation-Sensitive Regression for Oriented Scene Text Detection

RRD: Rotation-Sensitive Regression for Oriented Scene Text Detection For more details, please refer to our paper. Citing Please cite the related works

Minghui Liao 102 Jun 29, 2022
Source code of RRPN ---- Arbitrary-Oriented Scene Text Detection via Rotation Proposals

Paper source Arbitrary-Oriented Scene Text Detection via Rotation Proposals https://arxiv.org/abs/1703.01086 News We update RRPN in pytorch 1.0! View

null 428 Nov 22, 2022
This project modify tensorflow object detection api code to predict oriented bounding boxes. It can be used for scene text detection.

This is an oriented object detector based on tensorflow object detection API. Most of the code is not changed except for those related to the need of

Dafang He 30 Oct 22, 2022
Multi-Oriented Scene Text Detection via Corner Localization and Region Segmentation

This is the official implementation of "Multi-Oriented Scene Text Detection via Corner Localization and Region Segmentation". For more details, please

Pengyuan Lyu 309 Dec 6, 2022
TextBoxes++: A Single-Shot Oriented Scene Text Detector

TextBoxes++: A Single-Shot Oriented Scene Text Detector Introduction This is an application for scene text detection (TextBoxes++) and recognition (CR

Minghui Liao 930 Jan 4, 2023
TextBoxes: A Fast Text Detector with a Single Deep Neural Network https://github.com/MhLiao/TextBoxes 基于SSD改进的文本检测算法,textBoxes_note记录了之前整理的笔记。

TextBoxes: A Fast Text Detector with a Single Deep Neural Network Introduction This paper presents an end-to-end trainable fast scene text detector, n

zhangjing1 24 Apr 28, 2022
Code for the paper STN-OCR: A single Neural Network for Text Detection and Text Recognition

STN-OCR: A single Neural Network for Text Detection and Text Recognition This repository contains the code for the paper: STN-OCR: A single Neural Net

Christian Bartz 496 Jan 5, 2023
text detection mainly based on ctpn model in tensorflow, id card detect, connectionist text proposal network

text-detection-ctpn Scene text detection based on ctpn (connectionist text proposal network). It is implemented in tensorflow. The origin paper can be

Shaohui Ruan 3.3k Dec 30, 2022
keras复现场景文本检测网络CPTN: 《Detecting Text in Natural Image with Connectionist Text Proposal Network》;欢迎试用,关注,并反馈问题...

keras-ctpn [TOC] 说明 预测 训练 例子 4.1 ICDAR2015 4.1.1 带侧边细化 4.1.2 不带带侧边细化 4.1.3 做数据增广-水平翻转 4.2 ICDAR2017 4.3 其它数据集 toDoList 总结 说明 本工程是keras实现的CPTN: Detecti

mick.yi 107 Jan 9, 2023
Detecting Text in Natural Image with Connectionist Text Proposal Network (ECCV'16)

Detecting Text in Natural Image with Connectionist Text Proposal Network The codes are used for implementing CTPN for scene text detection, described

Tian Zhi 1.3k Dec 22, 2022
Handwritten Text Recognition (HTR) system implemented with TensorFlow (TF) and trained on the IAM off-line HTR dataset. This Neural Network (NN) model recognizes the text contained in the images of segmented words.

Handwritten-Text-Recognition Handwritten Text Recognition (HTR) system implemented with TensorFlow (TF) and trained on the IAM off-line HTR dataset. T

null 27 Jan 8, 2023
YOLOv5 in DOTA with CSL_label.(Oriented Object Detection)(Rotation Detection)(Rotated BBox)

YOLOv5_DOTA_OBB YOLOv5 in DOTA_OBB dataset with CSL_label.(Oriented Object Detection) Datasets and pretrained checkpoint Datasets : DOTA Pretrained Ch

null 1.1k Dec 30, 2022
The code for “Oriented RepPoints for Aerail Object Detection”

Oriented RepPoints for Aerial Object Detection The code for the implementation of “Oriented RepPoints”, Under review. (arXiv preprint) Introduction Or

WentongLi 207 Dec 24, 2022