{ "cells": [ { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Infer_ddpm2d_seg2med\n", "create combined segmentation dataset with assigned value\n", "create base dataset\n", "combined segmentation assigned dataset use keys: ['source', 'target', 'mask']\n", "use train csv: tutorial_train.csv\n", "use test csv: tutorial_test.csv\n", "use keys for creating volume dataset: ['source', 'target', 'mask']\n", "model name: ddpm2d_seg2med\n", "val_use_patch: False\n", "527\n", "135\n" ] } ], "source": [ "from synthrad_conversion.utils.my_configs_yacs import init_cfg\n", "from dataprocesser.step1_init_data_list import init_dataset\n", "from tqdm import tqdm\n", "config_path = 'tutorial_config.yaml'\n", "opt=init_cfg(config_path)\n", "model_name_path='Infer_'+opt.model_name + opt.name_prefix\n", "print(model_name_path)\n", "dataset_name = 'multimodal_csv'\n", "loader, opt, my_paths = init_dataset(opt, model_name_path, dataset_name)\n", "train_ds = loader.train_ds\n", "val_ds = loader.val_ds\n", "print(len(train_ds))\n", "print(len(val_ds))\n" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "527\n", "source: E:\\Projects\\yang_proj\\data\\synthrad\\Task1\\pelvis\\1PA004\\ct_seg.nii.gz\n", "target: E:\\Projects\\yang_proj\\data\\synthrad\\Task1\\pelvis\\1PA004\\ct.nii.gz\n", "seg_tissue: E:\\Projects\\yang_proj\\data\\synthrad\\Task1\\pelvis\\1PA004\\ct_seg_tissue.nii.gz\n", "mask: E:\\Projects\\yang_proj\\data\\synthrad\\Task1\\pelvis\\1PA004\\ct.nii.gz\n", "modality: 0\n", "A_paths: E:\\Projects\\yang_proj\\data\\synthrad\\Task1\\pelvis\\1PA004\\ct.nii.gz\n", "B_paths: E:\\Projects\\yang_proj\\data\\synthrad\\Task1\\pelvis\\1PA004\\ct_seg.nii.gz\n", "mask_path: E:\\Projects\\yang_proj\\data\\synthrad\\Task1\\pelvis\\1PA004\\ct_seg.nii.gz\n", "Aorta_diss: 0\n", "patient_ID: 1PA004\n" ] } ], "source": [ "print(len(train_ds))\n", "for item in train_ds[0]:\n", " print(f'{item}: {train_ds[0][item]}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# process\n", "\n", "- add_CreateContour_MergeSegTissue_MergeMask_MaskHUAssign_transforms\n", " - CreateBodyContourTransformd\n", " - MergeSegTissueTransformd\n", " - MergeMasksTransformd\n", " - MaskHUAssigmentd\n", "\n", "- add_Windowing_ZeroShift_ContourFilter_A_B_transforms\n", " - ThresholdIntensityd\n", " - ThresholdIntensityd\n", " - ShiftIntensityd\n", " - UseContourToFilterImaged\n", "\n", "- add_normalization_multimodal\n", " - NormalizationMultimodal" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [], "source": [ "import os \n", "import shutil\n", "from dataprocesser.preprocess_MR.step3_vibe_resetsignal import calculate_signal_GRE_T1, calculate_signal_T2_SPACE, calculate_signal_vibe, calculate_signal_vibe_opp, calculate_signal_vibe_dixon\n", "from dataprocesser.simulation_functions import _create_body_contour, _merge_seg_tissue, _merge_seg_contour, _assign_value_ct, _assign_value_mr\n", "import csv\n", "import nibabel as nib\n", "def create_csv_modality_info_file(dataset_list, output_mr_csv_file):\n", " with open(output_mr_csv_file, 'w', newline='') as f:\n", " csvwriter = csv.writer(f)\n", " csvwriter.writerow(['id', 'Aorta_diss', 'prior' ,'img', 'modality'])\n", " csvwriter.writerows(dataset_list) \n", "\n", "def zip_to_csv_list(images, priors, patient_IDs, ad_list, modality_list): \n", " datalist = [[id,ad,prior,image,modality] \n", " for id,ad,prior,image, modality in zip(patient_IDs, ad_list, priors, images, modality_list)]\n", " return datalist\n", "\n", "def output_dataset(item, \n", " output_folder = r'E:\\Projects\\yang_proj\\data\\seg2med\\seg2med_train', \n", " csv_file_ct = r'synthrad_conversion\\TA2_CT.csv',\n", " csv_file_mr = r'synthrad_conversion\\TA2_T1T2.csv'):\n", " \n", " \n", " source = item['source']\n", " target = item['target']\n", " seg_tissue = item['seg_tissue']\n", " mask = item['mask']\n", " modality = item['modality']\n", " Aorta_diss = item['Aorta_diss']\n", " patient_ID = item['patient_ID']\n", "\n", " output_dir = os.path.join(output_folder,patient_ID)\n", " os.makedirs(output_dir,exist_ok=True)\n", "\n", " target_data_df = nib.load(target)\n", " seg_data_df = nib.load(source)\n", " seg_tissue_data_df = nib.load(seg_tissue)\n", "\n", " target_data = target_data_df.get_fdata()\n", " target_affine = target_data_df.affine\n", " seg_data = seg_data_df.get_fdata()\n", " seg_tissue_data = seg_tissue_data_df.get_fdata()\n", "\n", "\n", " modality_config = {\n", " 0: {\n", " 'body_threshold': -500,\n", " 'assign_fn': _assign_value_ct,\n", " 'csv_file': csv_file_ct,\n", " 'signal_fn': None\n", " },\n", " 1: { # t1 weighted gradient echo\n", " 'body_threshold': 100,\n", " 'assign_fn': _assign_value_mr,\n", " 'csv_file': csv_file_mr,\n", " 'signal_fn': calculate_signal_GRE_T1\n", " },\n", " 2: { # t2 space\n", " 'body_threshold': 10,\n", " 'assign_fn': _assign_value_mr,\n", " 'csv_file': csv_file_mr,\n", " 'signal_fn': calculate_signal_T2_SPACE\n", " },\n", " 3: { # vibe in\n", " 'body_threshold': 30,\n", " 'assign_fn': _assign_value_mr,\n", " 'csv_file': csv_file_mr,\n", " 'signal_fn': calculate_signal_vibe\n", " },\n", " 4: { # vibe opp\n", " 'body_threshold': 30,\n", " 'assign_fn': _assign_value_mr,\n", " 'csv_file': csv_file_mr,\n", " 'signal_fn': calculate_signal_vibe_opp\n", " },\n", " 5: { # vibe dixon\n", " 'body_threshold': 30,\n", " 'assign_fn': _assign_value_mr,\n", " 'csv_file': csv_file_mr,\n", " 'signal_fn': calculate_signal_vibe_dixon\n", " }\n", " }\n", "\n", " # 获取当前模态参数\n", " config = modality_config.get(modality)\n", " if config is None:\n", " raise ValueError(f\"Unsupported modality: {modality}\")\n", "\n", " # 通用处理流程\n", " contour = _create_body_contour(target_data, config['body_threshold'], body_mask_value=1)\n", " merged_seg_tissue = _merge_seg_tissue(seg_data, seg_tissue_data)\n", " merged_seg_tissue_contour = _merge_seg_contour(merged_seg_tissue, contour)\n", "\n", " # 指定 assign 函数处理 CT 或 MR\n", " if config['signal_fn'] is not None:\n", " prior_image = config['assign_fn'](config['csv_file'], merged_seg_tissue_contour, config['signal_fn'])\n", " else:\n", " prior_image = config['assign_fn'](config['csv_file'], merged_seg_tissue_contour)\n", "\n", " processed_img = nib.Nifti1Image(prior_image, target_affine)\n", " contour_img = nib.Nifti1Image(contour, target_affine)\n", "\n", " target_output_name = os.path.basename(target)\n", " target_output_path = os.path.join(output_dir, target_output_name)\n", "\n", " seg_output_name = os.path.basename(source)\n", " seg_output_path = os.path.join(output_dir, seg_output_name)\n", "\n", " seg_tissue_output_name = os.path.basename(seg_tissue)\n", " seg_tissue_output_path = os.path.join(output_dir, seg_tissue_output_name)\n", "\n", " prior_image_output_name = os.path.basename(target).replace('.nii', '_prior_image.nii')\n", " prior_image_output_path = os.path.join(output_dir, prior_image_output_name)\n", "\n", " contour_output_name = os.path.basename(target).replace('.nii', '_contour.nii')\n", " contour_output_path = os.path.join(output_dir, contour_output_name)\n", "\n", " '''shutil.copy(target, target_output_path)\n", " shutil.copy(source, seg_output_path)\n", " shutil.copy(seg_tissue, seg_tissue_output_path)\n", " nib.save(processed_img, prior_image_output_path)'''\n", " nib.save(contour_img, contour_output_path)\n", "\n", " return patient_ID,Aorta_diss,prior_image_output_path,target_output_path, modality" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "data": { "text/plain": [ "('1PC004',\n", " 0,\n", " 'E:\\\\Projects\\\\yang_proj\\\\data\\\\seg2med\\\\seg2med_train\\\\1PC004\\\\mr_prior_image.nii.gz',\n", " 'E:\\\\Projects\\\\yang_proj\\\\data\\\\seg2med\\\\seg2med_train\\\\1PC004\\\\mr.nii.gz',\n", " 2)" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "item = train_ds[0] # test synthrad ct\n", "item = train_ds[150] # test synthrad mr T1 GRE\n", "#item = train_ds[155] # test synthrad mr T1 GRE\n", "#item = train_ds[160] # test synthrad mr T1 GRE\n", "#item = train_ds[165] # test synthrad mr T1 GRE\n", "#item = train_ds[170] # test synthrad mr T1 GRE\n", "#item = train_ds[240] # test synthrad mr T2 SPACE\n", "#item = train_ds[245] # test synthrad mr T2 SPACE\n", "#item = train_ds[250] # test synthrad mr T2 SPACE\n", "item = train_ds[255] # test synthrad mr T2 SPACE\n", "#item = train_ds[344] # test vibe_in\n", "#item = train_ds[388] # test vibe_opp\n", "#item = train_ds[395] # test vibe_dixon\n", "output_dataset(item, output_folder = r'E:\\Projects\\yang_proj\\data\\seg2med\\seg2med_train')" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ " 27%|██▋ | 36/135 [01:43<04:49, 2.92s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 27%|██▋ | 37/135 [01:45<04:46, 2.92s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 28%|██▊ | 38/135 [01:48<04:30, 2.79s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 29%|██▉ | 39/135 [01:51<04:35, 2.87s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 30%|██▉ | 40/135 [01:56<05:37, 3.55s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 30%|███ | 41/135 [01:59<05:06, 3.26s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 31%|███ | 42/135 [02:02<05:11, 3.34s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 32%|███▏ | 43/135 [02:04<04:34, 2.98s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 33%|███▎ | 44/135 [02:08<04:41, 3.10s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 33%|███▎ | 45/135 [02:11<04:44, 3.16s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 34%|███▍ | 46/135 [02:14<04:22, 2.95s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 35%|███▍ | 47/135 [02:16<04:19, 2.94s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 36%|███▌ | 48/135 [02:20<04:31, 3.12s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 36%|███▋ | 49/135 [02:23<04:13, 2.95s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 37%|███▋ | 50/135 [02:25<03:57, 2.79s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 38%|███▊ | 51/135 [02:27<03:30, 2.51s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 39%|███▊ | 52/135 [02:29<03:12, 2.32s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 39%|███▉ | 53/135 [02:32<03:26, 2.52s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 40%|████ | 54/135 [02:35<03:32, 2.63s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 41%|████ | 55/135 [02:37<03:22, 2.53s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 41%|████▏ | 56/135 [02:39<03:19, 2.52s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 42%|████▏ | 57/135 [02:42<03:23, 2.61s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 43%|████▎ | 58/135 [02:46<03:37, 2.83s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 44%|████▎ | 59/135 [02:49<03:41, 2.91s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 44%|████▍ | 60/135 [02:51<03:30, 2.81s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 45%|████▌ | 61/135 [02:53<03:02, 2.47s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 46%|████▌ | 62/135 [02:55<02:47, 2.30s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 47%|████▋ | 63/135 [02:56<02:30, 2.09s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 47%|████▋ | 64/135 [02:58<02:24, 2.03s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 48%|████▊ | 65/135 [03:00<02:09, 1.86s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 49%|████▉ | 66/135 [03:01<02:05, 1.82s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 50%|████▉ | 67/135 [03:03<02:07, 1.87s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 50%|█████ | 68/135 [03:05<02:02, 1.82s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 51%|█████ | 69/135 [03:07<01:58, 1.80s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 52%|█████▏ | 70/135 [03:09<02:00, 1.85s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 53%|█████▎ | 71/135 [03:11<01:58, 1.84s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 53%|█████▎ | 72/135 [03:12<01:47, 1.70s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 61%|██████ | 82/135 [03:46<03:17, 3.74s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 61%|██████▏ | 83/135 [03:48<02:46, 3.21s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 62%|██████▏ | 84/135 [03:51<02:36, 3.06s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 63%|██████▎ | 85/135 [03:55<02:53, 3.47s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 64%|██████▎ | 86/135 [03:58<02:31, 3.08s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 64%|██████▍ | 87/135 [04:00<02:14, 2.80s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 65%|██████▌ | 88/135 [04:02<01:56, 2.48s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 66%|██████▌ | 89/135 [04:05<02:05, 2.73s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 67%|██████▋ | 90/135 [04:08<02:05, 2.80s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 67%|██████▋ | 91/135 [04:13<02:29, 3.39s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 68%|██████▊ | 92/135 [04:15<02:08, 3.00s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 69%|██████▉ | 93/135 [04:17<02:02, 2.92s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 70%|██████▉ | 94/135 [04:22<02:19, 3.40s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 70%|███████ | 95/135 [04:24<02:02, 3.06s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 71%|███████ | 96/135 [04:26<01:49, 2.82s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 72%|███████▏ | 97/135 [04:28<01:34, 2.49s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 73%|███████▎ | 98/135 [04:31<01:39, 2.68s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 73%|███████▎ | 99/135 [04:34<01:38, 2.74s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 74%|███████▍ | 100/135 [04:39<01:59, 3.40s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 6\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 75%|███████▍ | 101/135 [04:43<01:59, 3.53s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 6\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "100%|██████████| 135/135 [08:19<00:00, 3.70s/it]\n", " 27%|██▋ | 144/527 [07:23<16:46, 2.63s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 28%|██▊ | 145/527 [07:26<17:00, 2.67s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 28%|██▊ | 146/527 [07:29<17:41, 2.79s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 28%|██▊ | 147/527 [07:32<18:45, 2.96s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 28%|██▊ | 148/527 [07:34<16:52, 2.67s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 28%|██▊ | 149/527 [07:38<18:16, 2.90s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 28%|██▊ | 150/527 [07:42<20:21, 3.24s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 29%|██▊ | 151/527 [07:45<20:41, 3.30s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 29%|██▉ | 152/527 [07:48<19:47, 3.17s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 29%|██▉ | 153/527 [07:51<20:27, 3.28s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 29%|██▉ | 154/527 [07:55<20:17, 3.26s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 29%|██▉ | 155/527 [07:57<18:08, 2.93s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 30%|██▉ | 156/527 [08:02<21:45, 3.52s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 30%|██▉ | 157/527 [08:05<20:26, 3.32s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 30%|██▉ | 158/527 [08:07<18:23, 2.99s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 30%|███ | 159/527 [08:11<20:07, 3.28s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 30%|███ | 160/527 [08:15<22:39, 3.70s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 31%|███ | 161/527 [08:17<19:29, 3.20s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 31%|███ | 162/527 [08:19<17:12, 2.83s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 31%|███ | 163/527 [08:23<18:57, 3.13s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 31%|███ | 164/527 [08:29<24:00, 3.97s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 31%|███▏ | 165/527 [08:32<21:37, 3.58s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 31%|███▏ | 166/527 [08:35<21:34, 3.59s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 32%|███▏ | 167/527 [08:39<20:42, 3.45s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 32%|███▏ | 168/527 [08:41<18:36, 3.11s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 32%|███▏ | 169/527 [08:43<16:44, 2.81s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 32%|███▏ | 170/527 [08:48<20:53, 3.51s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 32%|███▏ | 171/527 [08:50<18:40, 3.15s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 33%|███▎ | 172/527 [08:53<16:51, 2.85s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 33%|███▎ | 173/527 [08:55<15:53, 2.69s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 33%|███▎ | 174/527 [08:57<15:07, 2.57s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 33%|███▎ | 175/527 [09:00<16:09, 2.75s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 33%|███▎ | 176/527 [09:03<16:34, 2.83s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 34%|███▎ | 177/527 [09:05<15:05, 2.59s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 34%|███▍ | 178/527 [09:11<20:16, 3.48s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 34%|███▍ | 179/527 [09:14<19:03, 3.29s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 34%|███▍ | 180/527 [09:18<20:29, 3.54s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 34%|███▍ | 181/527 [09:22<20:44, 3.60s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 35%|███▍ | 182/527 [09:25<19:35, 3.41s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 35%|███▍ | 183/527 [09:27<16:51, 2.94s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 35%|███▍ | 184/527 [09:29<16:35, 2.90s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 35%|███▌ | 185/527 [09:32<16:35, 2.91s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 35%|███▌ | 186/527 [09:35<15:54, 2.80s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 35%|███▌ | 187/527 [09:39<17:29, 3.09s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 36%|███▌ | 188/527 [09:43<19:52, 3.52s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 36%|███▌ | 189/527 [09:45<17:48, 3.16s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 36%|███▌ | 190/527 [09:50<19:21, 3.45s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 36%|███▌ | 191/527 [09:52<18:01, 3.22s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 36%|███▋ | 192/527 [09:55<17:28, 3.13s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 37%|███▋ | 193/527 [09:57<15:55, 2.86s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 37%|███▋ | 194/527 [10:01<16:33, 2.98s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 37%|███▋ | 195/527 [10:03<15:32, 2.81s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 37%|███▋ | 196/527 [10:07<16:34, 3.00s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 37%|███▋ | 197/527 [10:09<15:31, 2.82s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 38%|███▊ | 198/527 [10:13<17:18, 3.16s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 38%|███▊ | 199/527 [10:18<20:01, 3.66s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 38%|███▊ | 200/527 [10:21<18:59, 3.48s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 38%|███▊ | 201/527 [10:25<20:51, 3.84s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 38%|███▊ | 202/527 [10:28<18:54, 3.49s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 39%|███▊ | 203/527 [10:31<18:13, 3.37s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 39%|███▊ | 204/527 [10:35<18:57, 3.52s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 39%|███▉ | 205/527 [10:39<19:57, 3.72s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 39%|███▉ | 206/527 [10:42<19:05, 3.57s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 39%|███▉ | 207/527 [10:46<18:11, 3.41s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 39%|███▉ | 208/527 [10:47<15:43, 2.96s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 40%|███▉ | 209/527 [10:50<15:03, 2.84s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 40%|███▉ | 210/527 [10:53<14:35, 2.76s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 40%|████ | 211/527 [10:55<14:16, 2.71s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 40%|████ | 212/527 [10:59<16:04, 3.06s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 40%|████ | 213/527 [11:04<19:21, 3.70s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 41%|████ | 214/527 [11:07<17:13, 3.30s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 41%|████ | 215/527 [11:10<17:31, 3.37s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 41%|████ | 216/527 [11:13<16:13, 3.13s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 41%|████ | 217/527 [11:16<15:53, 3.08s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 41%|████▏ | 218/527 [11:19<16:25, 3.19s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 42%|████▏ | 219/527 [11:23<17:11, 3.35s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 42%|████▏ | 220/527 [11:27<18:20, 3.59s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 42%|████▏ | 221/527 [11:31<18:52, 3.70s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 42%|████▏ | 222/527 [11:35<18:56, 3.73s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 42%|████▏ | 223/527 [11:38<17:38, 3.48s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 43%|████▎ | 224/527 [11:40<16:27, 3.26s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 43%|████▎ | 225/527 [11:43<15:32, 3.09s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 43%|████▎ | 226/527 [11:46<15:05, 3.01s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 43%|████▎ | 227/527 [11:49<15:12, 3.04s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 43%|████▎ | 228/527 [11:54<17:31, 3.52s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 43%|████▎ | 229/527 [11:56<15:54, 3.20s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 44%|████▎ | 230/527 [11:59<16:08, 3.26s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 44%|████▍ | 231/527 [12:03<15:53, 3.22s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 44%|████▍ | 232/527 [12:06<16:11, 3.29s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 44%|████▍ | 233/527 [12:09<15:08, 3.09s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 44%|████▍ | 234/527 [12:11<14:03, 2.88s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 45%|████▍ | 235/527 [12:15<15:49, 3.25s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 45%|████▍ | 236/527 [12:18<15:44, 3.25s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 45%|████▍ | 237/527 [12:21<14:50, 3.07s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 45%|████▌ | 238/527 [12:23<13:25, 2.79s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 45%|████▌ | 239/527 [12:28<16:02, 3.34s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 46%|████▌ | 240/527 [12:32<17:46, 3.71s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 46%|████▌ | 241/527 [12:34<15:05, 3.17s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 46%|████▌ | 242/527 [12:37<13:41, 2.88s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 46%|████▌ | 243/527 [12:38<11:43, 2.48s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 46%|████▋ | 244/527 [12:40<10:44, 2.28s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 46%|████▋ | 245/527 [12:42<09:56, 2.11s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 47%|████▋ | 246/527 [12:44<10:32, 2.25s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 47%|████▋ | 247/527 [12:46<09:48, 2.10s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 47%|████▋ | 248/527 [12:48<09:08, 1.97s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 47%|████▋ | 249/527 [12:50<09:44, 2.10s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 47%|████▋ | 250/527 [12:52<09:19, 2.02s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 48%|████▊ | 251/527 [12:54<09:16, 2.02s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 48%|████▊ | 252/527 [12:55<08:32, 1.86s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 48%|████▊ | 253/527 [12:58<09:29, 2.08s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 48%|████▊ | 254/527 [13:00<09:26, 2.08s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 48%|████▊ | 255/527 [13:02<09:21, 2.07s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 49%|████▊ | 256/527 [13:04<08:45, 1.94s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 49%|████▉ | 257/527 [13:06<08:47, 1.95s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 49%|████▉ | 258/527 [13:08<08:36, 1.92s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 49%|████▉ | 259/527 [13:09<08:28, 1.90s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 49%|████▉ | 260/527 [13:11<08:01, 1.81s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 50%|████▉ | 261/527 [13:13<08:20, 1.88s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 50%|████▉ | 262/527 [13:15<08:03, 1.82s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 50%|████▉ | 263/527 [13:17<08:22, 1.90s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 50%|█████ | 264/527 [13:19<08:12, 1.87s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 50%|█████ | 265/527 [13:21<08:44, 2.00s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 50%|█████ | 266/527 [13:23<09:11, 2.11s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 51%|█████ | 267/527 [13:26<09:27, 2.18s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 51%|█████ | 268/527 [13:28<09:54, 2.30s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 51%|█████ | 269/527 [13:30<09:26, 2.20s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 51%|█████ | 270/527 [13:32<08:34, 2.00s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 51%|█████▏ | 271/527 [13:34<08:46, 2.06s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 52%|█████▏ | 272/527 [13:36<08:39, 2.04s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 52%|█████▏ | 273/527 [13:37<08:05, 1.91s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 52%|█████▏ | 274/527 [13:39<07:54, 1.88s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 52%|█████▏ | 275/527 [13:41<07:33, 1.80s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of assignment: 0 28\n", "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 52%|█████▏ | 276/527 [13:43<07:21, 1.76s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 53%|█████▎ | 277/527 [13:46<09:20, 2.24s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 53%|█████▎ | 278/527 [13:49<10:10, 2.45s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 53%|█████▎ | 279/527 [13:51<10:18, 2.50s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 53%|█████▎ | 280/527 [13:54<09:41, 2.35s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 53%|█████▎ | 281/527 [13:55<09:05, 2.22s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 54%|█████▎ | 282/527 [13:58<09:06, 2.23s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 54%|█████▎ | 283/527 [13:59<08:29, 2.09s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 54%|█████▍ | 284/527 [14:02<08:54, 2.20s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 54%|█████▍ | 285/527 [14:03<08:04, 2.00s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 54%|█████▍ | 286/527 [14:05<07:44, 1.93s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 54%|█████▍ | 287/527 [14:07<07:18, 1.83s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 28\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 62%|██████▏ | 326/527 [16:35<15:18, 4.57s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 62%|██████▏ | 327/527 [16:39<14:32, 4.36s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 62%|██████▏ | 328/527 [16:41<11:54, 3.59s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 62%|██████▏ | 329/527 [16:48<15:18, 4.64s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 63%|██████▎ | 330/527 [16:51<13:39, 4.16s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 63%|██████▎ | 331/527 [16:54<12:15, 3.75s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 63%|██████▎ | 332/527 [16:58<12:39, 3.89s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 63%|██████▎ | 333/527 [17:01<11:58, 3.70s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 63%|██████▎ | 334/527 [17:04<10:51, 3.38s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 64%|██████▎ | 335/527 [17:11<13:53, 4.34s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 64%|██████▍ | 336/527 [17:13<11:45, 3.69s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 64%|██████▍ | 337/527 [17:16<11:34, 3.65s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 64%|██████▍ | 338/527 [17:20<11:41, 3.71s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 64%|██████▍ | 339/527 [17:23<11:04, 3.53s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 65%|██████▍ | 340/527 [17:26<10:00, 3.21s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 65%|██████▍ | 341/527 [17:29<09:33, 3.08s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 65%|██████▍ | 342/527 [17:31<08:35, 2.79s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 65%|██████▌ | 343/527 [17:32<07:09, 2.33s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of assignment: 0 9\n", "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 65%|██████▌ | 344/527 [17:36<08:44, 2.87s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 65%|██████▌ | 345/527 [17:40<09:40, 3.19s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 66%|██████▌ | 346/527 [17:42<08:49, 2.93s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 66%|██████▌ | 347/527 [17:45<08:04, 2.69s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 66%|██████▌ | 348/527 [17:47<07:53, 2.64s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 66%|██████▌ | 349/527 [17:52<09:42, 3.27s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 66%|██████▋ | 350/527 [17:56<10:33, 3.58s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 67%|██████▋ | 351/527 [18:02<12:30, 4.26s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 67%|██████▋ | 352/527 [18:06<12:23, 4.25s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 67%|██████▋ | 353/527 [18:09<11:12, 3.86s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 67%|██████▋ | 354/527 [18:12<10:23, 3.60s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 67%|██████▋ | 355/527 [18:17<11:21, 3.96s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 68%|██████▊ | 356/527 [18:19<10:03, 3.53s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 68%|██████▊ | 357/527 [18:23<10:23, 3.67s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 9\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 68%|██████▊ | 358/527 [18:28<11:02, 3.92s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 68%|██████▊ | 359/527 [18:32<11:20, 4.05s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 68%|██████▊ | 360/527 [18:34<09:26, 3.39s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 69%|██████▊ | 361/527 [18:41<12:28, 4.51s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 69%|██████▊ | 362/527 [18:44<11:12, 4.08s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 69%|██████▉ | 363/527 [18:47<09:55, 3.63s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 69%|██████▉ | 364/527 [18:51<10:34, 3.89s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 69%|██████▉ | 365/527 [18:55<10:04, 3.73s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 69%|██████▉ | 366/527 [18:58<09:18, 3.47s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 70%|██████▉ | 367/527 [19:05<12:14, 4.59s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 70%|██████▉ | 368/527 [19:07<10:23, 3.92s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 70%|███████ | 369/527 [19:11<10:05, 3.83s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 70%|███████ | 370/527 [19:14<09:53, 3.78s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 70%|███████ | 371/527 [19:18<09:15, 3.56s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 71%|███████ | 372/527 [19:20<08:22, 3.24s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 71%|███████ | 373/527 [19:23<08:01, 3.12s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 71%|███████ | 374/527 [19:25<07:10, 2.81s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 71%|███████ | 375/527 [19:26<05:54, 2.33s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of assignment: 0 10\n", "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 71%|███████▏ | 376/527 [19:30<07:13, 2.87s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 72%|███████▏ | 377/527 [19:34<07:38, 3.06s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 72%|███████▏ | 378/527 [19:36<07:06, 2.86s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 72%|███████▏ | 379/527 [19:38<06:22, 2.59s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 72%|███████▏ | 380/527 [19:41<06:11, 2.53s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 72%|███████▏ | 381/527 [19:45<07:48, 3.21s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 72%|███████▏ | 382/527 [19:49<08:19, 3.44s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 73%|███████▎ | 383/527 [19:55<09:49, 4.09s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 73%|███████▎ | 384/527 [19:59<09:26, 3.96s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 73%|███████▎ | 385/527 [20:02<08:39, 3.66s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 73%|███████▎ | 386/527 [20:04<08:01, 3.41s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 73%|███████▎ | 387/527 [20:09<08:34, 3.68s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 74%|███████▎ | 388/527 [20:11<07:40, 3.31s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 74%|███████▍ | 389/527 [20:15<07:43, 3.36s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 10\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 74%|███████▍ | 390/527 [20:19<08:04, 3.53s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 6\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 74%|███████▍ | 391/527 [20:22<07:55, 3.50s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 6\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 74%|███████▍ | 392/527 [20:25<07:49, 3.48s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 6\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 75%|███████▍ | 393/527 [20:29<08:00, 3.59s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 6\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 75%|███████▍ | 394/527 [20:34<09:01, 4.07s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 6\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 75%|███████▍ | 395/527 [20:36<07:38, 3.47s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 6\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 75%|███████▌ | 396/527 [20:42<08:49, 4.04s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "min, max of combine: 0 204\n", "min, max of assignment: 0 6\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "100%|██████████| 527/527 [34:51<00:00, 3.97s/it]\n" ] } ], "source": [ "images = []\n", "priors = []\n", "patient_IDs = []\n", "ad_list = []\n", "modality_list = []\n", "output_test_csv = 'tutorial_test_prior.csv'\n", "for item in tqdm(val_ds):\n", " patient_ID,Aorta_diss,prior_image_output_path,target_output_path, modality = output_dataset(item, output_folder = r'E:\\Projects\\yang_proj\\data\\seg2med\\seg2med_test')\n", " images.append(target_output_path) # 原始图像路径\n", " priors.append(prior_image_output_path) # prior 图像路径\n", " patient_IDs.append(patient_ID)\n", " ad_list.append(Aorta_diss)\n", " modality_list.append(modality)\n", "#dataset_list = zip_to_csv_list(images, priors, patient_IDs, ad_list, modality_list)\n", "#create_csv_modality_info_file(dataset_list, output_test_csv)\n", "\n", "\n", "images = []\n", "priors = []\n", "patient_IDs = []\n", "ad_list = []\n", "modality_list = []\n", "output_train_csv = 'tutorial_train_prior.csv' \n", "for item in tqdm(train_ds):\n", " patient_ID,Aorta_diss,prior_image_output_path,target_output_path, modality = output_dataset(item, output_folder = r'E:\\Projects\\yang_proj\\data\\seg2med\\seg2med_train')\n", " images.append(target_output_path) # 原始图像路径\n", " priors.append(prior_image_output_path) # prior 图像路径\n", " patient_IDs.append(patient_ID)\n", " ad_list.append(Aorta_diss)\n", " modality_list.append(modality)\n", "#dataset_list = zip_to_csv_list(images, priors, patient_IDs, ad_list, modality_list)\n", "#create_csv_modality_info_file(dataset_list, output_train_csv)\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## test signal values for subcutaneous_fat, torso_fat, skeletal_muscle" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(-0.09992894726405893-0.0037690182669934736j)\n", "0.8000799303348972\n" ] } ], "source": [ "W = 0.9\n", "F = 0.1\n", "delta_omega=220.0\n", "TE = 2.3\n", "phase_shift = np.exp(1j * 2 * np.pi * delta_omega * TE / 1000) # 注意TE\n", "print(F*phase_shift)\n", "print(np.abs(W + F * phase_shift))\n", "\n" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "6.76900410503465\n", "6.126166793924495\n", "2.2167670709685465\n" ] } ], "source": [ "# subcutaneous_fat, torso_fat, skeletal_muscle\n", "print(calculate_signal_vibe_dixon(275,90,95))\n", "print(calculate_signal_vibe_dixon(300,80,90))\n", "print(calculate_signal_vibe_dixon(1142,45,80))" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "17.930725823677232\n", "13.784382191746642\n", "2.358633605612473\n" ] } ], "source": [ "print(calculate_signal_T2_SPACE(275,90,95))\n", "print(calculate_signal_T2_SPACE(300,80,90))\n", "print(calculate_signal_T2_SPACE(1142,45,80))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# check the data distribution, preparing for further normalization into training" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\zy7\\AppData\\Roaming\\Python\\Python38\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Infer_ddpm2d_seg2med\n", "create combined segmentation dataset with assigned value\n", "create base dataset\n", "combined segmentation assigned dataset use keys: ['source', 'target', 'mask']\n", "use train csv: tutorial2_train_prior.csv\n", "use test csv: tutorial2_test_prior.csv\n", "use keys for creating volume dataset: ['source', 'target', 'mask']\n", "model name: ddpm2d_seg2med\n", "val_use_patch: False\n", "527\n", "135\n" ] } ], "source": [ "from synthrad_conversion.utils.my_configs_yacs import init_cfg\n", "from dataprocesser.step1_init_data_list import init_dataset\n", "config_path = 'tutorial2_config_prior.yaml'\n", "opt=init_cfg(config_path)\n", "model_name_path='Infer_'+opt.model_name + opt.name_prefix\n", "print(model_name_path)\n", "dataset_name = 'multimodal_prior_csv'\n", "loader, opt, my_paths = init_dataset(opt, model_name_path, dataset_name)\n", "\n", "train_ds = loader.train_ds\n", "val_ds = loader.val_ds\n", "print(len(train_ds))\n", "print(len(val_ds))" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "===> Patient: 1PA004 | Modality: 0\n", "Target image - min: -1024.0 max: 1458.0\n", "Prior image - min: -1000.0 max: 700.0\n", "Target intensity 10%: 22.00, 90%: 216.00\n", "Target intensity 5%: 12.00, 95%: 346.00 \n", "\n", "===> Patient: 1PA147 | Modality: 1\n", "Target image - min: 0.0 max: 545.3027954101562\n", "Prior image - min: 0.0 max: 9.0\n", "Target intensity 10%: 0.77, 90%: 273.68\n", "Target intensity 5%: 0.28, 95%: 287.75 \n", "\n", "===> Patient: 1PA113 | Modality: 1\n", "Target image - min: 0.0 max: 629.5413208007812\n", "Prior image - min: 0.0 max: 9.0\n", "Target intensity 10%: 0.67, 90%: 319.08\n", "Target intensity 5%: 0.24, 95%: 338.75 \n", "\n", "===> Patient: 1PA094 | Modality: 1\n", "Target image - min: 0.0 max: 2637.25537109375\n", "Prior image - min: 0.0 max: 9.0\n", "Target intensity 10%: 18.24, 90%: 1206.17\n", "Target intensity 5%: 6.43, 95%: 1400.43 \n", "\n", "===> Patient: 1PA022 | Modality: 1\n", "Target image - min: 0.0 max: 668.1495361328125\n", "Prior image - min: 0.0 max: 9.0\n", "Target intensity 10%: 0.62, 90%: 373.21\n", "Target intensity 5%: 0.25, 95%: 394.19 \n", "\n", "===> Patient: 1PC063 | Modality: 2\n", "Target image - min: 0.0 max: 361.0\n", "Prior image - min: 0.0 max: 28.0\n", "Target intensity 10%: 1.00, 90%: 122.00\n", "Target intensity 5%: 1.00, 95%: 147.00 \n", "\n", "===> Patient: 1PC080 | Modality: 2\n", "Target image - min: 0.0 max: 272.0\n", "Prior image - min: 0.0 max: 28.0\n", "Target intensity 10%: 1.00, 90%: 65.00\n", "Target intensity 5%: 1.00, 95%: 77.00 \n", "\n", "===> Patient: 1PC085 | Modality: 2\n", "Target image - min: 0.0 max: 398.0\n", "Prior image - min: 0.0 max: 28.0\n", "Target intensity 10%: 2.00, 90%: 105.00\n", "Target intensity 5%: 1.00, 95%: 121.00 \n", "\n", "===> Patient: 1PC097 | Modality: 2\n", "Target image - min: 0.0 max: 254.0\n", "Prior image - min: 0.0 max: 28.0\n", "Target intensity 10%: 1.00, 90%: 97.00\n", "Target intensity 5%: 1.00, 95%: 112.00 \n", "\n", "===> Patient: 1PC004 | Modality: 2\n", "Target image - min: 0.0 max: 335.0\n", "Prior image - min: 0.0 max: 28.0\n", "Target intensity 10%: 1.00, 90%: 87.00\n", "Target intensity 5%: 1.00, 95%: 102.00 \n", "\n", "===> Patient: 1PC017 | Modality: 2\n", "Target image - min: 0.0 max: 203.0\n", "Prior image - min: 0.0 max: 28.0\n", "Target intensity 10%: 1.00, 90%: 62.00\n", "Target intensity 5%: 1.00, 95%: 74.00 \n", "\n", "===> Patient: 42274973_4 | Modality: 3\n", "Target image - min: 0.0 max: 744.7654418945312\n", "Prior image - min: 0.0 max: 9.0\n", "Target intensity 10%: 7.28, 90%: 347.17\n", "Target intensity 5%: 2.11, 95%: 436.00 \n", "\n", "===> Patient: 41235903_5 | Modality: 3\n", "Target image - min: 0.0 max: 601.2132568359375\n", "Prior image - min: 0.0 max: 9.0\n", "Target intensity 10%: 2.19, 90%: 187.46\n", "Target intensity 5%: 1.00, 95%: 283.21 \n", "\n", "===> Patient: 41406161_3 | Modality: 3\n", "Target image - min: 0.0 max: 1429.0433349609375\n", "Prior image - min: 0.0 max: 9.0\n", "Target intensity 10%: 3.00, 90%: 309.67\n", "Target intensity 5%: 1.79, 95%: 407.99 \n", "\n", "===> Patient: 42467291_3 | Modality: 3\n", "Target image - min: 0.0 max: 954.3236694335938\n", "Prior image - min: 0.0 max: 9.0\n", "Target intensity 10%: 1.00, 90%: 279.67\n", "Target intensity 5%: 0.98, 95%: 372.92 \n", "\n", "===> Patient: 42509696_10 | Modality: 3\n", "Target image - min: 0.0 max: 950.7811279296875\n", "Prior image - min: 0.0 max: 9.0\n", "Target intensity 10%: 1.67, 90%: 298.25\n", "Target intensity 5%: 0.95, 95%: 361.97 \n", "\n", "===> Patient: 42416600_3 | Modality: 4\n", "Target image - min: 0.0 max: 898.79150390625\n", "Prior image - min: 0.0 max: 10.0\n", "Target intensity 10%: 2.00, 90%: 321.14\n", "Target intensity 5%: 2.00, 95%: 486.80 \n", "\n", "===> Patient: 42487603_3 | Modality: 4\n", "Target image - min: 0.0 max: 830.46728515625\n", "Prior image - min: 0.0 max: 10.0\n", "Target intensity 10%: 1.00, 90%: 413.17\n", "Target intensity 5%: 0.78, 95%: 485.24 \n", "\n", "===> Patient: 35167831_5 | Modality: 4\n", "Target image - min: 0.0 max: 915.85693359375\n", "Prior image - min: 0.0 max: 10.0\n", "Target intensity 10%: 1.00, 90%: 307.75\n", "Target intensity 5%: 1.00, 95%: 383.87 \n", "\n", "===> Patient: 42186167_3 | Modality: 4\n", "Target image - min: 0.0 max: 994.7259521484375\n", "Prior image - min: 0.0 max: 10.0\n", "Target intensity 10%: 2.00, 90%: 387.63\n", "Target intensity 5%: 1.97, 95%: 474.84 \n", "\n", "===> Patient: 34438427_5 | Modality: 4\n", "Target image - min: 0.0 max: 1177.7640380859375\n", "Prior image - min: 0.0 max: 10.0\n", "Target intensity 10%: 3.00, 90%: 373.89\n", "Target intensity 5%: 3.00, 95%: 523.81 \n", "\n", "===> Patient: 42274973_4 | Modality: 4\n", "Target image - min: 0.0 max: 872.1503295898438\n", "Prior image - min: 0.0 max: 10.0\n", "Target intensity 10%: 6.00, 90%: 412.58\n", "Target intensity 5%: 2.39, 95%: 498.82 \n", "\n", "===> Patient: 41258188_8 | Modality: 5\n", "Target image - min: 0.0 max: 702.2493286132812\n", "Prior image - min: 0.0 max: 6.0\n", "Target intensity 10%: 2.07, 90%: 195.80\n", "Target intensity 5%: 1.03, 95%: 306.18 \n", "\n", "===> Patient: 41045510_3 | Modality: 5\n", "Target image - min: 0.0 max: 797.7947387695312\n", "Prior image - min: 0.0 max: 6.0\n", "Target intensity 10%: 1.00, 90%: 178.02\n", "Target intensity 5%: 1.00, 95%: 297.77 \n", "\n", "===> Patient: 42115971_5 | Modality: 5\n", "Target image - min: 0.0 max: 1135.43896484375\n", "Prior image - min: 0.0 max: 6.0\n", "Target intensity 10%: 3.00, 90%: 437.26\n", "Target intensity 5%: 3.00, 95%: 538.07 \n", "\n", "===> Patient: 41045510_4 | Modality: 5\n", "Target image - min: 0.0 max: 857.6268920898438\n", "Prior image - min: 0.0 max: 6.0\n", "Target intensity 10%: 1.92, 90%: 388.54\n", "Target intensity 5%: 0.89, 95%: 456.76 \n", "\n", "===> Patient: 42115971_4 | Modality: 5\n", "Target image - min: 0.0 max: 1094.708984375\n", "Prior image - min: 0.0 max: 6.0\n", "Target intensity 10%: 6.00, 90%: 361.06\n", "Target intensity 5%: 6.00, 95%: 470.54 \n", "\n", "===> Patient: 338 | Modality: 0\n", "Target image - min: -1024.0 max: 3071.0\n", "Prior image - min: -1000.0 max: 700.0\n", "Target intensity 10%: 23.24, 90%: 314.80\n", "Target intensity 5%: 13.73, 95%: 505.89 \n", "\n" ] } ], "source": [ "import napari\n", "import numpy as np\n", "import nibabel as nib\n", "import matplotlib.pyplot as plt\n", "def data_distribution(item, do_boxplot=False, hist_bins=200):\n", " source = item['source']\n", " target = item['target']\n", " modality = item['modality']\n", " patient_ID = item['patient_ID']\n", "\n", "\n", " target_data_df = nib.load(target)\n", " prior_data_df = nib.load(source)\n", "\n", " target_data = target_data_df.get_fdata()\n", " target_affine = target_data_df.affine\n", " prior_data = prior_data_df.get_fdata()\n", "\n", " print(\"===> Patient:\", patient_ID, \"| Modality:\", modality)\n", " print(\"Target image - min:\", np.min(target_data), \"max:\", np.max(target_data))\n", " print(\"Prior image - min:\", np.min(prior_data), \"max:\", np.max(prior_data))\n", "\n", " # 去掉无效区域(如为 0 或负值的区域)\n", " target_valid = target_data[target_data > 0]\n", " prior_valid = prior_data[prior_data > 0]\n", "\n", " # 分位点\n", " t10, t90 = np.percentile(target_valid, [10, 90])\n", " p10, p90 = np.percentile(prior_valid, [10, 90])\n", "\n", " t5, t95 = np.percentile(target_valid, [5, 95])\n", " print(f\"Target intensity 10%: {t10:.2f}, 90%: {t90:.2f}\")\n", " print(f\"Target intensity 5%: {t5:.2f}, 95%: {t95:.2f} \\n\")\n", "\n", " if do_boxplot:\n", " plt.figure(figsize=(15, 5))\n", "\n", " plt.subplot(1, 2, 1)\n", " #plt.hist(target_data.flatten(), bins=hist_bins, color='steelblue', alpha=0.8)\n", " plt.boxplot(target_data.flatten())\n", " plt.title(\"Image Pixel Value Distribution\")\n", " plt.subplot(1, 2, 2)\n", " #plt.hist(prior_data.flatten(), bins=hist_bins, color='steelblue', alpha=0.8) \n", " plt.boxplot(prior_data.flatten()) \n", " plt.title(\"Prior Pixel Value Distribution\")\n", "\n", " plt.tight_layout()\n", " plt.show()\n", "\n", " '''viewer = napari.Viewer()\n", " viewer.add_image(target_data, name='Target', colormap='gray')\n", " viewer.add_image(prior_data, name='Prior', colormap='magma', blending='additive')\n", " napari.run()'''\n", "\n", "\n", "# 收集所有 item\n", "items_to_check = [\n", " train_ds[0], # synthrad CT\n", " train_ds[150], # synthrad MR T1 GRE\n", " train_ds[155],\n", " train_ds[160],\n", " train_ds[165],\n", " train_ds[240], # MR T2 SPACE\n", " train_ds[242],\n", " train_ds[245],\n", " train_ds[247],\n", " train_ds[255],\n", " train_ds[257],\n", " train_ds[340], # vibe_in\n", " train_ds[342],\n", " train_ds[345],\n", " train_ds[347],\n", " train_ds[350],\n", " train_ds[360], # vibe_opp\n", " train_ds[362],\n", " train_ds[365],\n", " train_ds[367],\n", " train_ds[370],\n", " train_ds[372],\n", " train_ds[392], # vibe_dixon\n", " train_ds[393],\n", " train_ds[394],\n", " train_ds[395],\n", " train_ds[396],\n", " train_ds[397],\n", "]\n", "\n", "# 依次输出每个 item 的直方图及分位点\n", "for item in items_to_check:\n", " data_distribution(item, hist_bins=200)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# visualize a slice:\n", "import matplotlib.pyplot as plt\n", "def plottorchdata(data, i, slice_id):\n", " data = data.cpu().numpy().squeeze().squeeze()\n", " dataimg = f'tutorial_{i}.png'\n", " plt.figure(i)\n", " plt.imshow(data[..., slice_id], cmap='gray')\n", " plt.savefig(dataimg)\n", "slice_id = 50\n", "plottorchdata(first_input, 0, slice_id)\n", "plottorchdata(first_target, 1, slice_id)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "c:\\Users\\zy7\\.conda\\envs\\torch\\lib\\site-packages\\numpy\\_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:\n", "c:\\Users\\zy7\\.conda\\envs\\torch\\lib\\site-packages\\numpy\\.libs\\libopenblas.GK7GX5KEQ4F6UYO3P26ULGBQYHGQO7J4.gfortran-win_amd64.dll\n", "c:\\Users\\zy7\\.conda\\envs\\torch\\lib\\site-packages\\numpy\\.libs\\libopenblas64__v0.3.21-gcc_10_3_0.dll\n", " warnings.warn(\"loaded more than 1 DLL from .libs:\"\n", "C:\\Users\\zy7\\AppData\\Roaming\\Python\\Python38\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Warning: wandb package cannot be found. The option \"--use_wandb\" will result in error.\n", "Warning: wandb package cannot be found. The option \"--use_wandb\" will result in error.\n", "ddpm2d_seg2med\n", "spade_ddpm2d_seg2med\n", "pix2pix\n", "cycle_gan\n", "AttentionUnet\n", "resUnet\n" ] } ], "source": [ "import synthrad_conversion.networks as networks\n", "from synthrad_conversion.networks.model_registry import MODEL_REGISTRY\n", "for model in MODEL_REGISTRY:\n", " print(model)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "torch", "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.10" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }