Publishing a YOLOv11x Model on Hugging Face

This article introduces the steps to publish a YOLOv11x model trained on the Japanese Classical Kuzushiji Dataset on Hugging Face and create a demo with Gradio Spaces. Overview Model: YOLOv11x (for kuzushiji character detection) Dataset: Japanese Classical Kuzushiji Dataset Publication: Hugging Face Models + Spaces 1. Register the Model on Hugging Face Models 1.1 Install huggingface_hub p i p i n s t a l l h u g g i n g f a c e _ h u b 1.2 Login h u g g i n g f a c e - c l i l o g i n Or from Python: ...

January 26, 2026 · 5 min · Nakamura

Trying Odeuropa-Related Tools

Overview I had the opportunity to try tools related to Odeuropa, so this is a memo about that experience. What is Odeuropa? An explanation is available on the following page. https://odeuropa.eu/ Below is a machine-translated description. Odeuropa is an innovative EU-funded project that studies Europe’s “olfactory cultural heritage.” Project objectives: To investigate and document the role that smells have played in European culture from 1600 to 1920. Using cutting-edge AI technology, it extracts smell-related information from approximately 43,000 images and 167,000 historical texts (in English, Italian, French, Dutch, German, and Slovenian). ...

July 24, 2025 · 19 min · Nakamura

Creating TEI/XML Files from IIIF Manifest Files Using NDL Kotenseki OCR-Lite

Overview This article introduces a Gradio app that creates TEI/XML files from IIIF manifest files using NDL Kotenseki OCR-Lite. It can be accessed at the following URL: https://nakamura196-ndlkotenocr-lite-iiif.hf.space/ Background This is a continuation of the following articles: Previously, two separate apps were needed, but with this update, the entire conversion process can be completed within a single Gradio app. Additionally, issues such as difficulty tracking progress when processing manifest files with many image pages, and the inability to copy processing results, have been fixed. ...

June 12, 2025 · 1 min · Nakamura

Created a Similar Text Search App for the Koui Genji Monogatari

Overview I created a similar text search app for the Koui Genji Monogatari. You can try it from the following URL. https://huggingface.co/spaces/nakamura196/genji_predict This article introduces how to use the app. Data The text data published on the following Koui Genji Monogatari DB is used. https://kouigenjimonogatari.github.io/ How the App Works The mechanism is simple: text for each volume and page of the Koui Genji Monogatari is prepared in advance, the edit distance from the input string is calculated, and texts (along with volume and page numbers) with high similarity are returned. ...

January 29, 2025 · 11 min · Nakamura

Training YOLOv11 Classification (Kuzushiji Recognition) Using mdx.jp

Overview I had the opportunity to train YOLOv11 classification (kuzushiji recognition) using mdx.jp, so here are my notes. Dataset The following “Kuzushiji Dataset” is used as the target. http://codh.rois.ac.jp/char-shape/book/ Dataset Creation The dataset is formatted to match the YOLO format. First, data separated by book title is flattened and merged. # c | l a e s x s d p e o C f r l t a c # f # f s r i o s e " l o r i a . e u f t . s t f c o i # o s i e / p i l u f s h c _ d = u l s t p . u a d a t e p o r m t t a t g _ = u s c i a i i t a l d i t . o n k l o a / o i n f _ p n t e . n s * b r i f a t ( d c : e / ( t l i t i f i o t c i = q e l h n " r p ( h n d . e . u C s y s a p " m s e e o ( ( e r u . ( p = x p f f l a t . f l i y " i f c _ / i i f s i { l , t f d l t " t n o e e i a e ( { s g u , i r l t s " o ( t n s e a ) / u o { p o p / _ / : " t u f u u u * p d ) p t i t t t / a a [ u p l _ p _ * t t - t u e d u f . h a 2 _ t } i t i j ) s ] d _ r _ l p e i f t } f e g t r i o / i _ " " } l { l p / e { c e a { ) o l ) t c : u s h l t } , s p " } u , o / t u { _ e t f f x p i i i u l l s t e e t _ . } _ d s " o i p ) k r l = ) i T : t r ( u ' e / ) ' ) [ - 1 ] } " Next, the dataset is split using the following script. ...

November 6, 2024 · 37 min · Nakamura

Building an Inference App Using Hugging Face Spaces and YOLOv5 Model (Trained on KaoKore Dataset)

Overview I created an inference app using Hugging Face Spaces and a YOLOv5 model trained on the KaoKore dataset. The KaoKore dataset published by the Center for Open Data in the Humanities (CODH) is as follows: Yingtao Tian, Chikahiko Suzuki, Tarin Clanuwat, Mikel Bober-Irizar, Alex Lamb, Asanobu Kitamoto, “KaoKore: A Pre-modern Japanese Art Facial Expression Dataset”, arXiv:2002.08595. http://codh.rois.ac.jp/face/dataset/ You can try the inference app at the following URL: https://huggingface.co/spaces/nakamura196/yolov5-face The source code and trained model can be downloaded from the following URL. I hope it serves as a reference when developing similar applications. ...

October 5, 2024 · 1 min · Nakamura

Resolving ModuleNotFoundError: No module named 'huggingface_hub.utils._errors'

Overview When deploying an app to Hugging Face Spaces, the following error occurred. This is a memo about that error. C V U W T M D r i p A r o u e e d R a F F F d r a w a N c i i i u i t t I e l m l r l f l n i U e N b e o e e e r e g n l G a d s o N g t S c " e " u " m o h r e ⚠ k / l / l / t a n a t ️ u u t u h F n e l t ( s = s s u o d w y i D m r r = r g u l t n e o / D / / g n i U i g t s l e l a l i d n l c s e t o t o t o n E g t s c c e c t c g r r w t r a c a e a f r o a S i M e l t l m l a o f l e t u c / M / p / c r y t h l e l u l t l e : t t t t n i l i _ i _ h i i ' i t b t b d b h N e c n y B / i / o / u o s g o a c p B p w p b a s l c a y a y n y . m b S o k l t c t l t u o o e w e l h k h o h t d v t i s n o e o a o i u e t t e d l n n n d n l l i h t a 3 d 3 _ 3 s e e n t f s . ( . f . . x g ' i a t 1 1 r 1 _ n c s y n i ) 0 0 0 e a e o g l : / m / r m p v l s e s s _ s r e t 0 o d i i h i o d i . k : t t u t r o 0 s e e e b e s ' n . e y N - - ( - h , 6 t = o p p w p i u t v a a , a m g a f i a m c c c p g n i n l o k k h k o i o l g u d a a f a r n t e s e u g g _ g t g h ' ' l e e t e f e ✅ , e s s s R a r o / k / e c r i n y y e y p e e . a o o n o o _ x a e m l l = l s h c t . e o o h o i u e d v v f v t b p ' 5 5 _ 5 . t y ' / / t r u i h o h h m u y t o o l u e o k t N i n m o g l d e i o l e g p e n l t s o / s i e l ) s F . c u e n r s / o _ c s t g s / d u e u e t f . c o n r r r i a p o w d r r / n c y m n E o e . g e " m l r r d c s _ , o o r s : o h n a o ' n r u l . d r f u b i p s i n . n y . g s u e " p / _ t , y U d i 3 " l i l 8 l , t r s , i r = . n l a p _ i e i l a e n n y t r 3 e t h r l 3 i / o o 8 1 c t r a , 5 s s d 0 / ' _ i , s d m n e i o i t r d n t ' e _ i . l i a n n t g F i t s o t e . r _ m j _ p s h t o e _ n l d ' p o w s n e l e o a h d t _ t f p r s o : m / _ / h d u o b c s . u l t r a l y t i c s . c o m / q u i c k s t a r t / # u l t r a l y t i c s - s e t t i n g s . Reference The following article was helpful. ...

October 4, 2024 · 5 min · Nakamura

Fixing an Inference App Using Hugging Face Spaces and a YOLOv5 Model (Trained on NDL-DocL Dataset)

Overview In the following article, I introduced an inference app using Hugging Face Spaces and a YOLOv5 model trained on the NDL-DocL dataset. This app had stopped working, so I fixed it to make it operational again. https://huggingface.co/spaces/nakamura196/yolov5-ndl-layout Here are my notes on the changes made during this fix. Changes The modified app.py is shown below. i f i i m d i o ] t d a e ] d d m r m m o e n u i e r x e e p o p p d f p t t s t a m m o m o o e u p l c i m o o r r r l y r d r i # o r ] t u g g e r c p [ [ [ . t P t t o e f e m u e s t r r i l l ' ' ' = l I = l s s _ C t t s . . = p e e 『 『 『 a g L y j o u = w o p u = I J t s 源 源 平 g u r o s y ( l = i n u r o r = m S " i = 氏 氏 家 r n a i l o o i t r t v t n u e g a O Y o = 物 物 物 . c d m o n l m s e j h e _ t s r [ g N O n " 語 語 語 I h i p v o ) s s _ r i [ p . e ( L < [ 』 』 』 n ( o o 5 v : = u o b t m u I ( ) O = p ( ( ( t s r 5 l n o a t m t v 東 京 国 e h a t . m t . x t g _ a y 5 " s 京 都 文 r a s l o s l e h e i g p Y t 大 大 学 f r I o d . o s e m e e N O y 学 学 研 a e g m a e p a = a ( = D L l 総 所 究 c = r a d l a d = n g t " L O e 合 蔵 資 e F g ( ( n s u I e y p - v = 図 ) 料 ( a e " i d ( r m m , p i D 5 ' 書 . 館 y l n m a d e p a e l o t 館 j 提 o s a ) s f s y g = " c N e 所 p 供 l e k ( ) u e ' , L D x 蔵 g ) o ) a ) l a . p L t ) ' . , m # . t r f i l D - - . ] j u x s r r l a a D a j , p i r i y . a o ' b t o l p g n a n x r y m , e a c i g ' p 1 f y e a l s L g ' ] u 9 e [ n b r l = e n ] t 6 r 0 d a r a " t D : , s / e ] e c a b O s a , y n . r k y e u " t c o c t ( ( l t a e o l e o ) t i = p s n u o _ [ o m " u e t t v j 0 _ O t t e p 5 s ] a w r s r u - o n i i I ' t n n t g m G > s d ( # i h i a r Y , l o m _ n g a O - r r a b a e d L t l i e g o l " i O i a e s e x ) o v t y n u e I , 5 l o t l s m d e u = t ) a e N = t " s g m D t " r . e o L i ) e r " - t c e ) f D l o n o o e r d r c , d e L s r o d " ( b D e ) ) j a s e t c r c a r e t s i t e p u d t t r e s i n t o s e i n c s = a t d i a e l o n s i n c s . o r t b i U j p o p e t f l c i o t o i a n m d d , a e g a t a e n e r s c t i t i m i c a o l g n e e = m a o o r r d t e i c l c l l i t e c r , k a i e a n x n e a d m e p x o l a n e m s p t = l h e e e x a i < m m a p a l g h e e r s e ) t f = u " s h e t . t " p s : / / g i t h u b . c o m / n d l - l a b / l a y o u t - d a t a s e t \ " > N D L - D o c L D a t a s e t s < / a > . < / p > " First, due to Gradio version upgrades, I changed gr.inputs.Image to gr.Image and similar updates. ...

May 20, 2024 · 6 min · Nakamura

Using the API of the Curriculum Guidelines Code Recommendation App

Overview In the following article, I introduced a recommendation app for Japan’s Curriculum Guidelines (Gakushu Shido Yoryo) codes. This time, I introduce how to use the above recommendation app via Gradio’s API. Usage Install the library. p i p i n s t a l l g r a d i o _ c l i e n t For example, let’s use the following data. ...

April 16, 2024 · 6 min · Nakamura

Prototype of a Course of Study Code Recommendation App

Overview I created a Course of Study code recommendation app, and this is an introduction to it. You can try it on the following Hugging Face Space. It utilizes the Course of Study LOD. https://huggingface.co/spaces/nakamura196/jp-cos Usage Enter any text in the text form. “School Type” is an optional field. Results are displayed on the right side of the screen. Sample inputs are also provided, so please try them out. Information from NHK for School is used. ...

April 16, 2024 · 3 min · Nakamura

Web Application for NDL Classical Book OCR Using Hugging Face Space

Overview I created a web application for NDL Classical Book OCR using Hugging Face Space. You can try it at the link below. Upload an image, and after about 1 minute, the OCR result text and JSON data will be displayed. https://huggingface.co/spaces/nakamura196/ndl_kotenseki_ocr The following article was used as a reference for creating this application. https://qiita.com/relu/items/e882e23a9bd07243211b Choosing the Right Tool I have separately prepared a Google Colab tutorial as another environment for trying NDL Classical Book OCR. ...

March 27, 2023 · 2 min · Nakamura

Returning JSON from Hugging Face Spaces

Previously, I built an inference app using Hugging Face Spaces and a YOLOv5 model (trained on the NDL-DocL dataset): This time, I modified the app above to add JSON output, as shown in the following diff: https://huggingface.co/spaces/nakamura196/yolov5-ndl-layout/commit/4d48b95ce080edd28d68fba2b5b33cc17b9b9ecb#d2h-120906 This enables processing using the returned results, as shown in the following notebook: https://github.com/nakamura196/ndl_ocr/blob/main/GradioのAPIを用いた物体検出例.ipynb There may be better approaches, but I hope this serves as a useful reference.

August 16, 2022 · 1 min · Nakamura

Building an Inference App Using Hugging Face Spaces and a YOLOv5 Model (Trained on the NDL-DocL Dataset)

Overview I created an inference app using Hugging Face Spaces and the YOLOv5 model (trained on the NDL-DocL dataset) introduced in the following article. You can try it at the following URL. https://huggingface.co/spaces/nakamura196/yolov5-ndl-layout You can also download the source code and trained model from the following URL. We hope this serves as a reference when developing similar applications. https://huggingface.co/spaces/nakamura196/yolov5-ndl-layout The application development referenced the following Space. https://huggingface.co/spaces/pytorch/YOLOv5 Usage You can upload an image or select one from the Examples. The recognition results can be viewed as shown below. ...

August 4, 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