Skip to content

mhseo10/2022-SW-AI-Contest

Repository files navigation

customocr

경로 설정 방법: customocr의 하위 경로에 data 파일 위치

. customocr
├── font
├── hallymocr
├── ocr.ipynb
├── ...
├── open ==> dacon 파일
├── word_h ==> 구글 드라이브 파일
├── word_v
├── ko.txt
└── train.txt

valid_data 조절 방법(학습 시간 단축)

  1. OCR 모델 생성 전 validation data 생성 코드 추가('train/' 으로 가정)
import pandas as pd

###### train.csv를 이용해 개수 조절
train_csv_path = 'open/train.csv'
train_csv = pd.read_csv(train_csv_path)
train_csv[:10].to_csv('open/train.txt', sep='\t', header=False, index=False)


###### lmdb 파일 생성, 운영체제에 맞게 주석 해제
# # if window
# !python ./hallymocr/create_lmdb_dataset.py --inputPath ./open/ --gtFile ./open/train.txt --outputPath ./result/train --file_size <전체 데이터 크기(GB)>
# # if linux
# !python3 ./hallymocr/create_lmdb_dataset.py --inputPath ./open/ --gtFile ./open/train.txt --outputPath ./result/train --file_size <전체 데이터 크기(GB)>
  1. opt['valid_data'] 수정
opt = {
    'exp_name': None,
    'train_data': './result/',
    'valid_data': './result/train',
    ...
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •