https://raw.githubusercontent.com/victor-pavlychko/OCRWorkshop/master/OCRWorkshop.pdf
The project was created for Xcode version 10.2
To train the models you will need the following tools installed:
- Python 2.7:
brew install python2.7
- Jupyter Notebook:
pip install jupyter
- TensorFlow 1.12.0:
pip install tensorflow==1.12.0
- Other dependencies:
pip install Pillow numpy keras coremltools scikit-learn np_utils
Open OCRWorkshop.xcodeproj
and run the app.
The project contains excercises and solutions in the following files:
FiltersLocalContrastFilter.cikernel
andFilters/LocalContrastFilter.cikernel_final
Vision/VisionTextDetectorExcercise.swift
andVision/VisionTextDetectorExcerciseFinal.swift
Analysis/BitmapRowAnalyzerExcercise.swift
andAnalysis/BitmapRowAnalyzerExcerciseFinal.swift
TextDetection/TextDetectorExcercise.swift
andTextDetection/TextDetectorExcerciseFinal.swift
TextRecognition/TextRecognizerExcercise.swift
andTextRecognition/TextRecognizerExcerciseFinal.swift
Launch Jupyter Notebook from the Train
folder, open train.ipynb
file and run the code.
$ cd Train
$ jupyter notebook
The project contains some useful code snippets not relevant to the workshop topic but still worth mentioning:
- Bitmap handling library:
Utils/BitmapBuffer
- Generic error library:
Utils/Errors
- Article about building character classifiers: https://www.learnopencv.com/deep-learning-character-classification-using-synthetic-dataset/#step5