GSoC/2022/StatusReports/QuocHungTran: Difference between revisions

From KDE Community Wiki
< GSoC‎ | 2022‎ | StatusReports
 
(43 intermediate revisions by the same user not shown)
Line 1: Line 1:
== New DigiKam Plugin to Process Optical Character Recognition(OCR) ==
== '''New DigiKam Plugin to Process Optical Character Recognition(OCR)''' ==


The goal of this project is to implement a new generic DPlugin to process images in batches with Tesseract. Tesseract is an open-source OCR engine. Even though it can be painful to implement and modify sometimes, only a few free and powerful OCR alternatives are available on the current market. Tesseract is compatible with many programming languages and frameworks through wrappers that can be found here. Tesseract can be used with the existing layout analysis to recognize text within a large document, or it can be used in conjunction with an external text detector to recognize text from an image of a single text line.
The goal of this project is to implement a new generic DPlugin to process images in batches with Tesseract. Tesseract is an open-source OCR engine. Even though it can be painful to implement and modify sometimes, only a few free and powerful OCR alternatives are available on the current market. Tesseract is compatible with many programming languages and frameworks through wrappers that can be found here. Tesseract can be used with the existing layout analysis to recognize text within a large document, or it can be used in conjunction with an external text detector to recognize text from an image of a single text line.
Line 5: Line 5:
Thanks to the help of the OCR plugin in Digikam. The users will be able to select optional parameters to improve the quality of record detected text in image metadata. The output text will be saved in XML files, recorded in the exif of jfif, or the user was asked to store output text under the text file in the locale where they want. Furthermore, Digikam users will be able to review them and correct (spell checking) any OCR errors.
Thanks to the help of the OCR plugin in Digikam. The users will be able to select optional parameters to improve the quality of record detected text in image metadata. The output text will be saved in XML files, recorded in the exif of jfif, or the user was asked to store output text under the text file in the locale where they want. Furthermore, Digikam users will be able to review them and correct (spell checking) any OCR errors.


== Work report ==
'''Mentors''' : Gilles Caulier, Maik Qualmann, Thanh Trung Dinh
 
 
==== Project Proposal ====
[https://docs.google.com/document/d/1BEyPjG8xeUozny0J4UcDb-E1cObfbdveZlWYdFtWljo/edit?usp=sharing Digikam Plugin to Process Optical Character Recognition(OCR)]
 
==== GitLab development branch ====
[https://invent.kde.org/graphics/digikam/-/tree/gsoc22-ocr-test gsoc22-ocr-test]
 
== '''Contacts''' ==
'''Email''': [email protected]
 
'''Github''': [https://github.com/quochungtran quochungtran]
 
'''Invent KDE''': [https://invent.kde.org/quochungtran quochungtran]
 
'''LinkedIn''': https://www.linkedin.com/in/tran-quoc-hung-6362821b3/
<br>
 
== '''Project goals''' ==


27/06/2022 :  
27/06/2022 :  


Implementing preprocessing for improving the quality of the output
Researching preprocessing for improving the quality of the output. These results can be applied for building preprocessing of image engine to improve the quality of plugin.


30/08/2022 :
30/08/2022 :


a new optional Generic Tesseract-based DPlugin available in digiKam and Showfoto to run OCR automatically.
A new optional Generic Tesseract-based DPlugin is available in DigiKam and Showfoto to run OCR automatically.
Recognized text can be stored in a text file and XMP metadata for users to review and generate them.
 
== '''Links to Blogs and other writing''' ==
 
=== Main merge request ===
 
* https://invent.kde.org/graphics/digikam/-/merge_requests/177
 
=== KDE repository for OCR researching ===
 
* https://invent.kde.org/quochungtran/gsoc2022-ocr-tesseract-test/-/tree/master/
 
=== Issue tracker ===
* https://bugs.kde.org/show_bug.cgi?id=117629
 
=== My blog for GSoC ===
 
My entire blog :
* https://quochungtran.github.io/
 
===== June 13 to June 27 (Week 1 - 2) - Tesseract Page Segmentation Modes (PSMs) Explained and their relations =====
 
https://quochungtran.github.io/junk/2022/06/27/week1-2.html
 
===== June 27 to July 10 (Week 3 - 4) - Preprocessing for improving the quality of the output =====
 
https://quochungtran.github.io/junk/2022/07/25/week3-4.html
 
===== June 11 to July 25 (Week 5 - 6) - Preprocessing for improving the quality of the output =====
 
https://quochungtran.github.io/junk/2022/07/25/weed5-6.html
 
===== July 26 to August 8 (Week 7 - 8) - OCR batch processing based on internal-multi threading =====
 
https://quochungtran.github.io/junk/2022/08/08/weed7-8.html
 
===== August 9 to August 16 (Week 9) - Storing OCR result =====
 
https://quochungtran.github.io/junk/2022/08/14/weed9.html
 
===== August 17 to September 4  (Week 10 - 12) - Code refactoring and demo application =====
 
https://quochungtran.github.io/junk/2022/08/30/lasteweeks.html
 
 
= '''Conclusion''' =
 
During the significant coding period of GSoC 2022, we successfully implemented the tool to convert documented image data to Text format using Tesseract, an open-source Optical Characters Recognition engine. Besides, we are totally able to improve the quality of OCR accuracy by embedding preprocessing methods.
 
 
At the end of the coding period, thanks to the mentor's dedicated help, the implementation of the plugin was completed successfully with a better layout.


== Links to Blogs and other writing ==
[[File:OCR Text converter tool.png]]
[[File:Text_edit_plugin.png]]

Latest revision as of 19:16, 11 September 2022

New DigiKam Plugin to Process Optical Character Recognition(OCR)

The goal of this project is to implement a new generic DPlugin to process images in batches with Tesseract. Tesseract is an open-source OCR engine. Even though it can be painful to implement and modify sometimes, only a few free and powerful OCR alternatives are available on the current market. Tesseract is compatible with many programming languages and frameworks through wrappers that can be found here. Tesseract can be used with the existing layout analysis to recognize text within a large document, or it can be used in conjunction with an external text detector to recognize text from an image of a single text line.

Thanks to the help of the OCR plugin in Digikam. The users will be able to select optional parameters to improve the quality of record detected text in image metadata. The output text will be saved in XML files, recorded in the exif of jfif, or the user was asked to store output text under the text file in the locale where they want. Furthermore, Digikam users will be able to review them and correct (spell checking) any OCR errors.

Mentors : Gilles Caulier, Maik Qualmann, Thanh Trung Dinh


Project Proposal

Digikam Plugin to Process Optical Character Recognition(OCR)

GitLab development branch

gsoc22-ocr-test

Contacts

Email: [email protected]

Github: quochungtran

Invent KDE: quochungtran

LinkedIn: https://www.linkedin.com/in/tran-quoc-hung-6362821b3/

Project goals

27/06/2022 :

Researching preprocessing for improving the quality of the output. These results can be applied for building preprocessing of image engine to improve the quality of plugin.

30/08/2022 :

A new optional Generic Tesseract-based DPlugin is available in DigiKam and Showfoto to run OCR automatically. Recognized text can be stored in a text file and XMP metadata for users to review and generate them.

Links to Blogs and other writing

Main merge request

KDE repository for OCR researching

Issue tracker

My blog for GSoC

My entire blog :

June 13 to June 27 (Week 1 - 2) - Tesseract Page Segmentation Modes (PSMs) Explained and their relations

https://quochungtran.github.io/junk/2022/06/27/week1-2.html

June 27 to July 10 (Week 3 - 4) - Preprocessing for improving the quality of the output

https://quochungtran.github.io/junk/2022/07/25/week3-4.html

June 11 to July 25 (Week 5 - 6) - Preprocessing for improving the quality of the output

https://quochungtran.github.io/junk/2022/07/25/weed5-6.html

July 26 to August 8 (Week 7 - 8) - OCR batch processing based on internal-multi threading

https://quochungtran.github.io/junk/2022/08/08/weed7-8.html

August 9 to August 16 (Week 9) - Storing OCR result

https://quochungtran.github.io/junk/2022/08/14/weed9.html

August 17 to September 4 (Week 10 - 12) - Code refactoring and demo application

https://quochungtran.github.io/junk/2022/08/30/lasteweeks.html


Conclusion

During the significant coding period of GSoC 2022, we successfully implemented the tool to convert documented image data to Text format using Tesseract, an open-source Optical Characters Recognition engine. Besides, we are totally able to improve the quality of OCR accuracy by embedding preprocessing methods.


At the end of the coding period, thanks to the mentor's dedicated help, the implementation of the plugin was completed successfully with a better layout.