Skip to content

Training extention for the TextBPN repository. The official repository can be found here: https://github.com/GXYM/TextBPN

License

Notifications You must be signed in to change notification settings

mohamadmansourX/TextBPN-Training

Repository files navigation

This is an UNOFFICIAL repo for the TextBPN (ICCV2021).

For the Original repo visit the following URL

The original repo lacks the training code for now

Main Contributions: Training code, Config Support, Colab Notebook

Open In Colab Wandb Logs Sample

TextBPN-Training

A training extention for the paper: Adaptive Boundary Proposal Network for Arbitrary Shape Text Detection.

Mainly this extension provides a training script for the TextBPN model - my_train_model.py

Contents

The Original Repository complete code (training) is not currently available and will be released in TextBPN V2. Issue

My Contribution

Meanwhile and until the release of TextBPN V2 source code, I developed a training extention for the TextBPN with a Config File support. All you have to do is play with the Config file and run the following script:

python my_train_model.py

Wandb is suported as well incase anyone interested in the emerging ML dashboard.

All you have to do is to enable it in the config file under "Wandb" section.

TODO List

  • Training; Added training scripts for both pretrained and from scratch model.
  • Configuration file to easily customize things
  • Wandb API Support (Just add enable it in the Config file.
  • Add more options for checkpoints managment
  • Add more options for the Config File

Note: Their is a a small error in the validation step. I'll be fixing it soon.

Prerequisites:

GPU Inference:

  python 3.9;  
  PyTorch 1.7.0;   
  Numpy >=1.2.0   
  CUDA 11.1;  
  GCC >=10.0;   
  NVIDIA GPU(with 11G or larger GPU memory for inference);

Non-GPU Inference:

1- Skip the above GPU-related requirments

2- Make sure to have good RAMs

3- Set the Config use_gpu to False

and your can run the inference using CPU

Dataset Links

  1. CTW1500
  2. TD500
  3. Total-Text

Models

Training

Configuration Settings:

Change the Config file as needed.

Training:

run:

python my_train_model.py

Few steps demo using pretrained checkpoint (ICCV2021_model/TD500/TextBPN_resnet50_680.pth)

Terminal Logs:

Wandb:

Evaluation

run:

sh eval.sh

Final Note

Due to the high requirments of this github project (GPU 11GB+), my experiments were done using "cpu" device;

which is now made easy by just setting "use_gpu" to False using the Config file :).

About

Training extention for the TextBPN repository. The official repository can be found here: https://github.com/GXYM/TextBPN

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published