Codes borrows from
A tool for scene text data augmentation. provided the tool to avoid overfitting and gain robustness of models.
-
install OpenCV and python3 on ubuntu 16.04
-
try docker Recommend✔
docker push allenzhou1996/mls-pybind11:latest
Build project:
./build.sh
python test_mls_pybind11.py
- Original Image
- Distortion
- Stretch
- Perspective
To transform an demo image with size (H:101, W:842), it takes less than 2.4ms (0.0024 sec) using a i5-8400 @2.8GHz CPU.
@inproceedings{schaefer2006image,
title={Image deformation using moving least squares},
author={Schaefer, Scott and McPhail, Travis and Warren, Joe},
booktitle={ACM transactions on graphics (TOG)},
volume={25},
number={3},
pages={533--540},
year={2006},
organization={ACM}
}