From 63b8e2bf8b981b6de54935b90a68ebcbaf708f71 Mon Sep 17 00:00:00 2001
From: bhomik-7 <68145844+bhomik-7@users.noreply.github.com>
Date: Fri, 23 Apr 2021 12:52:15 +0530
Subject: [PATCH] TF-Record Data Added
---
BMS Data Processing (TF-Records).ipynb | 2983 ++++++++++++++++++++++++
1 file changed, 2983 insertions(+)
create mode 100644 BMS Data Processing (TF-Records).ipynb
diff --git a/BMS Data Processing (TF-Records).ipynb b/BMS Data Processing (TF-Records).ipynb
new file mode 100644
index 0000000..7a129f3
--- /dev/null
+++ b/BMS Data Processing (TF-Records).ipynb
@@ -0,0 +1,2983 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19",
+ "_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5",
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:32:36.006747Z",
+ "iopub.status.busy": "2021-04-11T16:32:36.005151Z",
+ "iopub.status.idle": "2021-04-11T16:32:44.829782Z",
+ "shell.execute_reply": "2021-04-11T16:32:44.828449Z"
+ },
+ "papermill": {
+ "duration": 8.859981,
+ "end_time": "2021-04-11T16:32:44.829947",
+ "exception": false,
+ "start_time": "2021-04-11T16:32:35.969966",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "import matplotlib.pyplot as plt\n",
+ "import tensorflow as tf\n",
+ "from tqdm.notebook import tqdm\n",
+ "\n",
+ "import cv2, os, pickle\n",
+ "\n",
+ "\n",
+ "import joblib\n",
+ "from multiprocessing import cpu_count"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:32:44.872993Z",
+ "iopub.status.busy": "2021-04-11T16:32:44.872095Z",
+ "iopub.status.idle": "2021-04-11T16:32:44.876848Z",
+ "shell.execute_reply": "2021-04-11T16:32:44.877532Z"
+ },
+ "papermill": {
+ "duration": 0.02927,
+ "end_time": "2021-04-11T16:32:44.877767",
+ "exception": false,
+ "start_time": "2021-04-11T16:32:44.848497",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "# Mean ratio of first 10K images is 1.73, this image width/height result in a ratio of 1.75\n",
+ "DEBUG = False\n",
+ "IMG_HEIGHT = 256\n",
+ "IMG_WIDTH = 448\n",
+ "VAL_SIZE = int(100) if DEBUG else int(100e3) # 100K validation molecules\n",
+ "CHUNK_SIZE = 40000 # to get ~100MB TFRecords\n",
+ "\n",
+ "MAX_INCHI_LEN = 200 # maximum InChI length to prevent to much padding"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:32:44.940708Z",
+ "iopub.status.busy": "2021-04-11T16:32:44.939831Z",
+ "iopub.status.idle": "2021-04-11T16:32:58.563772Z",
+ "shell.execute_reply": "2021-04-11T16:32:58.563100Z"
+ },
+ "papermill": {
+ "duration": 13.658672,
+ "end_time": "2021-04-11T16:32:58.563913",
+ "exception": false,
+ "start_time": "2021-04-11T16:32:44.905241",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " image_id | \n",
+ " InChI | \n",
+ " InChI_len | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 000011a64c74 | \n",
+ " InChI=1S/C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12... | \n",
+ " 81 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 000019cc0cd2 | \n",
+ " InChI=1S/C21H30O4/c1-12(22)25-14-6-8-20(2)13(1... | \n",
+ " 155 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 0000252b6d2b | \n",
+ " InChI=1S/C24H23N5O4/c1-14-13-15(7-8-17(14)28-1... | \n",
+ " 158 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " image_id InChI InChI_len\n",
+ "0 000011a64c74 InChI=1S/C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12... 81\n",
+ "1 000019cc0cd2 InChI=1S/C21H30O4/c1-12(22)25-14-6-8-20(2)13(1... 155\n",
+ "2 0000252b6d2b InChI=1S/C24H23N5O4/c1-14-13-15(7-8-17(14)28-1... 158"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "if DEBUG:\n",
+ " train = pd.read_csv('/kaggle/input/bms-molecular-translation/train_labels.csv', dtype={ 'image_id': 'string', 'InChI': 'string' }).head(int(1e3))\n",
+ "else:\n",
+ " train = pd.read_csv('/kaggle/input/bms-molecular-translation/train_labels.csv', dtype={ 'image_id': 'string', 'InChI': 'string' })\n",
+ "\n",
+ "# Drop all InChI longer than MAX_INCHI_LEN - 2, InChI , remove 'InChI=1S/' at start\n",
+ "train['InChI_len'] = train['InChI'].apply(len).astype(np.uint16)\n",
+ "train = train.loc[train['InChI_len'] <= MAX_INCHI_LEN - 2 + 9].reset_index(drop=True)\n",
+ "train.head(3)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:32:58.608285Z",
+ "iopub.status.busy": "2021-04-11T16:32:58.607579Z",
+ "iopub.status.idle": "2021-04-11T16:33:00.326966Z",
+ "shell.execute_reply": "2021-04-11T16:33:00.326030Z"
+ },
+ "papermill": {
+ "duration": 1.744547,
+ "end_time": "2021-04-11T16:33:00.327138",
+ "exception": false,
+ "start_time": "2021-04-11T16:32:58.582591",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " image_id | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 00000d2a601c | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 00001f7fc849 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 000037687605 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " image_id\n",
+ "0 00000d2a601c\n",
+ "1 00001f7fc849\n",
+ "2 000037687605"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "if DEBUG:\n",
+ " test = pd.read_csv('/kaggle/input/bms-molecular-translation/sample_submission.csv', usecols=['image_id'], dtype={ 'image_id': 'string' }).head(int(1e3))\n",
+ "else:\n",
+ " test = pd.read_csv('/kaggle/input/bms-molecular-translation/sample_submission.csv', usecols=['image_id'], dtype={ 'image_id': 'string' })\n",
+ "test.head(3)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:33:00.392102Z",
+ "iopub.status.busy": "2021-04-11T16:33:00.390975Z",
+ "iopub.status.idle": "2021-04-11T16:33:09.196446Z",
+ "shell.execute_reply": "2021-04-11T16:33:09.196908Z"
+ },
+ "papermill": {
+ "duration": 8.841344,
+ "end_time": "2021-04-11T16:33:09.197076",
+ "exception": false,
+ "start_time": "2021-04-11T16:33:00.355732",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "cf7966e60a5442ff856afd92e0317ab7",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ " 0%| | 0/2371184 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "def get_vocabulary():\n",
+ " tokens = ['', '', '']\n",
+ " vocabulary = set()\n",
+ " for s in tqdm(train['InChI'].values):\n",
+ " vocabulary.update(s)\n",
+ " return tokens + list(vocabulary)\n",
+ "\n",
+ "vocabulary = get_vocabulary()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:33:09.244991Z",
+ "iopub.status.busy": "2021-04-11T16:33:09.244045Z",
+ "iopub.status.idle": "2021-04-11T16:33:09.251295Z",
+ "shell.execute_reply": "2021-04-11T16:33:09.250540Z"
+ },
+ "papermill": {
+ "duration": 0.033992,
+ "end_time": "2021-04-11T16:33:09.251448",
+ "exception": false,
+ "start_time": "2021-04-11T16:33:09.217456",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "# Save vocabulary mappings\n",
+ "# character -> integer\n",
+ "vocabulary_to_int = dict(zip(vocabulary, np.arange(len(vocabulary), dtype=np.int8)))\n",
+ "with open('vocabulary_to_int.pkl', 'wb') as handle:\n",
+ " pickle.dump(vocabulary_to_int, handle)\n",
+ "\n",
+ "# integer -> character\n",
+ "int_to_vocabulary = dict(zip(np.arange(len(vocabulary), dtype=np.int8), vocabulary))\n",
+ "with open('int_to_vocabulary.pkl', 'wb') as handle:\n",
+ " pickle.dump(int_to_vocabulary, handle)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:33:09.292814Z",
+ "iopub.status.busy": "2021-04-11T16:33:09.292159Z",
+ "iopub.status.idle": "2021-04-11T16:33:12.249012Z",
+ "shell.execute_reply": "2021-04-11T16:33:12.249395Z"
+ },
+ "papermill": {
+ "duration": 2.97817,
+ "end_time": "2021-04-11T16:33:12.249532",
+ "exception": false,
+ "start_time": "2021-04-11T16:33:09.271362",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " image_id | \n",
+ " InChI | \n",
+ " InChI_len | \n",
+ " InChIClean | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 000011a64c74 | \n",
+ " InChI=1S/C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12... | \n",
+ " 81 | \n",
+ " C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12(13)11(4)... | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 000019cc0cd2 | \n",
+ " InChI=1S/C21H30O4/c1-12(22)25-14-6-8-20(2)13(1... | \n",
+ " 155 | \n",
+ " C21H30O4/c1-12(22)25-14-6-8-20(2)13(10-14)11-1... | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 0000252b6d2b | \n",
+ " InChI=1S/C24H23N5O4/c1-14-13-15(7-8-17(14)28-1... | \n",
+ " 158 | \n",
+ " C24H23N5O4/c1-14-13-15(7-8-17(14)28-12-10-20(2... | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 000026b49b7e | \n",
+ " InChI=1S/C17H24N2O4S/c1-12(20)18-13(14-7-6-10-... | \n",
+ " 147 | \n",
+ " C17H24N2O4S/c1-12(20)18-13(14-7-6-10-24-14)11-... | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 000026fc6c36 | \n",
+ " InChI=1S/C10H19N3O2S/c1-15-10(14)12-8-4-6-13(7... | \n",
+ " 96 | \n",
+ " C10H19N3O2S/c1-15-10(14)12-8-4-6-13(7-8)5-2-3-... | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " image_id InChI InChI_len \\\n",
+ "0 000011a64c74 InChI=1S/C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12... 81 \n",
+ "1 000019cc0cd2 InChI=1S/C21H30O4/c1-12(22)25-14-6-8-20(2)13(1... 155 \n",
+ "2 0000252b6d2b InChI=1S/C24H23N5O4/c1-14-13-15(7-8-17(14)28-1... 158 \n",
+ "3 000026b49b7e InChI=1S/C17H24N2O4S/c1-12(20)18-13(14-7-6-10-... 147 \n",
+ "4 000026fc6c36 InChI=1S/C10H19N3O2S/c1-15-10(14)12-8-4-6-13(7... 96 \n",
+ "\n",
+ " InChIClean \n",
+ "0 C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12(13)11(4)... \n",
+ "1 C21H30O4/c1-12(22)25-14-6-8-20(2)13(10-14)11-1... \n",
+ "2 C24H23N5O4/c1-14-13-15(7-8-17(14)28-12-10-20(2... \n",
+ "3 C17H24N2O4S/c1-12(20)18-13(14-7-6-10-24-14)11-... \n",
+ "4 C10H19N3O2S/c1-15-10(14)12-8-4-6-13(7-8)5-2-3-... "
+ ]
+ },
+ "execution_count": 7,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "train['InChIClean'] = train['InChI'].apply(lambda InChI: '/'.join(InChI.split('=')[1].split('/')[1:]))\n",
+ "train.head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:33:12.304432Z",
+ "iopub.status.busy": "2021-04-11T16:33:12.303438Z",
+ "iopub.status.idle": "2021-04-11T16:36:32.509842Z",
+ "shell.execute_reply": "2021-04-11T16:36:32.509268Z"
+ },
+ "papermill": {
+ "duration": 200.245694,
+ "end_time": "2021-04-11T16:36:32.509984",
+ "exception": false,
+ "start_time": "2021-04-11T16:33:12.264290",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "8cc57fc211714c13a5835557f2aac9cb",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ " 0%| | 0/2371184 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " image_id | \n",
+ " InChI | \n",
+ " InChI_len | \n",
+ " InChIClean | \n",
+ " InChI_int | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 000011a64c74 | \n",
+ " InChI=1S/C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12... | \n",
+ " 81 | \n",
+ " C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12(13)11(4)... | \n",
+ " [0, 38, 26, 36, 17, 40, 10, 37, 8, 16, 33, 26,... | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 000019cc0cd2 | \n",
+ " InChI=1S/C21H30O4/c1-12(22)25-14-6-8-20(2)13(1... | \n",
+ " 155 | \n",
+ " C21H30O4/c1-12(22)25-14-6-8-20(2)13(10-14)11-1... | \n",
+ " [0, 38, 40, 26, 17, 36, 10, 37, 12, 16, 33, 26... | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 0000252b6d2b | \n",
+ " InChI=1S/C24H23N5O4/c1-14-13-15(7-8-17(14)28-1... | \n",
+ " 158 | \n",
+ " C24H23N5O4/c1-14-13-15(7-8-17(14)28-12-10-20(2... | \n",
+ " [0, 38, 40, 12, 17, 40, 36, 15, 3, 37, 12, 16,... | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 000026b49b7e | \n",
+ " InChI=1S/C17H24N2O4S/c1-12(20)18-13(14-7-6-10-... | \n",
+ " 147 | \n",
+ " C17H24N2O4S/c1-12(20)18-13(14-7-6-10-24-14)11-... | \n",
+ " [0, 38, 26, 24, 17, 40, 12, 15, 40, 37, 12, 8,... | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 000026fc6c36 | \n",
+ " InChI=1S/C10H19N3O2S/c1-15-10(14)12-8-4-6-13(7... | \n",
+ " 96 | \n",
+ " C10H19N3O2S/c1-15-10(14)12-8-4-6-13(7-8)5-2-3-... | \n",
+ " [0, 38, 26, 10, 17, 26, 19, 15, 36, 37, 40, 8,... | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " image_id InChI InChI_len \\\n",
+ "0 000011a64c74 InChI=1S/C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12... 81 \n",
+ "1 000019cc0cd2 InChI=1S/C21H30O4/c1-12(22)25-14-6-8-20(2)13(1... 155 \n",
+ "2 0000252b6d2b InChI=1S/C24H23N5O4/c1-14-13-15(7-8-17(14)28-1... 158 \n",
+ "3 000026b49b7e InChI=1S/C17H24N2O4S/c1-12(20)18-13(14-7-6-10-... 147 \n",
+ "4 000026fc6c36 InChI=1S/C10H19N3O2S/c1-15-10(14)12-8-4-6-13(7... 96 \n",
+ "\n",
+ " InChIClean \\\n",
+ "0 C13H20OS/c1-9(2)8-15-13-6-5-10(3)7-12(13)11(4)... \n",
+ "1 C21H30O4/c1-12(22)25-14-6-8-20(2)13(10-14)11-1... \n",
+ "2 C24H23N5O4/c1-14-13-15(7-8-17(14)28-12-10-20(2... \n",
+ "3 C17H24N2O4S/c1-12(20)18-13(14-7-6-10-24-14)11-... \n",
+ "4 C10H19N3O2S/c1-15-10(14)12-8-4-6-13(7-8)5-2-3-... \n",
+ "\n",
+ " InChI_int \n",
+ "0 [0, 38, 26, 36, 17, 40, 10, 37, 8, 16, 33, 26,... \n",
+ "1 [0, 38, 40, 26, 17, 36, 10, 37, 12, 16, 33, 26... \n",
+ "2 [0, 38, 40, 12, 17, 40, 36, 15, 3, 37, 12, 16,... \n",
+ "3 [0, 38, 26, 24, 17, 40, 12, 15, 40, 37, 12, 8,... \n",
+ "4 [0, 38, 26, 10, 17, 26, 19, 15, 36, 37, 40, 8,... "
+ ]
+ },
+ "execution_count": 8,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# convert the InChI strings to integer lists\n",
+ "# start/end/pad tokens are used\n",
+ "def inchi_str2int(InChI):\n",
+ " res = []\n",
+ " res.append(vocabulary_to_int.get(''))\n",
+ " for c in InChI:\n",
+ " res.append(vocabulary_to_int.get(c))\n",
+ " \n",
+ " res.append(vocabulary_to_int.get(''))\n",
+ " while len(res) < MAX_INCHI_LEN: \n",
+ " res.append(vocabulary_to_int.get(''))\n",
+ " \n",
+ " return np.array(res, dtype=np.uint8)\n",
+ "\n",
+ "tqdm.pandas() # progress_apply\n",
+ "train['InChI_int'] = train['InChIClean'].progress_apply(inchi_str2int)\n",
+ "train.head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:36:32.566867Z",
+ "iopub.status.busy": "2021-04-11T16:36:32.565866Z",
+ "iopub.status.idle": "2021-04-11T16:36:33.009737Z",
+ "shell.execute_reply": "2021-04-11T16:36:33.009055Z"
+ },
+ "papermill": {
+ "duration": 0.478225,
+ "end_time": "2021-04-11T16:36:33.009880",
+ "exception": false,
+ "start_time": "2021-04-11T16:36:32.531655",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "val = train.iloc[-VAL_SIZE:].reset_index(drop=True)\n",
+ "train = train.iloc[:-VAL_SIZE].reset_index(drop=True)\n",
+ "N_IMGS = len(train)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:36:33.113520Z",
+ "iopub.status.busy": "2021-04-11T16:36:33.112824Z",
+ "iopub.status.idle": "2021-04-11T16:36:33.116489Z",
+ "shell.execute_reply": "2021-04-11T16:36:33.115837Z"
+ },
+ "papermill": {
+ "duration": 0.033481,
+ "end_time": "2021-04-11T16:36:33.116624",
+ "exception": false,
+ "start_time": "2021-04-11T16:36:33.083143",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "def remove_blobs(img, min_size=10, debug=False):\n",
+ " if debug:\n",
+ " fig, ax = plt.subplots(1,2, figsize=(30,8))\n",
+ " ax[0].imshow(img)\n",
+ " ax[0].set_title('original image', size=16)\n",
+ " \n",
+ " height, width = img.shape\n",
+ "\n",
+ " # find all the connected components (white blobs in your image)\n",
+ " nb_components, output, stats, centroids = cv2.connectedComponentsWithStats(img, connectivity=8)\n",
+ " # Removes background, which is seen as a big component\n",
+ " sizes = stats[1:, -1]\n",
+ " \n",
+ " blob_idxs = [] \n",
+ " for idx, s in enumerate(sizes):\n",
+ " if s < min_size:\n",
+ " blob_idxs.append(idx+1)\n",
+ " \n",
+ " img[np.isin(output, blob_idxs)] = 0\n",
+ " \n",
+ " if debug:\n",
+ " ax[1].imshow(img)\n",
+ " ax[1].set_title('image with removed blobs', size=16)\n",
+ " plt.show()\n",
+ " \n",
+ " return img"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:36:33.174270Z",
+ "iopub.status.busy": "2021-04-11T16:36:33.169612Z",
+ "iopub.status.idle": "2021-04-11T16:36:33.177928Z",
+ "shell.execute_reply": "2021-04-11T16:36:33.177180Z"
+ },
+ "papermill": {
+ "duration": 0.039477,
+ "end_time": "2021-04-11T16:36:33.178090",
+ "exception": false,
+ "start_time": "2021-04-11T16:36:33.138613",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "def crop(img, debug=False):\n",
+ " if debug:\n",
+ " fig, ax = plt.subplots(1,2, figsize=(30,8))\n",
+ " ax[0].imshow(img)\n",
+ " ax[0].set_title(f'original image, shape: {img.shape}', size=16)\n",
+ " \n",
+ " _, thresh = cv2.threshold(img, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)\n",
+ " contours, _ = cv2.findContours(thresh,cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE)[-2:]\n",
+ " \n",
+ " x_min, y_min, x_max, y_max = np.inf, np.inf, 0, 0\n",
+ " for cnt in contours:\n",
+ " x, y, w, h = cv2.boundingRect(cnt)\n",
+ " x_min = min(x_min, x)\n",
+ " y_min = min(y_min, y)\n",
+ " x_max = max(x_max, x + w)\n",
+ " y_max = max(y_max, y + h)\n",
+ "\n",
+ " img_cropped = img[y_min:y_max, x_min:x_max]\n",
+ " \n",
+ " if debug:\n",
+ " ax[1].imshow(img_cropped)\n",
+ " ax[1].set_title(f'cropped image, shape: {img_cropped.shape}', size=16)\n",
+ " plt.show()\n",
+ " \n",
+ " return img_cropped"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:36:33.261449Z",
+ "iopub.status.busy": "2021-04-11T16:36:33.254507Z",
+ "iopub.status.idle": "2021-04-11T16:36:33.284344Z",
+ "shell.execute_reply": "2021-04-11T16:36:33.283716Z"
+ },
+ "papermill": {
+ "duration": 0.073445,
+ "end_time": "2021-04-11T16:36:33.284486",
+ "exception": false,
+ "start_time": "2021-04-11T16:36:33.211041",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "def pad_kernel(kernel, max_pad=np.inf):\n",
+ " kernel = np.array(kernel)\n",
+ " h, w = kernel.shape\n",
+ " pad_h = min((max(h, w) - h) // 2, max_pad)\n",
+ " pad_w = min((max(h, w) - w) // 2, max_pad)\n",
+ " return np.pad(kernel, ([pad_h, pad_h], [pad_w, pad_w]), 'constant', constant_values=-1)\n",
+ "\n",
+ "# creates a mask of missing pixels to be filled using\n",
+ "def create_mask(kernel, img_b):\n",
+ " mask = cv2.filter2D(img_b, -1, kernel)\n",
+ " kernel_flat_sum = (kernel == a).flatten().sum()\n",
+ " threshold_min = kernel_flat_sum * threshold_ratio\n",
+ " threshold_max = kernel_flat_sum + 1\n",
+ " return (mask > threshold_min) & (mask < threshold_max)\n",
+ "\n",
+ "# make kernels\n",
+ "a = np.float32(1.0 / 255.0)\n",
+ "threshold_ratio = 0.50\n",
+ "# single pixel width horizontal line with 1 pixel missing\n",
+ "kernel_h_single_mono = pad_kernel([\n",
+ " [ a, a, a, -1, a, a, a ]\n",
+ "], max_pad=1)\n",
+ "# single pixel width horizontal line with 3 pixels missing\n",
+ "kernel_h_single_triple = pad_kernel([\n",
+ " [ a, a, a, -1, -1, -1, a, a, a ]\n",
+ "], max_pad=1)\n",
+ "\n",
+ "kernel_h_multi = pad_kernel([\n",
+ " [ a, a, a, a, a, a, a ],\n",
+ " [ a, a, a,-1, a, a, a ],\n",
+ " [ a, a, a, a, a, a, a ],\n",
+ "], max_pad=1)\n",
+ "\n",
+ "kernel_v_single = pad_kernel([\n",
+ " [ a],\n",
+ " [ a],\n",
+ " [ a],\n",
+ " [-1],\n",
+ " [ a],\n",
+ " [ a],\n",
+ " [ a],\n",
+ "], max_pad=1)\n",
+ "\n",
+ "kernel_v_multi = pad_kernel([\n",
+ " [ a, a, a ],\n",
+ " [ a, a, a ],\n",
+ " [ a, a, a ],\n",
+ " [ a,-1, a ],\n",
+ " [ a, a, a ],\n",
+ " [ a, a, a ],\n",
+ " [ a, a, a ],\n",
+ "], max_pad=1)\n",
+ "\n",
+ "kernel_lr_single = pad_kernel([\n",
+ " [ -1,-1,-1,-1, a ],\n",
+ " [ -1,-1,-1, a,-1 ],\n",
+ " [ -1,-1,-1,-1,-1 ],\n",
+ " [ -1, a,-1,-1,-1 ],\n",
+ " [ a,-1,-1,-1,-1 ],\n",
+ "])\n",
+ "\n",
+ "kernel_lr_multi = pad_kernel([\n",
+ " [ -1,-1,-1, a, a ],\n",
+ " [ -1,-1, a, a, a ],\n",
+ " [ -1, a,-1, a,-1 ],\n",
+ " [ a, a, a,-1,-1 ],\n",
+ " [ a, a,-1,-1,-1 ],\n",
+ "])\n",
+ "\n",
+ "kernel_rl_single = pad_kernel([\n",
+ " [ a,-1,-1,-1,-1 ],\n",
+ " [ -1, a,-1,-1,-1 ],\n",
+ " [ -1,-1,-1,-1,-1 ],\n",
+ " [ -1,-1,-1, a,-1 ],\n",
+ " [ -1,-1,-1,-1, a ],\n",
+ "])\n",
+ "\n",
+ "kernel_rl_multi = pad_kernel([\n",
+ " [ a, a,-1,-1,-1],\n",
+ " [ a, a, a,-1,-1],\n",
+ " [-1, a,-1, a,-1],\n",
+ " [-1,-1, a, a, a],\n",
+ " [-1,-1,-1, a, a],\n",
+ "])\n",
+ "\n",
+ "def fill_missing_pixels(img, debug):\n",
+ " img_b = img.astype(np.float32)\n",
+ " img_b[img_b > 0] = 255\n",
+ "\n",
+ " mask_h_single_mono = create_mask(kernel_h_single_mono, img_b)\n",
+ "\n",
+ " mask_h_single_triple = create_mask(kernel_h_single_triple, img_b)\n",
+ "\n",
+ " mask_h_single = mask_h_single_mono | mask_h_single_triple\n",
+ "\n",
+ " mask_h_multi = create_mask(kernel_h_multi, img_b)\n",
+ "\n",
+ "\n",
+ " mask_v_single = create_mask(kernel_v_single, img_b)\n",
+ "\n",
+ "\n",
+ " mask_v_multi = create_mask(kernel_v_multi, img_b)\n",
+ "\n",
+ "\n",
+ " mask_lr_single = create_mask(kernel_lr_single, img_b)\n",
+ "\n",
+ "\n",
+ " mask_lr_multi = create_mask(kernel_lr_multi, img_b)\n",
+ "\n",
+ "\n",
+ " mask_rl_single = create_mask(kernel_lr_single, img_b)\n",
+ "\n",
+ "\n",
+ " mask_rl_multi = create_mask(kernel_rl_multi, img_b)\n",
+ "\n",
+ " mask_single = mask_h_single | mask_v_single | mask_lr_single | mask_rl_single\n",
+ " mask_multi = mask_h_multi | mask_v_multi |mask_lr_multi | mask_rl_multi\n",
+ " mask = mask_single | mask_multi\n",
+ "\n",
+ " if debug:\n",
+ " fig, ax = plt.subplots(2, 2 ,figsize=(35,20))\n",
+ " ax[0,0].imshow(mask_h_single)\n",
+ " ax[0,0].set_title('mask_h_single', size=16)\n",
+ " ax[0,1].imshow(mask_v_single)\n",
+ " ax[0,1].set_title('mask_v_single', size=16)\n",
+ " ax[1,0].imshow(mask_lr_single)\n",
+ " ax[1,0].set_title('mask_lr_single', size=16)\n",
+ " ax[1,1].imshow(mask_lr_single)\n",
+ " ax[1,1].set_title('mask_lr_single', size=16)\n",
+ " plt.show()\n",
+ "\n",
+ " fig, ax = plt.subplots(2, 2, figsize=(35,20))\n",
+ " ax[0,0].imshow(mask_h_multi)\n",
+ " ax[0,0].set_title('mask_h_multi', size=16)\n",
+ " ax[0,1].imshow(mask_v_multi)\n",
+ " ax[0,1].set_title('mask_v_multi', size=16)\n",
+ " ax[1,0].imshow(mask_lr_multi)\n",
+ " ax[1,0].set_title('mask_lr_multi', size=16)\n",
+ " ax[1,1].imshow(mask_rl_multi)\n",
+ " ax[1,1].set_title('mask_rl_multi', size=16)\n",
+ " plt.show()\n",
+ "\n",
+ " fig, ax = plt.subplots(2, 1 ,figsize=(15,20))\n",
+ " ax[0].imshow(img)\n",
+ " ax[0].set_title('original image', size=16)\n",
+ " \n",
+ " img_fill = mask.copy()\n",
+ " img_fill[img_fill > 0] = 255\n",
+ "\n",
+ " img_rgb = np.stack([\n",
+ " img_fill,\n",
+ " img_b,\n",
+ " np.zeros(img.shape),\n",
+ " ], axis=2)\n",
+ "\n",
+ " ax[1].imshow(img_rgb)\n",
+ " ax[1].set_title('image with filled missing pixels (red)', size=16)\n",
+ " plt.show() \n",
+ "\n",
+ " # all pixels in the mask are filled up\n",
+ " img[mask] = 255\n",
+ "\n",
+ " return img\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:36:33.331414Z",
+ "iopub.status.busy": "2021-04-11T16:36:33.330912Z",
+ "iopub.status.idle": "2021-04-11T16:36:33.335045Z",
+ "shell.execute_reply": "2021-04-11T16:36:33.334547Z"
+ },
+ "papermill": {
+ "duration": 0.028438,
+ "end_time": "2021-04-11T16:36:33.335169",
+ "exception": false,
+ "start_time": "2021-04-11T16:36:33.306731",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "def pad_resize(img):\n",
+ " h, w = img.shape\n",
+ " s = max(w, h)\n",
+ " pad_h, pad_v = 0, 0\n",
+ " hw_ratio = (h / w) - (IMG_HEIGHT / IMG_WIDTH)\n",
+ " if hw_ratio < 0:\n",
+ " pad_h = int(abs(hw_ratio) * w / 2)\n",
+ " else:\n",
+ " wh_ratio = (w / h) - (IMG_WIDTH / IMG_HEIGHT)\n",
+ " pad_v = int(abs(wh_ratio) * h // 2)\n",
+ "\n",
+ " img = np.pad(img, [(pad_h, pad_h), (pad_v, pad_v)], mode='constant')\n",
+ " img = cv2.resize(img,(IMG_WIDTH, IMG_HEIGHT), interpolation=cv2.INTER_NEAREST)\n",
+ "\n",
+ " return img"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:36:33.394243Z",
+ "iopub.status.busy": "2021-04-11T16:36:33.393744Z",
+ "iopub.status.idle": "2021-04-11T16:36:33.397555Z",
+ "shell.execute_reply": "2021-04-11T16:36:33.398161Z"
+ },
+ "papermill": {
+ "duration": 0.038391,
+ "end_time": "2021-04-11T16:36:33.398380",
+ "exception": false,
+ "start_time": "2021-04-11T16:36:33.359989",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "def process_img(image_id, folder='train', debug=False):\n",
+ " # read image and invert colors to get black background and white molecule\n",
+ " file_path = f'/kaggle/input/bms-molecular-translation/{folder}/{image_id[0]}/{image_id[1]}/{image_id[2]}/{image_id}.png'\n",
+ " img0 = 255 - cv2.imread(file_path, cv2.IMREAD_GRAYSCALE)\n",
+ " \n",
+ " # rotate counter clockwise to get horizontal images\n",
+ " h, w = img0.shape\n",
+ " if h > w:\n",
+ " img0 = np.rot90(img0)\n",
+ " \n",
+ " # remove blobs, crop, fill missing pixels, pad and resize\n",
+ " img = remove_blobs(img0, min_size=2, debug=debug)\n",
+ " img = crop(img, debug=debug)\n",
+ " img = fill_missing_pixels(img, debug=debug)\n",
+ " img = pad_resize(img)\n",
+ " \n",
+ " if debug:\n",
+ " fig, ax = plt.subplots(1, 2, figsize=(20,10))\n",
+ " ax[0].imshow(img0)\n",
+ " ax[0].set_title('Original image', size=16)\n",
+ " ax[1].imshow(img)\n",
+ " ax[1].set_title('Fully processed image', size=16)\n",
+ " \n",
+ " # normalize to range 0-255 and encode as png\n",
+ " img = (img / img.max() * 255).astype(np.uint8)\n",
+ " img = cv2.imencode('.png', img)[1].tobytes()\n",
+ "\n",
+ " return img"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:36:33.468572Z",
+ "iopub.status.busy": "2021-04-11T16:36:33.462418Z",
+ "iopub.status.idle": "2021-04-11T16:36:33.542399Z",
+ "shell.execute_reply": "2021-04-11T16:36:33.541752Z"
+ },
+ "papermill": {
+ "duration": 0.121701,
+ "end_time": "2021-04-11T16:36:33.542536",
+ "exception": false,
+ "start_time": "2021-04-11T16:36:33.420835",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "def split_in_chunks(data):\n",
+ " return [data[i:i + CHUNK_SIZE] for i in range(0, len(data), CHUNK_SIZE)]\n",
+ "\n",
+ "train_data_chunks = {\n",
+ " 'train': {\n",
+ " 'image_id': split_in_chunks(train['image_id'].values),\n",
+ " 'InChI': split_in_chunks(train['InChI_int'].values),\n",
+ " },\n",
+ " 'val': {\n",
+ " 'image_id': split_in_chunks(val['image_id'].values),\n",
+ " 'InChI': split_in_chunks(val['InChI_int'].values),\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "test_data_chunks = {\n",
+ " 'test': {\n",
+ " 'image_id': split_in_chunks(test['image_id'].values),\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-11T16:36:33.600319Z",
+ "iopub.status.busy": "2021-04-11T16:36:33.596335Z",
+ "iopub.status.idle": "2021-04-12T00:30:59.926503Z",
+ "shell.execute_reply": "2021-04-12T00:30:59.924762Z"
+ },
+ "papermill": {
+ "duration": 28466.361682,
+ "end_time": "2021-04-12T00:30:59.926681",
+ "exception": false,
+ "start_time": "2021-04-11T16:36:33.564999",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "3fd8b172243c4aa0a3213fb72b47f518",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ " 0%| | 0/57 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "bc17eb4b386541a091f8a9ed775b563d",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ " 0%| | 0/3 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "folders already created\n"
+ ]
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "ac908e19310e48b78bb6f6a42cb8f524",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ " 0%| | 0/41 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "def make_tfrecords(data_chunks, folder='train'):\n",
+ " # Try to make output folder\n",
+ " try:\n",
+ " os.makedirs(f'./train')\n",
+ " os.makedirs(f'./val')\n",
+ " os.makedirs(f'./test')\n",
+ " except:\n",
+ " print(f'folders already created')\n",
+ "\n",
+ " for k, v in data_chunks.items():\n",
+ " for chunk_idx, image_id_chunk in tqdm(enumerate(v['image_id']), total=len(v['image_id'])):\n",
+ " # process images in parallel\n",
+ " jobs = [joblib.delayed(process_img)(fp, folder) for fp in image_id_chunk]\n",
+ " bs = 10\n",
+ " processed_images_chunk = joblib.Parallel(\n",
+ " n_jobs=cpu_count(),\n",
+ " verbose=0,\n",
+ " require='sharedmem',\n",
+ " batch_size=bs,\n",
+ " backend='threading',\n",
+ " )(jobs)\n",
+ "\n",
+ " # Create the TFRecords from the processed images\n",
+ " with tf.io.TFRecordWriter(f'./{k}/batch_{chunk_idx}.tfrecords') as file_writer:\n",
+ " if 'InChI' in v.keys(): # TRAIN/VAL, InChI included\n",
+ " for image, InChI in zip(processed_images_chunk, v['InChI'][chunk_idx]):\n",
+ " record_bytes = tf.train.Example(features=tf.train.Features(feature={\n",
+ " 'image': tf.train.Feature(bytes_list=tf.train.BytesList(value=[image])),\n",
+ " 'InChI': tf.train.Feature(int64_list=tf.train.Int64List(value=InChI)),\n",
+ " })).SerializeToString()\n",
+ " file_writer.write(record_bytes)\n",
+ " else: # TEST, image_id included for submission file\n",
+ " for image, image_id in zip(processed_images_chunk, image_id_chunk):\n",
+ " record_bytes = tf.train.Example(features=tf.train.Features(feature={\n",
+ " 'image': tf.train.Feature(bytes_list=tf.train.BytesList(value=[image])),\n",
+ " 'image_id': tf.train.Feature(bytes_list=tf.train.BytesList(value=[str.encode(image_id)])),\n",
+ " })).SerializeToString()\n",
+ " file_writer.write(record_bytes)\n",
+ "\n",
+ "make_tfrecords(train_data_chunks)\n",
+ "make_tfrecords(test_data_chunks, 'test')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-12T00:30:59.993116Z",
+ "iopub.status.busy": "2021-04-12T00:30:59.992401Z",
+ "iopub.status.idle": "2021-04-12T00:30:59.996624Z",
+ "shell.execute_reply": "2021-04-12T00:30:59.995811Z"
+ },
+ "papermill": {
+ "duration": 0.036257,
+ "end_time": "2021-04-12T00:30:59.996898",
+ "exception": false,
+ "start_time": "2021-04-12T00:30:59.960641",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "# convert in int encoded InChI to string\n",
+ "def inchi_int2char(InChI):\n",
+ " res = []\n",
+ " for i in InChI:\n",
+ " c = int_to_vocabulary.get(i)\n",
+ " if c not in ['', '', '']:\n",
+ " res.append(c)\n",
+ " return ''.join(res)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2021-04-12T00:31:00.059002Z",
+ "iopub.status.busy": "2021-04-12T00:31:00.058339Z",
+ "iopub.status.idle": "2021-04-12T00:31:00.061915Z",
+ "shell.execute_reply": "2021-04-12T00:31:00.062516Z"
+ },
+ "papermill": {
+ "duration": 0.039456,
+ "end_time": "2021-04-12T00:31:00.062845",
+ "exception": false,
+ "start_time": "2021-04-12T00:31:00.023389",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "# Check train TFRecords\n",
+ "def decode_tfrecord(record_bytes):\n",
+ " fea_dict= {\n",
+ " 'image': tf.io.FixedLenFeature([], tf.string),\n",
+ " 'InChI': tf.io.FixedLenFeature([MAX_INCHI_LEN], tf.int64),}\n",
+ " \n",
+ " features = tf.io.parse_single_example(record_bytes, fea_dict)\n",
+ "\n",
+ " image = tf.io.decode_jpeg(features['image']) \n",
+ " image = tf.reshape(image, [IMG_HEIGHT, IMG_WIDTH, 1])\n",
+ " image = tf.cast(image, tf.float32) / 255.0\n",
+ " \n",
+ " InChI = features['InChI']\n",
+ " InChI = tf.reshape(InChI, [MAX_INCHI_LEN])\n",
+ " \n",
+ " return image, InChI\n",
+ "\n",
+ "\n",
+ "# Check test TFRecords\n",
+ "def decode_test_tfrecord(record_bytes):\n",
+ " features = tf.io.parse_single_example(record_bytes, {\n",
+ " 'image': tf.io.FixedLenFeature([], tf.string),\n",
+ " 'image_id': tf.io.FixedLenFeature([], tf.string),\n",
+ " })\n",
+ "\n",
+ " image = tf.io.decode_jpeg(features['image'])\n",
+ " image = tf.reshape(image, [IMG_HEIGHT, IMG_WIDTH, 1])\n",
+ " image = tf.cast(image, tf.float32) / 255.0\n",
+ " \n",
+ " image_id = features['image_id']\n",
+ " \n",
+ " return image, image_id\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.8.3"
+ },
+ "papermill": {
+ "default_parameters": {},
+ "duration": 28716.609555,
+ "end_time": "2021-04-12T00:31:04.022312",
+ "environment_variables": {},
+ "exception": null,
+ "input_path": "__notebook__.ipynb",
+ "output_path": "__notebook__.ipynb",
+ "parameters": {},
+ "start_time": "2021-04-11T16:32:27.412757",
+ "version": "2.3.2"
+ },
+ "widgets": {
+ "application/vnd.jupyter.widget-state+json": {
+ "state": {
+ "060fe371d903437687bcbd753ae7eb1b": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "ProgressStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "0b879d28b3864599b014370aadb9d856": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_e18c59eff2e94046b9e559a9cee20b9a",
+ "placeholder": "",
+ "style": "IPY_MODEL_bbcf19d2ed7f4e00b235e1d71402da87",
+ "value": " 57/57 [4:13:11<00:00, 251.42s/it]"
+ }
+ },
+ "106cf8dad4f849729a54984f8f721e99": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "DescriptionStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "1211bfa7a33549b88730c70913142cab": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "14f176a3a00141108952a3074f9271ee": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "DescriptionStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "1bb5911d82ac4610926c94c4a6a45100": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "DescriptionStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "1bbcff7ba5e94c9b86b4be1f4288783a": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "DescriptionStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "1dd80c31d30341cc91a4e9bb46fe2d2c": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "235704a71f114871a1f60a17b7e18aff": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "260b695b84de4bb29c0e8219503a4e57": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "28f33b19af1f49fa9f1e8c26f798375a": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "FloatProgressModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_652783be62994e509cdbc404d8288e4e",
+ "max": 41,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_060fe371d903437687bcbd753ae7eb1b",
+ "value": 41
+ }
+ },
+ "2c9ed8f693e24f549a95167297d1c399": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "2cd615fdbb52436589b448c9016aaef4": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "3739f7d1d47d4f55a11cdf6da8b8f310": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "DescriptionStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "3aaa6a16d4e54a16b435f67e7014d00c": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_1211bfa7a33549b88730c70913142cab",
+ "placeholder": "",
+ "style": "IPY_MODEL_1bb5911d82ac4610926c94c4a6a45100",
+ "value": " 2371184/2371184 [03:20<00:00, 12923.77it/s]"
+ }
+ },
+ "3bf1931556ad4fe28553c09041a722f5": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_2c9ed8f693e24f549a95167297d1c399",
+ "placeholder": "",
+ "style": "IPY_MODEL_91b3ac858b7d49b3b80e21f885e82452",
+ "value": "100%"
+ }
+ },
+ "3c9ba75f733a4f1a8cbc6cc35a17449e": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "DescriptionStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "3fd8b172243c4aa0a3213fb72b47f518": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HBoxModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_8abf2e16ae6b458f8fa069911bb6f233",
+ "IPY_MODEL_55cd2b1fb463451baddd76e0a3482224",
+ "IPY_MODEL_0b879d28b3864599b014370aadb9d856"
+ ],
+ "layout": "IPY_MODEL_625acafd7e514d43aba96c9bd5356b4a"
+ }
+ },
+ "4e48cf5d046d46a58ed36dc3814036e6": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "ProgressStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "55cd2b1fb463451baddd76e0a3482224": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "FloatProgressModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_f60a724c155a4ff99c6c028cdf3c509b",
+ "max": 57,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_d34b2155152b41159ae6b281e92cfc65",
+ "value": 57
+ }
+ },
+ "625acafd7e514d43aba96c9bd5356b4a": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "652783be62994e509cdbc404d8288e4e": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "665434981e6b41858c0aa8a1ce0a18d8": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_2cd615fdbb52436589b448c9016aaef4",
+ "placeholder": "",
+ "style": "IPY_MODEL_3c9ba75f733a4f1a8cbc6cc35a17449e",
+ "value": " 3/3 [11:20<00:00, 210.71s/it]"
+ }
+ },
+ "68fad3a595b04123b9132c59f02a5ff4": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_235704a71f114871a1f60a17b7e18aff",
+ "placeholder": "",
+ "style": "IPY_MODEL_106cf8dad4f849729a54984f8f721e99",
+ "value": "100%"
+ }
+ },
+ "733ae0e910744d6cafe59718f8e371c0": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "758753af108240c286e08655d194b577": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_bae63b0ca70f41f2b23b2ae244d1887f",
+ "placeholder": "",
+ "style": "IPY_MODEL_808599b1028d41b9a3e3109169c5fb21",
+ "value": "100%"
+ }
+ },
+ "808599b1028d41b9a3e3109169c5fb21": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "DescriptionStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "810d36ce881944e8964ad50db3231c8a": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "8158bb06611b486980ffe71072a7ae44": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_f108d4910c42432c8d2d24ccc6c4ecef",
+ "placeholder": "",
+ "style": "IPY_MODEL_3739f7d1d47d4f55a11cdf6da8b8f310",
+ "value": " 41/41 [3:29:54<00:00, 257.33s/it]"
+ }
+ },
+ "8abf2e16ae6b458f8fa069911bb6f233": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_1dd80c31d30341cc91a4e9bb46fe2d2c",
+ "placeholder": "",
+ "style": "IPY_MODEL_14f176a3a00141108952a3074f9271ee",
+ "value": "100%"
+ }
+ },
+ "8cc57fc211714c13a5835557f2aac9cb": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HBoxModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_f6293c4dcc9a4714aad92c202cf31735",
+ "IPY_MODEL_cf9adf5ac4d847f288ff80006616576e",
+ "IPY_MODEL_3aaa6a16d4e54a16b435f67e7014d00c"
+ ],
+ "layout": "IPY_MODEL_733ae0e910744d6cafe59718f8e371c0"
+ }
+ },
+ "91b3ac858b7d49b3b80e21f885e82452": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "DescriptionStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "98f3ee54701a4810bbaa1bc41bc555e2": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "994efa15272b466bba8651d2b0877485": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "ac908e19310e48b78bb6f6a42cb8f524": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HBoxModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_68fad3a595b04123b9132c59f02a5ff4",
+ "IPY_MODEL_28f33b19af1f49fa9f1e8c26f798375a",
+ "IPY_MODEL_8158bb06611b486980ffe71072a7ae44"
+ ],
+ "layout": "IPY_MODEL_b979a710ed7449bcaf8038da73ceb946"
+ }
+ },
+ "b038d515c5034b989a69776df15f070f": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "b680f19a4ede435e8d8627140be26be2": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "FloatProgressModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_fa7c33beb85c485da003685768f4d8a3",
+ "max": 3,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_d72255dbe7224b65b20ca88828804c15",
+ "value": 3
+ }
+ },
+ "b979a710ed7449bcaf8038da73ceb946": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "bae63b0ca70f41f2b23b2ae244d1887f": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "bbcf19d2ed7f4e00b235e1d71402da87": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "DescriptionStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "bc17eb4b386541a091f8a9ed775b563d": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HBoxModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_758753af108240c286e08655d194b577",
+ "IPY_MODEL_b680f19a4ede435e8d8627140be26be2",
+ "IPY_MODEL_665434981e6b41858c0aa8a1ce0a18d8"
+ ],
+ "layout": "IPY_MODEL_260b695b84de4bb29c0e8219503a4e57"
+ }
+ },
+ "c30852a0cf1e4e7bac208368ba38e021": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "cf7966e60a5442ff856afd92e0317ab7": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HBoxModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_3bf1931556ad4fe28553c09041a722f5",
+ "IPY_MODEL_e3ee00ffdf204ad0add19d349c824df6",
+ "IPY_MODEL_f643fdbfd7514aa7b15cef6fedcf93d3"
+ ],
+ "layout": "IPY_MODEL_994efa15272b466bba8651d2b0877485"
+ }
+ },
+ "cf9adf5ac4d847f288ff80006616576e": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "FloatProgressModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_b038d515c5034b989a69776df15f070f",
+ "max": 2371184,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_d3d80f59268a46489a21966a5c3dc74b",
+ "value": 2371184
+ }
+ },
+ "d34b2155152b41159ae6b281e92cfc65": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "ProgressStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "d3d80f59268a46489a21966a5c3dc74b": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "ProgressStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "d72255dbe7224b65b20ca88828804c15": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "ProgressStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "e18c59eff2e94046b9e559a9cee20b9a": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "e3ee00ffdf204ad0add19d349c824df6": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "FloatProgressModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_810d36ce881944e8964ad50db3231c8a",
+ "max": 2371184,
+ "min": 0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_4e48cf5d046d46a58ed36dc3814036e6",
+ "value": 2371184
+ }
+ },
+ "e5694f6737424e90ae848794e97694f1": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "DescriptionStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "DescriptionStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "StyleView",
+ "description_width": ""
+ }
+ },
+ "f108d4910c42432c8d2d24ccc6c4ecef": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "f60a724c155a4ff99c6c028cdf3c509b": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "f6293c4dcc9a4714aad92c202cf31735": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_c30852a0cf1e4e7bac208368ba38e021",
+ "placeholder": "",
+ "style": "IPY_MODEL_1bbcff7ba5e94c9b86b4be1f4288783a",
+ "value": "100%"
+ }
+ },
+ "f643fdbfd7514aa7b15cef6fedcf93d3": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "1.5.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "1.5.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "1.5.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_tooltip": null,
+ "layout": "IPY_MODEL_98f3ee54701a4810bbaa1bc41bc555e2",
+ "placeholder": "",
+ "style": "IPY_MODEL_e5694f6737424e90ae848794e97694f1",
+ "value": " 2371184/2371184 [00:08<00:00, 280106.89it/s]"
+ }
+ },
+ "fa7c33beb85c485da003685768f4d8a3": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "1.2.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "1.2.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "overflow_x": null,
+ "overflow_y": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ }
+ },
+ "version_major": 2,
+ "version_minor": 0
+ }
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}