I Created an API That Returns a List of Items Containing a Specified IIIF Manifest in Cultural Japan

I created an API that returns a list of items containing a specified IIIF manifest in Cultural Japan. The API documentation is available at the following link. https://petstore.swagger.io/?url=https://api.cultural.jp/v3/api-docs Here is an example request. https://api.cultural.jp/v3/items/urls?manifest=https://iiif.harvardartmuseums.org/manifests/object/215190 For the API development, I used express-openapi and deployed it using AWS Lambda, referencing the following article. https://www.forcia.com/blog/002471.html I hope this serves as a useful reference for utilizing Cultural Japan.

September 20, 2022 · 1 min · Nakamura

Hosting Hugging Face Models on AWS Lambda for Serverless Inference

Overview This is a personal note on hosting Hugging Face models on AWS Lambda for serverless inference, based on the following article. https://aws.amazon.com/jp/blogs/compute/hosting-hugging-face-models-on-aws-lambda/ Additionally, I cover providing an API using Lambda function URLs and CloudFront. Hosting Hugging Face Models on AWS Lambda Preparation For this section, I referred to the document introduced at the beginning. https://aws.amazon.com/jp/blogs/compute/hosting-hugging-face-models-on-aws-lambda/ First, run the following commands. I created a virtual environment called venv, but this is not strictly required. ...

July 17, 2022 · 8 min · Nakamura

Experiments on Image Sizes Supported by serverless-iiif

Overview In the following article, I explained how to build an IIIF Image Server using an AWS serverless application. This time, I register a relatively large image and verify whether tile image delivery is possible. Target This time, the target is “Mining Claim Maps” (held by the University of Tokyo Komaba Library). https://iiif.dl.itc.u-tokyo.ac.jp/repo/s/ichiko/document/4120a330-2f1c-4e2c-5d48-21aed4d42704 The original image is a TIF file of nearly 300 MB. Creating Pyramidal Tiled TIFF Referencing the following site, I tried both VIPS and ImageMagick. ...

April 14, 2022 · 2 min · Nakamura

Creating Pyramid Tiled TIFF Files Using AWS Lambda + Docker + pyvips

Overview I created a Docker image that uses AWS Lambda and pyvips to generate Pyramid Tiled TIFF files from images stored in S3. The Amazon ECR Public Gallery is available here: https://gallery.ecr.aws/nakamura196/lambda-docker-vips-python The source code is available here: https://github.com/ldasjp8/lambda-docker-vips-python Below, I will explain how to use it. Creating an Amazon ECR Repository First, create an ECR repository. Next, check the commands from “View push commands” and push the image. ...

March 31, 2022 · 5 min · Nakamura

Building an Object Detection API Using AWS Lambda (Flask + YOLOv5)

Overview We build an object detection API (Flask + YOLOv5) using AWS Lambda. By building a machine learning inference model using AWS Lambda, we aim to reduce costs. The following article was used as a reference. https://zenn.dev/gokauz/articles/72e543796a6423 Updates to the repository contents and additions of how to use it from API Gateway have been made. Registering Functions on Lambda Clone the following GitHub repository. g i t c l o n e h t t p s : / / g i t h u b . c o m / l d a s j p 8 / y o l o v 5 - l a m b d a . g i t Running Locally Next, create a virtual environment using venv and install the modules. ...

March 24, 2022 · 5 min · Nakamura