Giter Club home page Giter Club logo

fots's Introduction

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.

fots's People

Contributors

fakeryfx avatar

Stargazers

 avatar  avatar Xiangfei Kong avatar  avatar Andreas Chandra avatar  avatar Brahim LAMNAOUAR avatar kagemeka avatar Agatha Uy avatar BinZhu avatar Daniel Wei avatar  avatar TIAN Xin avatar  avatar  avatar  avatar  avatar  avatar  avatar Vaibhav Sharma avatar  avatar Y.L. avatar Daniel avatar jade avatar  avatar Rahil Vijay avatar  avatar  avatar  avatar  avatar  avatar Dorotea Jalušić avatar  avatar julie avatar ruRU R&D avatar  avatar MoniWong avatar Tanyapohn Patummasutr avatar  avatar GoodToSeeYou avatar Gábor Tóth avatar  avatar Ta Ko avatar fujingling avatar Zhuojun Sun CV Student avatar srikara avatar Wei avatar Abhijith E avatar Xinxin Zhu avatar Zhang Xiaopiao avatar Gaurav avatar LiuZhuang avatar wangb avatar  avatar  avatar Cai Zhuo avatar cgh avatar Cao Mạnh Hải avatar  avatar  avatar  avatar Thanh Tung Hoang avatar Avoy avatar  avatar  avatar mxlol233 avatar YiGao avatar brooklyn avatar Franco avatar  avatar  avatar 白衡斌 avatar  avatar  avatar Abhijith avatar Suvobrat Ghosh avatar Leon Ren avatar  avatar chenguitao avatar  avatar Liangjun Jiang avatar  avatar Mingyao Li avatar  avatar fuzzythecat avatar  avatar Zlobin Vladimir avatar Finnis avatar Richard Tseng avatar Vivek Prasad avatar  avatar Cloudmersive avatar Gerlando Savio Scibetta avatar chun avatar Prince Wang avatar  avatar Wang Jinkun avatar  avatar Jan avatar Stargazer avatar

Watchers

James Cloos avatar benzwt avatar  avatar  avatar KojiKobayashi avatar  avatar Zlobin Vladimir avatar  avatar Tran Ngoc Tu avatar Xue Ruiqing avatar  avatar Vinayak Arannil avatar  avatar  avatar Ankit Chadha avatar

fots's Issues

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!

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'

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.

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.

复现精度问题

Hi,我是FOTS的作者,由于公司限制和实现平台我们难以公开FOTS代码。看到了你在gitlab复现的FOTS,请问现在结果如何?有什么困难吗?希望可以帮助你一起复现出FOTS的精度

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.

license?

please add a license to the repo so it can be used by others without legal doubts. Even if you are stuck with RoIRotate someone else might be able to complete the work if you add a proper license. MIT or Apache 2 seem to be the most popular choices.

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.