YuanYunshuang / useful_scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useful_scripts

generate_OCR_synthetic_data.py

Generation pipeline is as following:

  • Randomly generate a string of numbers
  • Randomly chodose a text style to write this string in an image and label each digit with a bounding box
  • Do a small rotation for the image and the bounding boxes
  • Perform projective transformation for the images and bounding boxes
  • Add noise and blur the images

label_generator_v1.py

see generate_OCR_synthetic_data.py

label_generator_v2.py

  • Randomly generate a random string
  • Randomly chodose a text style to write this string in an image and label each digit with a bounding box(8dim for 4 points)
  • Do a small rotation for the image and the bounding boxes
  • Perform projective transformation for the images and bounding boxes
  • Add noise and blur the images

About


Languages

Language:Python 100.0%