Azure OpenAI GPT-4 vs Document Intelligence: Comparative Evaluation of Japanese Vertical Text OCR

Overview We performed OCR processing on Japanese vertical writing manuscript paper using two OCR services provided by Microsoft Azure (Azure OpenAI GPT-4 Vision and Azure Document Intelligence) and conducted a detailed comparative evaluation of the results. Test Image Image Source: Canva template (400-character manuscript paper) URL: https://www.canva.com/ja_jp/templates/EAFbqUoH7P8/ Image Characteristics: 20x20 grid, 400-character manuscript paper Vertical writing layout Light grid lines (squares) Distinction between title section and body section Ground Truth 原 佐 原 こ 稿 藤 稿 の の ち 用 テ タ あ 紙 キ イ き に ス ト 書 ト ル く を テ 使 キ 用 ス す ト る が 場 入 合 り は ま 、 す 日 。 本 作 語 文 の や 全 小 角 論 を 文 使 を う 作 こ っ と た で り マ 、 ス 小 に 説 あ を っ 書 た い 文 た 字 り を な 打 ど つ に こ ご と 活 が 用 で く き だ ま さ す い 。 。 手 書 き で 使 用 し た い 場 合 は 、 こ の テ キ ス ト を 削 除 し 、 印 刷 し て ご 使 用 く だ さ い 。 1. Recognition Results with Azure OpenAI GPT-4.1 Recognized Text 原 佐 原 こ 稿 藤 稿 の の 用 テ タ ち 紙 キ イ あ に ス ト き 書 ト ル く を テ 使 キ 用 ス す ト る が 場 入 合 り は ま 、 す 日 。 本 作 語 文 の や 全 小 角 論 を 文 使 を う 作 こ っ と た で り マ 、 ス 小 に 説 あ を っ 書 た い 文 た 字 り を な 打 ど つ に こ ご と 活 が 用 で く き だ ま さ す い 。 。 手 書 き で 使 用 し た い 場 合 は 、 こ の テ キ ス ト を 削 除 し 、 印 刷 し て ご 使 用 く だ さ い 。 Evaluation GPT-4.1 demonstrated the following characteristics for vertical writing manuscript paper: ...

September 29, 2025 · 5 min · Nakamura

A Scalable OCR Processing System Using NDL Classical Japanese OCR Lite on Azure Container Apps

Important Usage Notice The system introduced in this article may place load on external servers. Please exercise caution when using it. Server Load: Parallel requests place load on target servers DoS Attack Risk: Large numbers of simultaneous accesses may be mistaken for DoS attacks Recommended Approach: It is recommended to download images locally in advance and run only the OCR processing in parallel Check Terms of Use: Always check the terms of use for target servers and obtain prior permission if necessary Appropriate Rate Limiting: For production use, conservative concurrency settings (around 5-10 parallel) are strongly recommended Responsible Usage: Be considerate of server administrators and other users This article is a record of a technical proof of concept. We ask readers to use it responsibly. ...

August 31, 2025 · 13 min · Nakamura

How to Dynamically Convert File Paths on Azure Storage Using Cantaloupe Delegate Scripts

Introduction When using Azure Storage with the IIIF server Cantaloupe, there are cases where the IIIF URL identifier differs from the actual file path on Azure Storage. This article explains in detail how to solve this problem using delegate scripts. Problem Suppose you are managing images with the following file structure: A ├ │ │ │ │ │ │ │ z ─ u ─ r e i ├ │ │ │ │ └ m ─ ─ S a ─ ─ t g o e c ├ │ └ c └ r s ─ ─ o ─ a l ─ ─ l ─ g l l e e i └ i └ e c t ─ t ─ c C t e ─ e ─ t o i m m i n o 0 i 0 i o t n 0 t 0 t n a 1 1 e 2 e 2 i / / m / m / n 0 0 e 0 0 r 1 2 : _ _ 0 0 m 0 0 y 1 1 c . . o j j n p p t g g a i n e r However, you want to access them via IIIF URLs like the following: ...

August 12, 2025 · 16 min · Nakamura

Trying Azure Logic Apps

Overview This is a note from trying Azure Logic Apps for the purpose of investigating no-code or low-code development. Result Below is the Logic App Designer screen. We create a workflow that receives an HTTP request, saves data to Cosmos DB, and sends an email upon success. Creating Azure Cosmos DB Everything except “Account name” was left as default. It was created with the name “my-first-azure-cosmos-db-account.” Create an “Items” container. ...

January 7, 2025 · 3 min · Nakamura

Creating Apps with Azure OpenAI Assistants API Using Gradio and Next.js

Overview I created apps using the Azure OpenAI Assistants API with Gradio and Next.js, so here are my notes. Target Data I used articles published on Zenn as the target data. First, I bulk downloaded them with the following code. i f i f p u w f m r m r a r h o p o p o g l i r o m o m e s l r r e u r d a i f p u t i r s h t o w t b t t = = r e a r f o a r e f e o t x s i s q 1 l s t t r g l x s u m t . t r 4 o d 1 [ : p a i l e t o p p l m h e s m ] = o c e b a u i _ s c o = a f q i n = l n r r r + n o . o n = = k o . u m i f s e ( e t l = p p n s h e p w e p m " e r s a a i s t a a t e B s t d e r s o p h e r k c . 1 q t t i e o m i n i t r o t = s = t l a d h h n = a u l r ( t s t r t p i e p m . u u p . s t e t p r o d c p ( = e e r t . g ( e ( B s e n a l i e u x e i f e o x t e t : q s t e n n r f i q f i t s t x a q / u e a s d l " s u u n _ . _ t u d / e . [ ) a ( s d t e l d t p o ) t m z s j ' r " ) a s s S ( e a p i e t s a = t h : t ( t o c x t a f n s o r = i t a t s u l t h t u n . n t c t / e . p a ( . h l . g ( i 0 l p t x g ( s ) d , S d e ) c : e s e t e r s i o e t l s : x _ t e _ r " u v ( e : / t ( s = n w p / u s / p u p " a " a r ' z { a r o z m ) p l ] e u t l n n e i ) n r h ) s c ( a / n l ) e " t s a . . : . ) e r d s t x f t e p e t : i v l x _ c " i t o l t , p e + ( a s ' " t ? a / h h u r ' t ) s t ) m , e i [ l r c - . e n l 1 p x a e ] a i m [ } r s e ' . s t = p t e _ n a x r o a t t " k k h " ) = a ' T m ] r u ) u r e a ) 1 9 6 & p a g e = { p a g e } " Registering to the Vector Store Upload data files with the following code. ...

January 6, 2025 · 13 min · Nakamura

Cantaloupe: Serving Images Stored in Microsoft Azure Blob Storage

Overview This is a memo on how to serve images stored in Microsoft Azure Blob Storage using Cantaloupe Image Server, one of the IIIF image servers. This is the Microsoft Azure Blob Storage version of the following article. Method This time we will use the Docker version. Please clone the following repository. https://github.com/nakamura196/docker_cantaloupe In particular, rename .env.azure.example to .env and set the environment variables. # C C C # C L A A A A E F N N N F N T o T T T o T S r A A A r A _ L L L L E M O O O T O N i U U U r U C c P P P a P R r E E E e E Y o _ _ _ f _ P s A A A i H T o Z Z Z k O _ f U U U S E t R R R T M E E E = A A S S S I z T T T L u O O O = r R R R e A A A G G G B E E E l S S S o O O O b U U U R R R S C C C t E E E o _ _ _ r A A C a C C O g C C N e O O T U U A N N I T T N _ _ E N K R A E _ M Y N E = A = M E = The last two settings also include HTTPS configuration using Traefik. ...

December 23, 2024 · 2 min · Nakamura

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

Building a RAG-based Chat Using Azure OpenAI, LlamaIndex, and Gradio

Overview I tried building a RAG-based chat using Azure OpenAI, LlamaIndex, and Gradio, so here are my notes. Azure OpenAI Create an Azure OpenAI resource. Then, click “Endpoint: Click here to view endpoint” to note down the endpoint and key. Then, navigate to the Azure OpenAI Service. Go to “Model catalog” and deploy “gpt-4o” and “text-embedding-3-small”. The result is displayed as follows. Downloading the Text This time, we target “The Tale of Genji” published on Aozora Bunko (a free digital library of Japanese literature). ...

December 16, 2024 · 16 min · Nakamura