Git Product home page Git Product logo

sstdnet's Introduction

SSTDNet

Implement 'Single Shot Text Detector with Regional Attention, ICCV 2017 Spotlight' using pytorch.

This code is work for general object detection problem. not for (oriented) text detection problem. I will probably update to handle oriented bounding box as soon as possible :)

[How to use]

  1. you need dataset.
  • dataset structure is..

    /train/0.jpg, /train/0.txt, /valid/0.jpg, /valid/0.txt, ....

  • 0.txt contain position and label of objects like below

    (xmin, ymin, xmax, ymax, label)

    1273.0 935.0 1407.0 1017.0 v1

    911.0 893.0 979.0 953.0 v1

    984.0 889.0 1053.0 948.0 v1

  • To encode label name to integer number, you should define labels in the 'class_lable_map.xlsx"

    v1 1

    v2 2

    ....

    * start from 1. not from 0. 0 will be background (in the loss.py).
  1. need some settings for dataset reader.

    - see train.py. you can find some code for reading dataset

    
      'trainset = ListDataset(root="../train", gt_extension=".txt", labelmap_path="class_label_map.xlsx", is_train=True, transform=transform, input_image_size=512, num_crops=n_crops, original_img_size=2048)'
      
    • you should set the 'input_image_size' and 'original_img_size'. 'input_image_size' is size of (cropped) image for train. And 'original_img_size' is size of (original) image. I made this parameter to handle high resolution image. if you don't need crop function, -1 for num_crops.
  2. Train with your dataset!

    you should define some parameter like learning rate, which optimizer to use, size of batch etc.

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.