Building an NDLOCR Gradio App Using Azure Virtual Machines

Overview In the following article, I introduced a Gradio app using Azure virtual machines and NDLOCR. This article provides notes on how to build this app. Building the Virtual Machine To use a GPU, it was necessary to request a quota. After the request, “NC8as_T4_v3” was used for this project. Building the Docker Environment The following article was used as a reference. https://zenn.dev/koki_algebra/scraps/32ba86a3f867a4 Disabling Secure Boot The following is stated: ...

December 23, 2024 · 16 min · Nakamura

Created a Gradio App to Try ndlocr_cli (NDLOCR ver.2.1) Application

Overview I created a Gradio app that allows you to try the ndlocr_cli (NDLOCR ver.2.1) application. Please try it at the following URL. https://ndlocr.aws.ldas.jp/ Notes Currently, only single image uploads are supported. I plan to add options such as PDF upload functionality in the future. It uses the “NVIDIA Tesla T4 GPU” installed in the “NC8as_T4_v3” VM available on Azure. Summary I’m not sure how long I can continue providing this in its current form, but I hope it will be useful for verifying the accuracy of the ndlocr_cli (NDLOCR ver.2.1) application. ...

December 22, 2024 · 1 min · Nakamura

Using NDL Classical Book OCR-Lite (ndlkotenocr-lite) on Mac OS

Overview On November 26, 2024, NDL Lab released NDL Classical Book OCR-Lite. https://lab.ndl.go.jp/news/2024/2024-11-26/ This article introduces how to use it on Mac OS. Usage (Video) https://www.youtube.com/watch?v=NYv93sJ6WLU Usage (Text) Access the following. https://github.com/ndl-lab/ndlkotenocr-lite/releases/tag/1.0.0 Select the one containing “macos” from the list. Also select the one matching your chip. Clicking the link downloads “ndlkotenocr-lite_v1.0.0_macos_m1.tar.gz” as shown below. After extracting by double-clicking, the application “NDLkotenOCR-Lite” is extracted inside a macos folder. ...

November 27, 2024 · 1 min · Nakamura

Trying NDLTSR (NDL Table Structure Recognition)

Overview NDLTSR (NDL Table Structure Recognition) is described as follows. A program for recognizing the structure of tables contained in document images is publicly available. By combining it with OCR text data with coordinates, it can be used to structure text data contained in tables. Reference (external link): Addition of new functionality (table structuring) to the Next Generation Digital Library and publication of source code and dataset for the new functionality. This program enables inference of table structures using a machine learning model trained on the NDLTableSet published by the National Diet Library, and also allows retraining with user-provided datasets using the same method as LORE-TSR (external link). ...

April 26, 2024 · 2 min · Nakamura

Created Notebooks Using NDLOCR and NDL Classical Japanese OCR ver.2

Notice 2026-02-24 ! The notebooks provided on this page will no longer be updated. For NDLOCR, “NDLOCR-Lite” has been released as a desktop application and command-line tool for easy use. Please use this going forward. https://github.com/ndl-lab/ndlocr-lite 2025-04-02 There is currently a bug. Please refrain from using it until the fix is complete. The bug has been fixed. 2025-03-21 For NDL Classical Japanese OCR, “NDL Classical Japanese OCR-Lite” has been released as a desktop application for easy use. Please use this going forward. ...

September 20, 2023 · 3 min · Nakamura

Running NDL Classical Japanese OCR on mdx

Update History 2024-05-22 Added “Adding the user who executes Docker commands to the docker group.” Overview mdx is a data platform for industry-academia-government collaboration co-created by universities and research institutions. https://mdx.jp/ This time, we will use an mdx virtual machine to run NDL Classical Japanese OCR. https://github.com/ndl-lab/ndlkotenocr_cli Project Application This time, I selected “Trial” as the project type. With “Trial,” one GPU pack was allocated. Creating a Virtual Machine Deploy This time, I selected “01_Ubuntu-2204-server-gpu (Recommended).” ...

August 29, 2023 · 14 min · Nakamura

Conversion and Visualization of the NDL-DocL Dataset (Document Image Layout Dataset)

I created a notebook that converts Pascal VOC format XML files to COCO format JSON files and visualizes the contents of the NDL-DocL Dataset (Document Image Layout Dataset) published by NDL Lab. https://github.com/nakamura196/ndl_ocr/blob/main/NDL_DocLデータセット(資料画像レイアウトデータセット)の変換と可視化.ipynb By opening the above notebook and pressing “Runtime” > “Run all cells,” you can perform the conversion and visualization. By using the “/content/img” folder and “/content/dataset_kotenseki.json” file created after execution, you can use the data in machine learning programs that require COCO format data. ...

July 22, 2022 · 1 min · Nakamura

NDL OCR Now Supports Ruby (Furigana) Text Extraction

Overview For NDL OCR, the default setting previously did not include ruby (furigana) text extraction. Thanks to the cooperation of the NDL team, it is now possible to configure whether or not to perform text extraction for ruby. https://github.com/ndl-lab/ndlocr_cli/ Setting the following to True in config.yaml enables the ruby text extraction feature. y i e l d _ b l o c k _ r u b i : F a l s e Please note the following caveats when using this feature: ...

July 6, 2022 · 2 min · Nakamura