diff --git a/notebooks/saving_and_loading.ipynb b/notebooks/saving_and_loading.ipynb index fd912d6..1b903db 100644 --- a/notebooks/saving_and_loading.ipynb +++ b/notebooks/saving_and_loading.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 5, "id": "f9a8c75d-11d7-4f4d-923a-054f10a60105", "metadata": {}, "outputs": [], @@ -13,10 +13,19 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 9, "id": "52306290-e9e9-4e96-9fe6-84a88e84b88d", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The autoreload extension is already loaded. To reload it, use:\n", + " %reload_ext autoreload\n" + ] + } + ], "source": [ "%load_ext autoreload\n", "%autoreload 3 -p\n", @@ -42,7 +51,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 10, "id": "46ddbbf0-abfc-409f-b9c4-573232839472", "metadata": {}, "outputs": [], @@ -52,27 +61,18 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 15, "id": "008c7597-2e64-4ac9-b11a-938d33c3102c", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/ajkdrag/workspace/ocrtoolkit/src/ocrtoolkit/utilities/io_utils.py:7: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n", - " from tqdm.autonotebook import tqdm\n" - ] - } - ], + "outputs": [], "source": [ - "from ocrtoolkit.core import detect\n", + "from ocrtoolkit.core import detect, detect_and_save_h5\n", "from ocrtoolkit.datasets import FileDS" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 12, "id": "0a561a4e-8b57-4d7d-822f-1baff89e5208", "metadata": {}, "outputs": [], @@ -90,7 +90,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 13, "id": "3f4c3a41-a659-409c-9c5b-199469e9030a", "metadata": {}, "outputs": [ @@ -98,7 +98,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "\u001b[32m2024-03-18 11:35:12.315\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mocrtoolkit.wrappers.model\u001b[0m:\u001b[36m__init__\u001b[0m:\u001b[36m22\u001b[0m - \u001b[1mLoaded model from ../pretrained/best.pt, to cpu\u001b[0m\n" + "\u001b[32m2024-03-30 20:51:41.466\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mocrtoolkit.wrappers.model\u001b[0m:\u001b[36m__init__\u001b[0m:\u001b[36m22\u001b[0m - \u001b[1mLoaded model from ../pretrained/best.pt, to cpu\u001b[0m\n" ] } ], @@ -116,14 +116,14 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 14, "id": "9c1677f0-c574-43dc-af60-37a1e7684598", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "3c1b9667baa6472e9417093e9a2c1132", + "model_id": "383ccd8a0e964e1a8620d15b9a57235b", "version_major": 2, "version_minor": 0 }, @@ -138,7 +138,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "\u001b[32m2024-03-18 11:35:20.645\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mocrtoolkit.utilities.io_utils\u001b[0m:\u001b[36mget_files\u001b[0m:\u001b[36m57\u001b[0m - \u001b[1mFound 235 files.\u001b[0m\n" + "\u001b[32m2024-03-30 20:51:41.729\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mocrtoolkit.utilities.io_utils\u001b[0m:\u001b[36mget_files\u001b[0m:\u001b[36m57\u001b[0m - \u001b[1mFound 235 files.\u001b[0m\n" ] } ], @@ -146,6 +146,38 @@ "mini_ds = FileDS(\"../data/public/images/\").sample()" ] }, + { + "cell_type": "code", + "execution_count": 16, + "id": "9f41c860-517a-40f0-b76c-5a720661b56b", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "8073008f3e33428488bf711937963187", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + " 0%| | 0/237 [00:00