- The training process for the
text detection,text recognitionall uses thebase_trainer.pyin thetoolsfolder, and the training entry code is thebase_runner.py
ocr_exp_v1
|__ config
|__ flask_serve [Flask Demo App to show the Detection - Recognition Process]
|__ key_info_extraction [TODO]
|__ text_detection [CTPN Model + Data Utils + Loss Function]
|__ text_recognition [Hangul Net Model + Baseline Model]
|__ tools
|- base_trainer.py
|- base_runner.pygit clone https://github.com/369-Speaking-Fridgey/ocr_exp_v1.git- First, you must create a virtual enviornment with th 3.6 version of python
- Activate your enviornment
- in the example below, you will be making an enviornment with the name
venv
- in the example below, you will be making an enviornment with the name
- Move to the cloned repository
- Install the required libraries with the
requirenemts.txtfileconda create -n venv python=3.6 conda activate venv cd ocr_exp_v1 pip install requirements.txt
--> This can be done after the SETTING is finished (=previous step)
cd ocr_exp_v1/flask_serve- Since the 5000 local host port is running for the MLFlow operation, 3000 Port should be used.
flask run -h localhost -p 3000- The
text recognitionresult is not yet entirely successful - the Model is still training and trained weights will be updated soon
cd ocr_exp_v1- You are able to change the settings in the
train_configurationpart - The custom data to train on is available in the
zipformat - The data must be stored in another folder, and currently the dataset I used to train is not uploaded in the repository.
- Download the Image Zip Data from https://drive.google.com/drive/u/0/folders/1MIqs8PlNmuD3w2JZ91Mwvc9JlOm-pBGR here.
- Download the Label Zip Data from https://drive.google.com/file/d/1y4jwixUEfG4FSez-vJHRnv3C2-CwR4NH/view?usp=share_link here.
- Now, place the downloaded image & label data in the
datafolder outside theocr_exp_v1folder- So, your structure must look like
root |__ data [MUST MAKE THIS FOLDER] |_ zip datas downloaded (image & label) |__ ocr_exp_v1
- After that, change the
img_pathandlabel_pathin the configuration file
- Other important settings for training the
CTPNmodel is customizable with thedetect_configurationin thectpn_detect_config.ymlfile.
python3 base_runner.py

