{"id":5297,"date":"2026-03-02T23:15:44","date_gmt":"2026-03-02T14:15:44","guid":{"rendered":"https:\/\/matoken.org\/blog\/?p=5297"},"modified":"2026-03-03T19:19:47","modified_gmt":"2026-03-03T10:19:47","slug":"ndlocr-lite","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2026\/03\/02\/ndlocr-lite\/","title":{"rendered":"dGPU\u304c\u306a\u304f\u3066\u3082\u52d5\u4f5c\u3059\u308b\u56fd\u7acb\u56fd\u4f1a\u56f3\u66f8\u9928\u306eNDLOCR-Lite\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u305f\u306e\u3067\u8a66\u3059"},"content":{"rendered":"<div id=\"preamble\">\n<div class=\"sectionbody\">\n<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"48\" height=\"48\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M2 5v14h12v-2h-2c-1.11 0-2-.89-2-2V9c0-1.11.89-2 2-2h2V5m0 2v2h2V7m-2 2h-2v6h2m0 0v2h2v-2M5 7h2c1.11 0 2 .89 2 2v6c0 1.11-.89 2-2 2H5c-1.11 0-2-.89-2-2V9c0-1.11.89-2 2-2m12 0v10h2v-4h1v1h1v3h2v-3h-1v-2h1V8h-1V7M5 9v6h2V9m12 0h2v2h-2Z\"\/><\/svg><!-- https:\/\/icon-sets.iconify.design\/?query=ocr mdi:ocr --><\/p>\n<div class=\"paragraph\">\n<p>\u56fd\u7acb\u56fd\u4f1a\u56f3\u66f8\u9928\u304cNDL\u30e9\u30dc\u3067NDLOCR-Lite \u3092\u516c\u958b\u3057\u307e\u3057\u305f\uff0e<br \/>\n\u5143\u3005NDLOCR \u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u304cCUDA \u5bfe\u5fdc\u306eNVIDIA GPU \u304c\u5fc5\u9808\u3067\u3057\u305f\uff0e\u4eca\u56de\u306eNDLOCR-Lite \u306fdGPU \u306e\u7121\u3044PC \u3067\u3082\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306a\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<p><!--more--><\/p>\n<div class=\"quoteblock\">\n<blockquote>\n<div class=\"paragraph\">\n<p>NDLOCR-Lite\u306f\u3001NDLOCR\u306e\u8efd\u91cf\u7248\u3092\u76ee\u6307\u3057\u3066\u958b\u767a\u3057\u305fOCR\u3067\u3042\u308a\u3001\u30ce\u30fc\u30c8\u30d1\u30bd\u30b3\u30f3\u7b49\u306e\u4e00\u822c\u7684\u306a\u5bb6\u5ead\u7528\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u3084OS\u74b0\u5883\u3067\u3001\u56f3\u66f8\u3084\u96d1\u8a8c\u3068\u3044\u3063\u305f\u8cc7\u6599\u306e\u30c7\u30b8\u30bf\u30eb\u5316\u753b\u50cf\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u304c\u4f5c\u6210\u3067\u304d\u308bOCR\u3067\u3059\u3002<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>GPU\uff08Graphics Processing Unit\u3002\u753b\u50cf\u63cf\u753b\u7b49\u306e\u9ad8\u5ea6\u306a\u4e26\u5217\u8a08\u7b97\u3092\u51e6\u7406\u3059\u308b\u88c5\u7f6e\u3002\uff09\u3092\u5fc5\u8981\u3068\u305b\u305a\u3001\u8efd\u91cf\u306aOCR\u51e6\u7406\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u307e\u305f\u3001NDLOCR\u304c\u4e0d\u5f97\u610f\u3068\u3057\u3066\u3044\u305f\u82f1\u6587\u3084\u624b\u66f8\u304d\u6587\u5b57\u7b49\u306b\u3064\u3044\u3066\u3082\u5b9f\u9a13\u7684\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<\/div>\n<\/blockquote>\n<div class=\"attribution\">\n&#8212; <a href=\"https:\/\/lab.ndl.go.jp\/news\/2025\/2026-02-24\/\">NDLOCR-Lite\u306e\u516c\u958b\u306b\u3064\u3044\u3066 | NDL\u30e9\u30dc<\/a>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u5b9f\u969b\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306f\u3053\u3061\u3089\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/ndl-lab\/ndlocr-lite\">ndl-lab\/ndlocr-lite: NDLOCR\u2011Lite application repository (including source code)<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>\u985e\u4f3c\u306e\u3082\u306e\u306bNDL\u53e4\u5178\u7c4dOCR-Lite \u3068\u3044\u3046\u3082\u306e\u3082\u3042\u308a\u307e\u3059\uff0e\u3053\u308c\u3082dGPU \u306e\u5fc5\u8981\u306a\u3044OCR \u3067\u81ea\u5206\u3067\u306f\u8aad\u3081\u306a\u3044\u53e4\u5178\u3092OCR \u3067\u8aad\u3081\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u308a\u3057\u3066\u9762\u767d\u3044\u3067\u3059\uff0e<br \/>\n\u4ee5\u4e0b\u306f\u4ee5\u524d #kagokug \u3067\u767a\u8868\u3057\u305f\u95a2\u9023\u8cc7\u6599\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/gitlab.com\/matoken\/kagolug-2022.05\/-\/blob\/main\/slide\/ocr.adoc\">OCR\u3067\u753b\u50cf\u6587\u5b57\u3092\u6587\u5b57\u30c7\u30fc\u30bf\u306b<\/a> <a href=\"https:\/\/kagolug.connpass.com\/event\/246332\/\">\u9e7f\u5150\u5cf6Linux\u52c9\u5f37\u4f1a 2022.05<\/a> \u3067\u767a\u8868 <br \/>\n\u30d3\u30c7\u30aa\u3084\u753b\u50cf\u306a\u3069\u306b\u66f8\u304b\u308c\u305f\u6587\u5b57\u3092OCR \u3059\u308bScript \u3084NDLOCR \u306e\u7d39\u4ecb<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/codeberg.org\/matoken\/kagolug-2024.12\/src\/branch\/main\/slide\/slide.adoc\">\u6700\u8fd1\u8a66\u3057\u305fLinux\u306eOCR\u30c4\u30fc\u30eb(NDL\u53e4\u5178\u7c4dOCR-Lite\/YomiToku)<\/a> <a href=\"https:\/\/kagolug.connpass.com\/event\/339794\/\">\u9e7f\u5150\u5cf6Linux\u52c9\u5f37\u4f1a 2024.12<\/a> \u3067\u767a\u8868 <br \/>\nDL\u53e4\u5178\u7c4dOCR-Lite \u306e\u7d39\u4ecb\u306a\u3069<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"quoteblock\">\n<blockquote>\n<div class=\"ulist\">\n<ul>\n<li>\n<p>NDLOCR \u8981NVIDIA GPU<\/p>\n<div class=\"ulist\">\n<ul>\n<li>\n<p>NDL\u53e4\u5178\u7c4dOCR-Lite\u306e\u3088\u3046\u306bNDLOCR-Lite\u304c\u51fa\u306a\u3044\u304b\u306a?<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/li>\n<\/ul>\n<\/div>\n<\/blockquote>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u306e\u3068\u304d\u3053\u3093\u306a\u3053\u3068\u3092\u66f8\u3044\u3066\u3044\u307e\u3057\u305f\u304c\u5b9f\u73fe\u3057\u307e\u3057\u305f :)<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_gui\u7248\u3092\u8a66\u3059\">GUI\u7248\u3092\u8a66\u3059<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Windows\u7248\u306f\u4ee5\u4e0b\u306b\u4f7f\u3044\u65b9\u304c\u3042\u308a\u307e\u3059\uff0e\u81ea\u5206\u306fLinux\u7248\u3092\u8a66\u3057\u307e\u3057\u305f\u304c\u8d77\u52d5\u5f8c\u306e\u64cd\u4f5c\u306f\u540c\u3058\u3060\u3068\u601d\u3044\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/lab.ndl.go.jp\/data_set\/ndlocrlite-usage\/\">NDLOCR-Lite\u306e\u4f7f\u3044\u65b9 | NDL\u30e9\u30dc<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>GitHub \u306eReleases \u304b\u3089\u6700\u65b0\u306e\u30d0\u30a4\u30ca\u30ea\u3092\u5165\u624b\u3057\u307e\u3059\uff0ev1.1.0 \u6642\u70b9\u3067\u306fLinux amd64 \/ macOS arm64, amd64 \/ Windows(amd64?) \u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e\u3053\u3053\u3067\u306fLinux\u7248\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ wget -c https:\/\/github.com\/ndl-lab\/ndlocr-lite\/releases\/download\/1.1.0\/ndlocr_lite_v1.1.0_linux.tar.gz <b class=\"conum\">(1)<\/b>\n$ sha512sum ndlocr_lite_v1.1.0_linux.tar.gz <b class=\"conum\">(2)<\/b>\n61faed1fc843266095852697bbf29a721db4fb5a054f6d66ae8850301d22a4b1e29535eed150e439f7fd35760a17790a39cf0d45afd7c0ed72e7a3928e47ed93  ndlocr_lite_v1.1.0_linux.tar.gz\n$ fuse-archive ndlocr_lite_v1.1.0_linux.tar.gz <b class=\"conum\">(3)<\/b>\n$ file ndlocr_lite_v1.1.0_linux\/linux\/ndlocr_lite_gui <b class=\"conum\">(4)<\/b>\nndlocr_lite_v1.1.0_linux\/linux\/ndlocr_lite_gui: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter \/lib64\/ld-linux-x86-64.so.2, BuildID[sha1]=55e769c1bfe893353a55cdddbe7066033dc540bf, for GNU\/Linux 3.2.0, not stripped\n$ ndlocr_lite_v1.1.0_linux\/linux\/ndlocr_lite_gui <b class=\"conum\">(5)<\/b><\/pre>\n<\/div>\n<\/div>\n<div class=\"colist arabic\">\n<ol>\n<li>\n<p>\u30d0\u30a4\u30ca\u30ea\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u5165\u624b<\/p>\n<\/li>\n<li>\n<p>hash<\/p>\n<\/li>\n<li>\n<p>fuse-archive \u3067\u30a2\u30c9\u30db\u30c3\u30af\u306b\u5c55\u958b<\/p>\n<\/li>\n<li>\n<p>\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u3092\u78ba\u8a8d<\/p>\n<\/li>\n<li>\n<p>NDLOCR-Lite \u5b9f\u884c<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<div class=\"paragraph\">\n<p>NDL\u53e4\u5178\u7c4dOCR-Lite \u3068\u540c\u3058\u3088\u3046\u306b\u6271\u3048\u308b\u611f\u3058\u3067\u3059\uff0e\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\uff0c\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306e\u683c\u7d0d\u3055\u308c\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304b\u3089\u4e00\u62ec\u51e6\u7406\u306a\u3069\u304c\u53ef\u80fd\u3067\u3059\uff0e<br \/>\n\u305d\u306e\u4ed6\uff0c\u753b\u9762\u306e\u6307\u5b9a\u3057\u305f\u7bc4\u56f2\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3057\u3066OCR \u3059\u308b\u30ad\u30e3\u30d7\u30c1\u30e3\u30e2\u30fc\u30c9\u3082\u4fbf\u5229\u3067\u3059\uff0e\u305f\u3060\uff0c\u3053\u306e\u30e2\u30fc\u30c9\u306e\u30ad\u30e3\u30d7\u30c1\u30e3\u306fi3 wm \u3067\u306f\u5225\u306eworkspace \u306f\u30ad\u30e3\u30d7\u30c1\u30e3\u3067\u304d\u306a\u3055\u305d\u3046\u3067\u5c11\u3057\u4f7f\u3044\u52dd\u624b\u304c\u60aa\u3044\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/matoken.org\/blog\/wp-content\/uploads\/2026\/03\/NDLOCR-Lite_gui01.webp\" alt=\"NDLOCR Lite gui01\"><\/span><\/p>\n<\/div>\n<div class=\"admonitionblock note\">\n<table  class=\" table table-hover\" >\n<tr>\n<td class=\"icon\">\n<div class=\"title\">Note<\/div>\n<\/td>\n<td class=\"content\">\n\u753b\u50cf\u306e\u51fa\u5178\uff1a\u7d0d\u8c37\u53cb\u4e00 \u8a33\u8a3b\u300e\u9ed2\u732b\u300f,\u5065\u6587\u793e,1952. \u56fd\u7acb\u56fd\u4f1a\u56f3\u66f8\u9928\u30c7\u30b8\u30bf\u30eb\u30b3\u30ec\u30af\u30b7\u30e7\u30f3 <a href=\"https:\/\/dl.ndl.go.jp\/pid\/2436688\" class=\"bare\">https:\/\/dl.ndl.go.jp\/pid\/2436688<\/a>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_cli\u7248\u3092\u4f7f\u3046\">CLI\u7248\u3092\u4f7f\u3046<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>CLI\u7248\u306fPython 3.10+ \u304c\u5fc5\u8981\u3067\u3059\uff0e\u4eca\u56de\u306fDebian sid amd64 \u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u5c0e\u5165\u3057\u305fPython 3.13.12 \u3092\u5229\u7528\u3057\u307e\u3057\u305f\uff0e<br \/>\nREADME.md \u306b\u306fpip \u3067\u306e\u5c0e\u5165\u3068\uff0cuv \u3067\u306e\u5c0e\u5165\u304c\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\uff0e\u983b\u7e41\u306b\u4f7f\u3046\u5834\u5408\u306fuv \u306e\u65b9\u304c\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u304a\u597d\u307f\u306e\u65b9\u3067\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">pip \u3067venv \u4ee5\u4e0b\u306b\u5c0e\u5165\u3057\u305f\u4f8b<\/div>\n<div class=\"content\">\n<pre>$ git clone https:\/\/github.com\/ndl-lab\/ndlocr-lite\n$ cd ndlocr-lite\n$ python -m venv venv\n$ source venv\/bin\/activate\n$ pip install -r requirements.txt\n$ python3 src\/ocr.py -h\nusage: ocr.py [-h] [--sourcedir SOURCEDIR] [--sourceimg SOURCEIMG] --output OUTPUT [--viz VIZ] [--det-weights DET_WEIGHTS] [--det-classes DET_CLASSES] [--det-score-threshold DET_SCORE_THRESHOLD] [--det-conf-threshold DET_CONF_THRESHOLD]\n              [--det-iou-threshold DET_IOU_THRESHOLD] [--simple-mode SIMPLE_MODE] [--rec-weights30 REC_WEIGHTS30] [--rec-weights50 REC_WEIGHTS50] [--rec-weights REC_WEIGHTS] [--rec-classes REC_CLASSES] [--device {cpu,cuda}]\n\nArguments for NDLkotenOCR-Lite\n\noptions:\n  -h, --help            show this help message and exit\n  --sourcedir SOURCEDIR\n                        Path to image directory\n  --sourceimg SOURCEIMG\n                        Path to image directory\n  --output OUTPUT       Path to output directory\n  --viz VIZ             Save visualized image\n  --det-weights DET_WEIGHTS\n                        Path to deim onnx file\n  --det-classes DET_CLASSES\n                        Path to list of class in yaml file\n  --det-score-threshold DET_SCORE_THRESHOLD\n  --det-conf-threshold DET_CONF_THRESHOLD\n  --det-iou-threshold DET_IOU_THRESHOLD\n  --simple-mode SIMPLE_MODE\n                        Read line with one model(Setting this option to True will slow down processing, but it simplifies the architecture and may slightly improve accuracy.)\n  --rec-weights30 REC_WEIGHTS30\n                        Path to parseq-tiny onnx file\n  --rec-weights50 REC_WEIGHTS50\n                        Path to parseq-tiny onnx file\n  --rec-weights REC_WEIGHTS\n                        Path to parseq-tiny onnx file\n  --rec-classes REC_CLASSES\n                        Path to list of class in yaml file\n  --device {cpu,cuda}   Device use (cpu or cuda)<\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">uv \u3067\u5c0e\u5165\u3057\u305f\u4f8b<\/div>\n<div class=\"content\">\n<pre>$ git clone https:\/\/github.com\/ndl-lab\/ndlocr-lite\n$ cd ndlocr-lite\n$ uv tool install .\n$ which ndlocr-lite\n\/home\/matoken\/.local\/bin\/ndlocr-lite\n$ ndlocr-lite --help\nusage: ndlocr-lite [-h] [--sourcedir SOURCEDIR] [--sourceimg SOURCEIMG] --output OUTPUT [--viz VIZ] [--det-weights DET_WEIGHTS] [--det-classes DET_CLASSES] [--det-score-threshold DET_SCORE_THRESHOLD]\n                   [--det-conf-threshold DET_CONF_THRESHOLD] [--det-iou-threshold DET_IOU_THRESHOLD] [--simple-mode SIMPLE_MODE] [--rec-weights30 REC_WEIGHTS30] [--rec-weights50 REC_WEIGHTS50] [--rec-weights REC_WEIGHTS]\n                   [--rec-classes REC_CLASSES] [--device {cpu,cuda}]\n\nArguments for NDLkotenOCR-Lite\n\noptions:\n  -h, --help            show this help message and exit\n  --sourcedir SOURCEDIR\n                        Path to image directory\n  --sourceimg SOURCEIMG\n                        Path to image directory\n  --output OUTPUT       Path to output directory\n  --viz VIZ             Save visualized image\n  --det-weights DET_WEIGHTS\n                        Path to deim onnx file\n  --det-classes DET_CLASSES\n                        Path to list of class in yaml file\n  --det-score-threshold DET_SCORE_THRESHOLD\n  --det-conf-threshold DET_CONF_THRESHOLD\n  --det-iou-threshold DET_IOU_THRESHOLD\n  --simple-mode SIMPLE_MODE\n                        Read line with one model(Setting this option to True will slow down processing, but it simplifies the architecture and may slightly improve accuracy.)\n  --rec-weights30 REC_WEIGHTS30\n                        Path to parseq-tiny onnx file\n  --rec-weights50 REC_WEIGHTS50\n                        Path to parseq-tiny onnx file\n  --rec-weights REC_WEIGHTS\n                        Path to parseq-tiny onnx file\n  --rec-classes REC_CLASSES\n                        Path to list of class in yaml file\n  --device {cpu,cuda}   Device use (cpu or cuda)<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3082\u3057cuda \u5bfe\u5fdcGPU \u306e\u3042\u308b\u74b0\u5883\u3067\u3042\u308c\u3070\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30aa\u30d7\u30b7\u30e7\u30f3\u306b <code>--device cuda<\/code> \u3092\u6e21\u3059\u3053\u3068\u3067\u901f\u304f\u306a\u308b\u3068\u601d\u3044\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_cli\u7248\u5b9f\u884c\u4f8b\">cli\u7248\u5b9f\u884c\u4f8b<\/h3>\n<div class=\"paragraph\">\n<p><code>--sourcedir<\/code> (\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u8907\u6570\u753b\u50cf)\u304b <code>--sourceimg<\/code> (1\u3064\u306e\u753b\u50cf\u30d5\u30a1\u30a4\u30eb)\u3067\u51e6\u7406\u5bfe\u8c61\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304b\u51e6\u7406\u5bfe\u8c61\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\uff0c <code>--output<\/code> \u3067\u7d50\u679c\u306e\u51fa\u529b\u5148\u3092\u6307\u5b9a\uff0c<code>--viz True<\/code> \u3067\u53ef\u8996\u5316\u753b\u50cf\u3092\u6709\u52b9\u306b\u3057\u3066\u5b9f\u884c\uff08\u30aa\u30d7\u30b7\u30e7\u30f3)<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ time ndlocr-lite --sourcedir . --output . --viz True\n[INFO] Intialize Model\n[INFO] Inference Image\n69\n[INFO] Saving result on .\/viz_digidepo_2436688_0001-0.jpg\nTotal calculation time (Detection + Recognition): 13.220851182937622\n  :\nreal    2m15.882s\nuser    10m16.273s\nsys     0m5.189s\n$ ls\ndigidepo_2436688_0001-0.jpg   digidepo_2436688_0001-4.json  digidepo_2436688_0001-8.txt\ndigidepo_2436688_0001-0.json  digidepo_2436688_0001-4.txt   digidepo_2436688_0001-8.xml\ndigidepo_2436688_0001-0.txt   digidepo_2436688_0001-4.xml   digidepo_2436688_0001-9.jpg\ndigidepo_2436688_0001-0.xml   digidepo_2436688_0001-5.jpg   digidepo_2436688_0001-9.json\ndigidepo_2436688_0001-1.jpg   digidepo_2436688_0001-5.json  digidepo_2436688_0001-9.txt\ndigidepo_2436688_0001-1.json  digidepo_2436688_0001-5.txt   digidepo_2436688_0001-9.xml\ndigidepo_2436688_0001-1.txt   digidepo_2436688_0001-5.xml   viz_digidepo_2436688_0001-0.jpg\ndigidepo_2436688_0001-1.xml   digidepo_2436688_0001-6.jpg   viz_digidepo_2436688_0001-1.jpg\ndigidepo_2436688_0001-2.jpg   digidepo_2436688_0001-6.json  viz_digidepo_2436688_0001-2.jpg\ndigidepo_2436688_0001-2.json  digidepo_2436688_0001-6.txt   viz_digidepo_2436688_0001-3.jpg\ndigidepo_2436688_0001-2.txt   digidepo_2436688_0001-6.xml   viz_digidepo_2436688_0001-4.jpg\ndigidepo_2436688_0001-2.xml   digidepo_2436688_0001-7.jpg   viz_digidepo_2436688_0001-5.jpg\ndigidepo_2436688_0001-3.jpg   digidepo_2436688_0001-7.json  viz_digidepo_2436688_0001-6.jpg\ndigidepo_2436688_0001-3.json  digidepo_2436688_0001-7.txt   viz_digidepo_2436688_0001-7.jpg\ndigidepo_2436688_0001-3.txt   digidepo_2436688_0001-7.xml   viz_digidepo_2436688_0001-8.jpg\ndigidepo_2436688_0001-3.xml   digidepo_2436688_0001-8.jpg   viz_digidepo_2436688_0001-9.jpg\ndigidepo_2436688_0001-4.jpg   digidepo_2436688_0001-8.json<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u3053\u3067\u306e\u30d5\u30a1\u30a4\u30eb\u7fa4\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"dlist\">\n<dl>\n<dt class=\"hdlist1\">digidepo_2436688_0001-&#8220;${N}&#8221;.jpg<\/dt>\n<dd>\n<p>OCR \u5bfe\u8c61\u753b\u50cf<\/p>\n<\/dd>\n<dt class=\"hdlist1\">digidepo_2436688_0001-&#8220;${N}&#8221;.json,  digidepo_2436688_0001-&#8220;${N}&#8221;.txt,  digidepo_2436688_0001-&#8220;${N}&#8221;.xml<\/dt>\n<dd>\n<p>OCR \u7d50\u679c<\/p>\n<\/dd>\n<dt class=\"hdlist1\">viz_digidepo_2436688_0001-&#8220;${N}&#8221;.jpg<\/dt>\n<dd>\n<p>\u53ef\u8996\u5316\u753b\u50cf(\u30aa\u30d7\u30b7\u30e7\u30f3)<\/p>\n<\/dd>\n<\/dl>\n<\/div>\n<div class=\"paragraph\">\n<p>\u56fd\u7acb\u56fd\u4f1a\u56f3\u66f8\u9928\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305fpdf \u306e10\u30b3\u30de(20\u30da\u30fc\u30b8\u5206)\u3092Imagemagick \u3067jpeg \u753b\u50cf\u306b\u5909\u63db\u3057\u305f\u3082\u306e\u306b\u5bfe\u3057\u3066\u5b9f\u884c\u3057\u305f\u3068\u3053\u308d2\u520616\u79d2\u307b\u3069\u639b\u304b\u308a\u307e\u3057\u305f\uff0e1\u753b\u50cf\u3042\u305f\u308a13.6\u79d2\uff0c1\u30da\u30fc\u30b8\u3042\u305f\u308a6.8\u79d2\u307b\u3069\uff0e\u82f1\u8a9e\u65e5\u672c\u8a9e\u6df7\u3058\u308a\u3067\u3082\u7cbe\u5ea6\u826f\u3055\u305d\u3046\u3067\u3059\uff0e<br \/>\nOCR \u74b0\u5883\u306f\uff0cLENOVO ThinkPad L13 (G1), CPU: Intel&#174; Core&#8482; i7-10510U CPU @ 1.80GHz, RAM: DDR4 16GB, SSD: NVMe TOSHIBA KXG6AZNV512G \u306bDebian sid amd64 \u3092\u5c0e\u5165\u3057\u305f\u74b0\u5883\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u30b9\u30ad\u30e3\u30f3\u3057\u305f\u753b\u50cf\u30c7\u30fc\u30bf\u306f\u3053\u3093\u306a\u611f\u3058(1\u30b3\u30de2\u30da\u30fc\u30b8\u5206)<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ file viz_digidepo_2436688_0001-0.jpg\nviz_digidepo_2436688_0001-0.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 2481x1761, components 3<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>GNU time \u306e -f %M \u3067RAM \u306e\u5229\u7528\u91cf\u3092\u898b\u305f\u3068\u3053\u308d\u3053\u306e\u753b\u50cf1\u679a\u306e\u51e6\u7406\u3067600MB \u8fd1\u304f\uff0c10\u679a\u3067860MB \u7a0b\u3067\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/matoken.org\/blog\/wp-content\/uploads\/2026\/03\/NDLOCR-Lite_cli01.webp\" alt=\"NDLOCR Lite cli01\"><\/span><\/p>\n<\/div>\n<div class=\"admonitionblock note\">\n<table  class=\" table table-hover\" >\n<tr>\n<td class=\"icon\">\n<div class=\"title\">Note<\/div>\n<\/td>\n<td class=\"content\">\n\u753b\u50cf\u306e\u51fa\u5178\uff1a\u7d0d\u8c37\u53cb\u4e00 \u8a33\u8a3b\u300e\u9ed2\u732b\u300f,\u5065\u6587\u793e,1952. \u56fd\u7acb\u56fd\u4f1a\u56f3\u66f8\u9928\u30c7\u30b8\u30bf\u30eb\u30b3\u30ec\u30af\u30b7\u30e7\u30f3 <a href=\"https:\/\/dl.ndl.go.jp\/pid\/2436688\" class=\"bare\">https:\/\/dl.ndl.go.jp\/pid\/2436688<\/a>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_linux\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u3067\u30ad\u30e3\u30d7\u30c1\u30e3\u30e2\u30fc\u30c9\">Linux\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u3067\u30ad\u30e3\u30d7\u30c1\u30e3\u30e2\u30fc\u30c9<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>NDLOCR-Lite GUI\u7248\u306b\u306f\u30ad\u30e3\u30d7\u30c1\u30e3\u30e2\u30fc\u30c9\u304c\u3042\u308a\u4fbf\u5229\u305d\u3046\u3067\u3059\u304c\uff0cNDLOCR-Lite \u3092\u8d77\u52d5\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e<br \/>\n<a href=\"https:\/\/gitlab.com\/matoken\/kagolug-2022.05\/-\/blob\/main\/slide\/ocr.adoc\">\u540c\u3058\u3088\u3046\u306a\u3053\u3068\u3092\u4ee5\u524d\u304b\u3089 <code>tesseract-ocr<\/code> \u3067\u3084\u3063\u3066\u3044\u307e\u3057\u305f\uff0e<\/a>\u3053\u308c\u306f\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u74b0\u5883\u306b\u767b\u9332\u3057\u305f\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3067\u30b9\u30af\u30ea\u30fc\u30f3\u30ad\u30e3\u30d7\u30c1\u30e3\u3068OCR \u3092\u884c\u3044\uff0c\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u7d50\u679c\u3092\u8fd4\u3059\u3082\u306e\u3067\u3057\u305f\uff0e\u3053\u308c\u3092NDLOCR-Lite \u3067\u52d5\u304f\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u3066\u307f\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ cat ~\/bin\/ndlocr-lite.bash\n#!\/bin\/bash\n\nTMPDIR=$(mktemp -d)\nIMAGEFILE=\"$(mktemp).png\"\nimport png:\"${IMAGEFILE}\" <b class=\"conum\">(1)<\/b>\n#sixelv \"${IMAGEFILE}\"\nconvert \"${IMAGEFILE}\" sixel: <b class=\"conum\">(2)<\/b>\nndlocr-lite --sourceimg \"${IMAGEFILE}\" --output \"${TMPDIR}\" <b class=\"conum\">(3)<\/b>\n\nif [ $? ]; then\n  cat \"${TMPDIR}\"\/*.txt | pee cat \"xsel -b\" <b class=\"conum\">(4)<\/b>\n  notify-send 'ocr&#x1f4cb;&#xfe0f;(primary)' <b class=\"conum\">(5)<\/b>\nelse\n  notify-send 'ocr error'\n  exit 1\nfi\n\nrm \"${IMAGEFILE}\" <b class=\"conum\">(6)<\/b>\nrm -r \"${TMPDIR}\"<\/pre>\n<\/div>\n<\/div>\n<div class=\"colist arabic\">\n<ol>\n<li>\n<p>Imagemagick \u306eimport \u30b3\u30de\u30f3\u30c9\u3067\u4efb\u610f\u306e\u5834\u6240\u3092\u30ad\u30e3\u30d7\u30c1\u30e3<\/p>\n<\/li>\n<li>\n<p>\u30c7\u30d0\u30c3\u30b0\u7528\u306b\u753b\u50cf\u51fa\u529b<\/p>\n<\/li>\n<li>\n<p>NDLOCR-Lite \u3067\u6587\u5b57\u8d77\u3053\u3057<\/p>\n<\/li>\n<li>\n<p>\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u683c\u7d0d<\/p>\n<\/li>\n<li>\n<p>notify-send \u3067\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306b\u901a\u77e5<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<div class=\"paragraph\">\n<p>\u5b9f\u884c\u3059\u308b\u3068\u3053\u3093\u306a\u611f\u3058\uff0e\u52d5\u753b\u5185\u306e\u30b9\u30e9\u30a4\u30c9\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3057\u3066\u3044\u307e\u3059\uff0e\u89e3\u50cf\u5ea6\u304c\u4f4e\u3044\u3068\u3044\u307e\u3044\u3061\u3067\u3059\u304c\u89e3\u50cf\u5ea6\u304c\u9ad8\u3044\u3068\u3044\u3044\u611f\u3058\u3067\u3059\uff0etermial \u3067\u53e9\u304f\u3068\u30c7\u30d0\u30c3\u30b0\u7528\u306bSixel \u3067\u30ad\u30e3\u30d7\u30c1\u30e3\u753b\u50cf\u3082\u51fa\u3059\u3088\u3046\u306b\u3057\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/matoken.org\/blog\/wp-content\/uploads\/2026\/03\/NDLOCR-Lite_bash.webp\" alt=\"NDLOCR Lite bash\"><\/span><\/p>\n<\/div>\n<div class=\"admonitionblock note\">\n<table  class=\" table table-hover\" >\n<tr>\n<td class=\"icon\">\n<div class=\"title\">Note<\/div>\n<\/td>\n<td class=\"content\">\n\u753b\u50cf\u306e\u51fa\u5178\uff1a\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30ab\u30f3\u30d5\u30a1\u30ec\u30f3\u30b92026 Tokyo\/Spring 2\u65e5\u76ee\u30e9\u30a4\u30c8\u30cb\u30f3\u30b0\u30c8\u30fc\u30af\u306e\u30aa\u30fc\u30d7\u30cb\u30f3\u30b0\u3088\u308a <a href=\"https:\/\/www.youtube.com\/watch?v=xtb3ZFb6WvA\" class=\"bare\">https:\/\/www.youtube.com\/watch?v=xtb3ZFb6WvA<\/a>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u306ebash script \u3092WindowManager \u306b\u767b\u9332\u3057\u3066\u304a\u304d\u307e\u3059\uff0e\u4ee5\u4e0b\u306fi3 wm \u3067 <span class=\"keyseq\"><kbd>Super<\/kbd>+<kbd>Shift<\/kbd>+<kbd>o<\/kbd><\/span> \u3067\u547c\u3073\u51fa\u305b\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>~\/.config\/i3\/config<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ grep ocr ~\/.config\/i3\/config\n#OCR https:\/\/gitlab.com\/matoken\/kagolug-2022.05\/-\/blob\/main\/slide\/ocr.adoc\nbindsym $mod+Shift+o exec --no-startup-id ~\/bin\/ndlocr-lite.bash<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u4fbf\u5229\u306b\u4f7f\u3048\u305d\u3046\u3067\u3059\uff0e<br \/>\n\u56fd\u7acb\u56fd\u4f1a\u56f3\u66f8\u9928\u306e\u9060\u9694\u9001\u4fe1\u30b5\u30fc\u30d3\u30b9\u3067\u95b2\u89a7\u53ef\u80fd\u306a\u66f8\u7c4d\u306a\u3069\u3092\u5c0f\u3055\u306a\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u306a\u3069\u306e\u7aef\u672b\u3067\u8aad\u3080\u306e\u306f\u3044\u307e\u3044\u3061\u3068\u601d\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\uff0c\u3053\u308c\u3067\u6587\u5b57\u8d77\u3053\u3057\u3057\u3066\u8aad\u3093\u3067\u307f\u308b\u306e\u3082\u3042\u308a\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff0c<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_\u74b0\u5883\">\u74b0\u5883<\/h2>\n<div class=\"sectionbody\">\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ git log --pretty=oneline -1\n4f0748be4244a2e36d4dd43af05d6eebded3d56d (HEAD -&gt; master, origin\/master, origin\/HEAD) Merge pull request #13 from mattn\/fallback-line\n$ pipx list | grep uv\n   package uv 0.10.7, installed using Python 3.13.3\n    - uv\n    - uvx\n$ dpkg-query -W python3 python3-venv\npython3 3.13.9-3\npython3-venv    3.13.9-3\n$ lsb_release -dr\nDescription:    Debian GNU\/Linux forky\/sid\nRelease:        n\/a\n$ arch\nx86_64<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_toot\">toot<\/h2>\n<div class=\"sectionbody\">\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/inari.opencocon.org\/deck\/@matoken\/116127680676219375\">matoken :fox:: &#8220;NDL\u53e4\u5178\u7c4dOCR-Lite \u306b\u7d9a\u304dNDLOCR-Lite \u2026&#8221; &#8211; \u3044\u306a\u3053\u3093<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u56fd\u7acb\u56fd\u4f1a\u56f3\u66f8\u9928\u304cNDL\u30e9\u30dc\u3067NDLOCR-Lite \u3092\u516c\u958b\u3057\u307e\u3057\u305f\uff0e \u5143\u3005NDLOCR \u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u304cCUDA \u5bfe\u5fdc\u306eNVIDIA GPU \u304c\u5fc5\u9808\u3067\u3057\u305f\uff0e\u4eca\u56de\u306eNDLOCR-Lite \u306fdGPU \u306e\u7121\u3044PC \u3067\u3082 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":""},"categories":[7,6,199],"tags":[1147,1269,1148],"class_list":["post-5297","post","type-post","status-publish","format-standard","hentry","category-debian-linux","category-linux","category-sid","tag-ndl","tag-ndlocr-lite","tag-ocr"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/5297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=5297"}],"version-history":[{"count":2,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/5297\/revisions"}],"predecessor-version":[{"id":5304,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/5297\/revisions\/5304"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=5297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=5297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=5297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}