Recognition of handwritten flowcharts using convolutional neural networks to generate C source code and reconstructed digital flowchart.
The pipeline implemented in this project in order to solve the problem of recognition of handwritten flowcharts uses preprocessing of images, the image is send to two detectors, the shapes and connectors detector and the text detector. In flow for text, the image is binarize and uses Keras OCR for locate text and an implemented model with CNN + LSTM for classifing characters; besides, the flow to shapes and connectors uses masking unsharp and an implemented model that's called Faster R-CNN with backbone VGG-16.
In order to augment text detector precision the technique called continual learning is used. After, some training with the texts of a certain user, the model will improve.
Finally, like output is generated source code in C and its compilation output, and the reconstructed diagram in image digital.
Note: The flowcharts used for testing are constructed with a defined set of shapes and connectors. You can see here.
- Create a virtual enviroment with Conda with name 'tt', the list of requirements is here.
- Download this repo.
- Model for shapes and connectors:
- Download the folder here.
- Paste it (unzipped) into model/training_results/ (path inside the repo)
- For text.
- Activate your Conda enviroment.
- Change terminal to repository folder.
- Type:
$ python3 handler.py
- Use "Recognize flowchart" option for testing detections with handwritten flowcharts.
Calculate the nth term of the Fibonacci sequence, compilation output: None.
Hello world, compilation output: None.