Updating the NDLOCR App Using Google Colab: Adding Single Input Dir Mode

Overview I recently created the following article and notebook. At the time of writing the above article, only the following input format was supported. Image file mode (specified with -s f) (Use this when providing a single image file as input) However, through verification in the following article, it became clear that applying the above option to multiple images incurs significant overhead. Therefore, I modified the notebook to also support the following input format. ...

April 29, 2022 · 2 min · Nakamura

Execution Time for NDLOCR Using Google Colab

I recently wrote the following article: This time, I conducted a brief investigation on the execution time of NDLOCR using Google Colab, and here are the results. Configuration The GPU used was: F r = = i N G F = N P = V P a = / r G = N A I U n = 0 A o P = o p D = c U = r I = e = r A N T = T s = u 2 - a e = e 3 s = n 9 S m m = s 5 e G I = n M e p = l C s I D = i 0 I = a : = n 6 = = g : 4 P = V = 2 6 e = 1 C I = p 6 0 r = 0 P I D = r : . f = 0 0 = o 2 3 = - = c 9 2 = S = e . P P = X = s 2 0 e w = M = s 0 3 r r = 2 2 = e 2 s : = . 3 = s 2 i U = . W = s s = . P = f t a = / I = o D e g = D = u r n e = O 3 = n i c / = f 0 = d v e C = f 0 = e - a = W T = r M p = y = p = V = e = e B = 0 = r u = 0 = s s = 0 = i - = 0 P = o I = 0 r = n d = 0 0 o = : = 0 M c = = 0 i e = 4 M = : B s = 6 e = 0 s = 0 m = 0 / = . o = : n = 3 r = 0 1 a = 2 y = 4 6 m = . D - = . 1 e = 0 i U = 0 6 = 3 s s = 0 = p a = O M = . g = f i = A e = f B = = = C = U = = D V G = = A o P = = l U = = V a - = = e t U = = r i t = 0 = s l i = % = i e l = = o = = n U = = : n C = G U = c o = P s = 1 o m = U a = 1 r p = D g = . r u M = e M e = 2 . t I = f e = e G = a m = E = u N o = C M M = l / r = C . . = 0 t A y = = = The following image was used. The size was 5000 x 3415 px, 1.1 MB: ...

April 29, 2022 · 6 min · Nakamura

Example of Running SPARQL Queries Against the Japan Search RDF Store Using Google Colab

I created a notebook demonstrating examples of running SPARQL queries against the Japan Search RDF store using Google Colab. I hope it serves as a useful reference when using RDF stores with Python. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/ジャパンサーチのRDFストアを対象したSPARQLチュートリアル.ipynb Other reference sites and tutorials include the following. https://www.kanzaki.com/works/ld/jpsearch/ https://lab.ndl.go.jp/data_set/tutorial/

April 29, 2022 · 1 min · Nakamura

Running the NDL Lab Automatic Figure/Table Extraction Program Using Google Colab

Overview NDL Lab publishes the following automatic figure/table extraction program. https://github.com/ndl-lab/tensorflow-deeplab-v3-plus This time, I summarize how to use Google Colab for the above program, including the procedures for inputting images via Google Drive and saving results. Notebook The Google Colab notebook created this time can be accessed from the following. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/ndl_deeplab.ipynb By preparing a folder of input images on Google Drive, you can execute the automatic figure/table extraction process. For basic operation instructions, please check the explanations within the notebook above. Below, I introduce execution examples. ...

April 29, 2022 · 5 min · Nakamura

Running NDLOCR App with Google Colab (Image Input and Result Saving via Google Drive)

Overview Previously, I shared a method for running the NDLOCR app using Google Cloud Platform’s Compute Engine. However, the above method involves somewhat cumbersome procedures and incurs costs. While it is suitable for production environments, it presented a high barrier for small-scale or experimental use. To address this issue, @blue0620 created a method for running the NDLOCR app using Google Colab. https://twitter.com/blue0620/status/1519294332159012864 By using the above notebook, you can easily (with one click from “Runtime” > “Run all”) and freely run OCR. ...

April 28, 2022 · 3 min · Nakamura

Using The New York Public Library API

Overview The New York Public Library provides a Digital Collections API. http://api.repo.nypl.org/ This article explains an example of how to use this API. Sign Up First, click the following link to sign up. A form like the following will be displayed, so enter the required information. After entering your information, you will receive an email with the subject Welcome to NYPL API. This email contains the Authentication Token. ...

April 23, 2022 · 3 min · Nakamura

How to Use pyvips and Create Pyramid Tiled TIFF Files

Overview I created a program to generate Pyramid Tiled TIFF files using pyvips. You can try it on the following Google Colab. https://colab.research.google.com/drive/1VO1PgKgS3H21zXpg4g2inN-mtIrON5TQ?usp=sharing When delivering images via IIIF, there are situations where Pyramid Tiled TIFF files need to be created. We hope this is helpful for image conversion using Python and Vips. The parameters are based on the following. https://github.com/samvera-labs/serverless-iiif#using-vips Also, as one example of how to deliver converted Pyramid Tiled TIFF files, the following article may also be helpful. ...

March 30, 2022 · 2 min · Nakamura