본문 바로가기

Project/OCR

[CODE] SynthText - Korean ver 응용

 

https://arxiv.org/pdf/1604.06646.pdf

https://github.com/ankush-me/SynthText

 

GitHub - ankush-me/SynthText: Code for generating synthetic text images as described in "Synthetic Data for Text Localisation in

Code for generating synthetic text images as described in "Synthetic Data for Text Localisation in Natural Images", Ankush Gupta, Andrea Vedaldi, Andrew Zisserman, CVPR 2016. - GitHub - a...

github.com

 

https://github.com/youngkyung/SynthText_kr

 

GitHub - youngkyung/SynthText_kr: [KOREAN] Code for generating synthetic text images as described in "Synthetic Data for Text Lo

[KOREAN] Code for generating synthetic text images as described in "Synthetic Data for Text Localisation in Natural Images", Ankush Gupta, Andrea Vedaldi, Andrew Zisserman, CVPR 2016. - ...

github.com

korean ver 이 원본 SynthText 코드보다 파일을 풀어서 사용 --> 조작 간편할 것이라 생각됨

zoo_74.jpg
zoo_69.jpg
zoo_72.jpg

 

이러한 파일 형식으로 저장

1. 투명도 너무 높거나 지나치게 잘려있는 등 육안으로도 알아보기 힘든 변형 존재

 

투명도

colorize3_poisson.py

op = 0.50 + 0.1*np.random.randn()

잘린 이미지

 

 

 

 

 

 

 

 

visualize output

 

변경X
minWidth minHeight 60으로 높임
minW = 75로 상향 (글자수 작게)
make_h5.py )SECS_PER_IMG =20 으로 상향

2. 여러 줄로 나오는경우

-> 한번에 /n으로 묶어서 처리 (bbox도 마찬가지로 함께 처리)

 

text_utils.py

def get_nline_nchar 

nline = 1

 

3. 글씨 잘려서 나오는 경우

pygame ver 1.9.6으로 변경 -> 해결

 

 

4. 글씨체 제한적

 

 fontlist.txt.에 추가

 

5. output style 현재 프로젝트에서 기준으로 잡은 ICDAR와 다름

 

h5파일 만든 후, visualize code를 통해 다시 txt 파일 생성

'Project > OCR' 카테고리의 다른 글

[Project] E2E_OCR Model Architecture  (0) 2022.03.01
[CODE] data image , annotation 형식 맞추기  (0) 2022.02.17