CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
adasegroup

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: adasegroup/NEUROML2022
Path: blob/main/seminar7/Seminar7_Interpretation.ipynb
Views: 63
Kernel: Python 3

Interpretation of 3D CNNs for Brain MRI Data Classification

Introduction In this notebook we will explore how the model makes a decision on the example of simple 3D CNN classificationl model on pytorch. In the current notebook we use Alzheimer’s Disease Neuroimaging Initiative (ADNI) dataset (ADNI is a global research effort that actively supports the investigation and development of treatments that slow or stop the progression of Alzheimer's disease (AD)) , preprocessed by the Clinica software platform.

Our goal will be to study various techniques for interpreting СNN models to test the reliability of neural networks in the case of MRI brain classification.

Proceesing with this notebook you confirm, that you have granted access to ADNI 1, 2, 3, GO Study Data. And your agreement on data terms and conditions.

The data accesed from the original sourse: https://ida.loni.usc.edu/pages/access/studyData.jsp?categoryId=14&subCategoryId=30

from google.colab import drive drive.mount('/content/drive')
Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True).
!pip install nilearn==0.9.2 !pip install nibabel==4.0.2
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Requirement already satisfied: nilearn==0.9.2 in /usr/local/lib/python3.7/dist-packages (0.9.2) Requirement already satisfied: pandas>=1.0 in /usr/local/lib/python3.7/dist-packages (from nilearn==0.9.2) (1.3.5) Requirement already satisfied: scipy>=1.5 in /usr/local/lib/python3.7/dist-packages (from nilearn==0.9.2) (1.7.3) Requirement already satisfied: numpy>=1.18 in /usr/local/lib/python3.7/dist-packages (from nilearn==0.9.2) (1.21.6) Requirement already satisfied: requests>=2 in /usr/local/lib/python3.7/dist-packages (from nilearn==0.9.2) (2.23.0) Requirement already satisfied: nibabel>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from nilearn==0.9.2) (3.0.2) Requirement already satisfied: lxml in /usr/local/lib/python3.7/dist-packages (from nilearn==0.9.2) (4.9.1) Requirement already satisfied: scikit-learn>=0.22 in /usr/local/lib/python3.7/dist-packages (from nilearn==0.9.2) (1.0.2) Requirement already satisfied: joblib>=0.15 in /usr/local/lib/python3.7/dist-packages (from nilearn==0.9.2) (1.1.0) Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/dist-packages (from pandas>=1.0->nilearn==0.9.2) (2.8.2) Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas>=1.0->nilearn==0.9.2) (2022.2.1) Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.7.3->pandas>=1.0->nilearn==0.9.2) (1.15.0) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests>=2->nilearn==0.9.2) (1.24.3) Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests>=2->nilearn==0.9.2) (2.10) Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests>=2->nilearn==0.9.2) (3.0.4) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2->nilearn==0.9.2) (2022.6.15) Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from scikit-learn>=0.22->nilearn==0.9.2) (3.1.0) Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Collecting nibabel==4.0.2 Downloading nibabel-4.0.2-py3-none-any.whl (3.3 MB) |████████████████████████████████| 3.3 MB 6.6 MB/s Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from nibabel==4.0.2) (57.4.0) Requirement already satisfied: packaging>=17.0 in /usr/local/lib/python3.7/dist-packages (from nibabel==4.0.2) (21.3) Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from nibabel==4.0.2) (1.21.6) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=17.0->nibabel==4.0.2) (3.0.9) Installing collected packages: nibabel Attempting uninstall: nibabel Found existing installation: nibabel 3.0.2 Uninstalling nibabel-3.0.2: Successfully uninstalled nibabel-3.0.2 Successfully installed nibabel-4.0.2
MIME type unknown not supported
import os from os import path import sys import argparse import pandas as pd import numpy as np from pathlib import Path import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader, Dataset, sampler import torchvision.transforms as transforms import abc import logging import nibabel as nib import matplotlib.pyplot as plt from nilearn import plotting from tqdm import tqdm
! cd drive/MyDrive/нейро/neuro2022/seminar7 && ls
10_sub_for_validation.zip Seminar7.Interpretation.ipynb 'text .gdoc'
path_to_data = Path('drive/MyDrive/нейро/neuro2022/seminar7/10_sub_for_validation.zip') !unzip $path_to_data
Archive: drive/MyDrive/нейро/neuro2022/seminar7/10_sub_for_validation.zip replace 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/df_scores.csv? [y]es, [n]o, [A]ll, [N]one, [r]ename: A inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/df_scores.csv inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/sub-ADNI035S0555_ses-M00_T1_cn.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/interpretation_mean_pertrub.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/sub-ADNI035S0555_ses-M108_T1_ad.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/interpretation_guided_backprop.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/interpretation_gradcam_mask.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/raw_data/sub-ADNI035S0555_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/raw_data/ground_truth_mask_sub-ADNI035S0555.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/raw_data/interpretation_guided_backprop_mask_T1_sub-ADNI035S0555_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/raw_data/interpretation_mean_pertrub_mask_T1_sub-ADNI035S0555_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/raw_data/interpretation_gradcam_mask_mask_T1_sub-ADNI035S0555_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/raw_data/sub-ADNI035S0555_ses-M108_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/ground_truth/slices_from_inferior_to_superior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/ground_truth/gt_slices.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/ground_truth/slices_from_left_to_right.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI035S0555/ground_truth/slices_from_from_anterior_to_posterior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/sub-ADNI137S0972_ses-M96_T1_ad.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/df_scores.csv inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/sub-ADNI137S0972_ses-M00_T1_cn.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/interpretation_mean_pertrub.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/interpretation_guided_backprop.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/interpretation_gradcam_mask.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/raw_data/sub-ADNI137S0972_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/raw_data/sub-ADNI137S0972_ses-M96_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/raw_data/interpretation_mean_pertrub_mask_T1_sub-ADNI137S0972_ses-M96.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/raw_data/interpretation_guided_backprop_mask_T1_sub-ADNI137S0972_ses-M96.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/raw_data/ground_truth_mask_sub-ADNI137S0972.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/raw_data/interpretation_gradcam_mask_mask_T1_sub-ADNI137S0972_ses-M96.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI137S0972/ground_truth/gt_slices.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/sub-ADNI116S1249_ses-M00_T1_cn.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/df_scores.csv inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/interpretation_mean_pertrub.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/interpretation_guided_backprop.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/interpretation_gradcam_mask.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/sub-ADNI116S1249_ses-M108_T1_ad.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/raw_data/sub-ADNI116S1249_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/raw_data/ground_truth_mask_sub-ADNI116S1249.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/raw_data/interpretation_guided_backprop_mask_T1_sub-ADNI116S1249_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/raw_data/sub-ADNI116S1249_ses-M108_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/raw_data/interpretation_gradcam_mask_mask_T1_sub-ADNI116S1249_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/raw_data/interpretation_mean_pertrub_mask_T1_sub-ADNI116S1249_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/ground_truth/slices_from_inferior_to_superior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/ground_truth/gt_slices.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/ground_truth/slices_from_left_to_right.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI116S1249/ground_truth/slices_from_from_anterior_to_posterior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/df_scores.csv inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/sub-ADNI051S1123_ses-M96_T1_ad.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/interpretation_mean_pertrub.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/interpretation_guided_backprop.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/interpretation_gradcam_mask.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/sub-ADNI051S1123_ses-M00_T1_cn.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/raw_data/interpretation_mean_pertrub_mask_T1_sub-ADNI051S1123_ses-M96.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/raw_data/sub-ADNI051S1123_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/raw_data/interpretation_guided_backprop_mask_T1_sub-ADNI051S1123_ses-M96.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/raw_data/ground_truth_mask_sub-ADNI051S1123.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/raw_data/interpretation_gradcam_mask_mask_T1_sub-ADNI051S1123_ses-M96.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/raw_data/sub-ADNI051S1123_ses-M96_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/ground_truth/slices_from_inferior_to_superior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/ground_truth/gt_slices.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/ground_truth/slices_from_left_to_right.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI051S1123/ground_truth/slices_from_from_anterior_to_posterior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/df_scores.csv inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/sub-ADNI114S0166_ses-M108_T1_ad.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/interpretation_mean_pertrub.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/interpretation_guided_backprop.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/interpretation_gradcam_mask.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/sub-ADNI114S0166_ses-M00_T1_cn.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/raw_data/interpretation_mean_pertrub_mask_T1_sub-ADNI114S0166_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/raw_data/interpretation_guided_backprop_mask_T1_sub-ADNI114S0166_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/raw_data/sub-ADNI114S0166_ses-M108_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/raw_data/sub-ADNI114S0166_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/raw_data/ground_truth_mask_sub-ADNI114S0166.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/raw_data/interpretation_gradcam_mask_mask_T1_sub-ADNI114S0166_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/ground_truth/slices_from_inferior_to_superior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/ground_truth/gt_slices.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/ground_truth/slices_from_left_to_right.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/ground_truth/slices_from_from_anterior_to_posterior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/ground_truth/.ipynb_checkpoints/slices_from_left_to_right-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/ground_truth/.ipynb_checkpoints/gt_slices-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/.ipynb_checkpoints/df_scores-checkpoint.csv inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/.ipynb_checkpoints/interpretation_gradcam_mask-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI114S0166/.ipynb_checkpoints/interpretation_guided_backprop-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/df_scores.csv inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/interpretation_mean_pertrub.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/interpretation_guided_backprop.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/interpretation_gradcam_mask.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/sub-ADNI002S4262_ses-M60_T1_ad.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/sub-ADNI002S4262_ses-M00_T1_cn.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data/interpretation_mean_pertrub_mask_T1_sub-ADNI002S4262_ses-M60.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data/interpretation_guided_backprop_mask_T1_sub-ADNI002S4262_ses-M60.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data/interpretation_gradcam_mask_mask_T1_sub-ADNI002S4262_ses-M60.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data/sub-ADNI002S4262_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data/ground_truth_mask_sub-ADNI002S4262.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data/sub-ADNI002S4262_ses-M60_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/ground_truth/slices_from_inferior_to_superior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/ground_truth/gt_slices.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/ground_truth/slices_from_left_to_right.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/ground_truth/slices_from_from_anterior_to_posterior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/ground_truth/.ipynb_checkpoints/gt_slices-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/.ipynb_checkpoints/interpretation_gradcam_mask-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/.ipynb_checkpoints/interpretation_mean_pertrub-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/.ipynb_checkpoints/sub-ADNI002S4262_ses-M60_T1_ad-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/.ipynb_checkpoints/interpretation_guided_backprop-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/df_scores.csv inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/sub-ADNI037S4706_ses-M12_T1_ad.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/interpretation_mean_pertrub.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/interpretation_guided_backprop.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/sub-ADNI037S4706_ses-M48_T1_cn.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/raw_data/interpretation_mean_pertrub_mask_T1_sub-ADNI037S4706_ses-M12.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/raw_data/sub-ADNI037S4706_ses-M12_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/raw_data/sub-ADNI037S4706_ses-M48_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/raw_data/interpretation_guided_backprop_mask_T1_sub-ADNI037S4706_ses-M12.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/raw_data/ground_truth_mask_sub-ADNI037S4706.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/raw_data/interpretation_gradcam_mask_mask_T1_sub-ADNI037S4706_ses-M12.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/ground_truth/slices_from_inferior_to_superior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/ground_truth/gt_slices.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/ground_truth/slices_from_left_to_right.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S4706/ground_truth/slices_from_from_anterior_to_posterior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/df_scores.csv inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/sub-ADNI037S0467_ses-M00_T1_cn.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/interpretation_mean_pertrub.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/interpretation_guided_backprop.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/interpretation_gradcam_mask.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/sub-ADNI037S0467_ses-M108_T1_ad.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/raw_data/interpretation_mean_pertrub_mask_T1_sub-ADNI037S0467_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/raw_data/interpretation_gradcam_mask_mask_T1_sub-ADNI037S0467_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/raw_data/ground_truth_mask_sub-ADNI037S0467.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/raw_data/sub-ADNI037S0467_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/raw_data/sub-ADNI037S0467_ses-M108_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/raw_data/interpretation_guided_backprop_mask_T1_sub-ADNI037S0467_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/ground_truth/slices_from_inferior_to_superior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/ground_truth/gt_slices.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/ground_truth/slices_from_left_to_right.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/ground_truth/slices_from_from_anterior_to_posterior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI037S0467/.ipynb_checkpoints/interpretation_mean_pertrub-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/df_scores.csv inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/sub-ADNI123S0106_ses-M36_T1_cn.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/interpretation_mean_pertrub.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/interpretation_guided_backprop.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/interpretation_gradcam_mask.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/sub-ADNI123S0106_ses-M108_T1_ad.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/raw_data/interpretation_gradcam_mask_mask_T1_sub-ADNI123S0106_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/raw_data/ground_truth_mask_sub-ADNI123S0106.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/raw_data/sub-ADNI123S0106_ses-M36_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/raw_data/interpretation_guided_backprop_mask_T1_sub-ADNI123S0106_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/raw_data/sub-ADNI123S0106_ses-M108_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/raw_data/interpretation_mean_pertrub_mask_T1_sub-ADNI123S0106_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/ground_truth/slices_from_inferior_to_superior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/ground_truth/gt_slices.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/ground_truth/slices_from_left_to_right.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI123S0106/ground_truth/slices_from_from_anterior_to_posterior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/df_scores.csv inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/sub-ADNI023S0061_ses-M108_T1_ad.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/interpretation_mean_pertrub.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/interpretation_guided_backprop.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/interpretation_gradcam_mask.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/sub-ADNI023S0061_ses-M00_T1_cn.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/raw_data/interpretation_gradcam_mask_mask_T1_sub-ADNI023S0061_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/raw_data/interpretation_mean_pertrub_mask_T1_sub-ADNI023S0061_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/raw_data/ground_truth_mask_sub-ADNI023S0061.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/raw_data/interpretation_guided_backprop_mask_T1_sub-ADNI023S0061_ses-M108.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/raw_data/sub-ADNI023S0061_ses-M108_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/raw_data/sub-ADNI023S0061_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/ground_truth/slices_from_inferior_to_superior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/ground_truth/gt_slices.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/ground_truth/slices_from_left_to_right.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/ground_truth/slices_from_from_anterior_to_posterior.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/ground_truth/.ipynb_checkpoints/slices_from_from_anterior_to_posterior-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/ground_truth/.ipynb_checkpoints/gt_slices-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/.ipynb_checkpoints/interpretation_mean_pertrub-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/.ipynb_checkpoints/sub-ADNI023S0061_ses-M00_T1_cn-checkpoint.png inflating: 10_sub_for_validation/10_sub_for_validation/sub-ADNI023S0061/.ipynb_checkpoints/sub-ADNI023S0061_ses-M108_T1_ad-checkpoint.png inflating: 10_sub_for_validation/labels_list_10/getlabels.json inflating: 10_sub_for_validation/labels_list_10/AD.tsv inflating: 10_sub_for_validation/labels_list_10/CN.tsv inflating: 10_sub_for_validation/labels_list_10/pMCI.tsv inflating: 10_sub_for_validation/labels_list_10/sMCI.tsv inflating: 10_sub_for_validation/model/model_best.pth.tar

Pipeline with dataset and model

Writing dataset

FILENAME_TYPE = {'full': '_T1w_space-MNI152NLin2009cSym_res-1x1x1_T1w', 'cropped': '_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w', 'skull_stripped': '_space-Ixi549Space_desc-skullstripped_T1w', 'gm_maps': '_T1w_segm-graymatter_space-Ixi549Space_modulated-off_probability', 'shepplogan': '_phantom-SheppLogan'} class ToTensor(object): """Convert image type to Tensor and diagnosis to diagnosis code""" def __call__(self, image): np.nan_to_num(image, copy=False) image = image.astype(float) return torch.from_numpy(image[np.newaxis, :]).float() def get_nii_path(caps_dict, participant_id, session_id, cohort, preprocessing): if cohort not in caps_dict.keys(): raise ValueError('Cohort names in labels and CAPS definitions do not match.') image_path = path.join(caps_dict[cohort], participant_id, 'raw_data', participant_id + '_' + session_id + FILENAME_TYPE['cropped'] + '.nii.gz') return image_path class MRIDataset(Dataset): """Abstract class for all derived MRIDatasets.""" def __init__(self, caps_directory, data_file, preprocessing, transformations, labels, augmentation_transformations=None, multi_cohort=False): self.caps_dict = self.create_caps_dict(caps_directory, multi_cohort) self.transformations = transformations self.augmentation_transformations = augmentation_transformations self.eval_mode = False self.labels = labels self.diagnosis_code = { 'CN': 0, 'BV': 1, 'AD': 1, 'sMCI': 0, 'pMCI': 1, 'MCI': 1, 'unlabeled': -1} self.preprocessing = preprocessing if not hasattr(self, 'elem_index'): raise ValueError( "Child class of MRIDataset must set elem_index attribute.") if not hasattr(self, 'mode'): raise ValueError( "Child class of MRIDataset must set mode attribute.") # Check the format of the tsv file here if isinstance(data_file, str): self.df = pd.read_csv(data_file, sep='\t') elif isinstance(data_file, pd.DataFrame): self.df = data_file else: raise Exception('The argument data_file is not of correct type.') if not multi_cohort: self.df["cohort"] = "single" mandatory_col = {"participant_id", "session_id"} if self.labels: mandatory_col.add("diagnosis") if multi_cohort: mandatory_col.add("cohort") if self.elem_index == "mixed": mandatory_col.add("%s_id" % self.mode) if not mandatory_col.issubset(set(self.df.columns.values)): raise Exception("the data file is not in the correct format." "Columns should include %s" % mandatory_col) unique_diagnoses = set(self.df.diagnosis) unique_codes = set() for diagnosis in unique_diagnoses: unique_codes.add(self.diagnosis_code[diagnosis]) self.elem_per_image = self.num_elem_per_image() self.size = self[0]['image'].size() def __len__(self): return len(self.df) * self.elem_per_image @staticmethod def create_caps_dict(caps_directory, multi_cohort): caps_dict = {'single': caps_directory} return caps_dict def _get_path(self, participant, session, cohort, mode="image"): if cohort not in self.caps_dict.keys(): raise ValueError('Cohort names in labels and CAPS definitions do not match.') image_path = path.join(self.caps_dict[cohort], participant, 'raw_data', participant + '_' + session + FILENAME_TYPE['cropped'] +'.nii.gz') # image_path = path.join(self.caps_dict[cohort], participant, session, # 'deeplearning_prepare_data', '%s_based' % mode, 't1_linear', # participant + '_' + session # + FILENAME_TYPE['cropped'] + '.pt') return image_path def _get_meta_data(self, idx): image_idx = idx // self.elem_per_image participant = self.df.loc[image_idx, 'participant_id'] session = self.df.loc[image_idx, 'session_id'] cohort = self.df.loc[image_idx, 'cohort'] if self.elem_index is None: elem_idx = idx % self.elem_per_image elif self.elem_index == "mixed": elem_idx = self.df.loc[image_idx, '%s_id' % self.mode] else: elem_idx = self.elem_index if self.labels: diagnosis = self.df.loc[image_idx, 'diagnosis'] label = self.diagnosis_code[diagnosis] else: label = self.diagnosis_code['unlabeled'] return participant, session, cohort, elem_idx, label def _get_full_image(self): participant_id = self.df.loc[0, 'participant_id'] session_id = self.df.loc[0, 'session_id'] cohort = self.df.loc[0, 'cohort'] # try: # image_path = self._get_path(participant_id, session_id, cohort, mode="image") # image = torch.load(image_path) # except FileNotFoundError: image_path = get_nii_path( self.caps_dict, participant_id, session_id, cohort=cohort, preprocessing=self.preprocessing) print(image_path) image_nii = nib.load(image_path) image_np = image_nii.get_fdata() image = ToTensor()(image_np) return image @abc.abstractmethod def __getitem__(self, idx): pass @abc.abstractmethod def num_elem_per_image(self): pass def eval(self): self.eval_mode = True return self def train(self): self.eval_mode = False return self class MRIDatasetImage(MRIDataset): """Dataset of MRI organized in a CAPS folder.""" def __init__(self, caps_directory, data_df, preprocessing='t1-linear', train_transformations=None, labels=True, all_transformations=None, multi_cohort=False): """ Args: caps_directory (string): Directory of all the images. data_file (string or DataFrame): Path to the tsv file or DataFrame containing the subject/session list. preprocessing (string): Defines the path to the data in CAPS. train_transformations (callable, optional): Optional transform to be applied only on training mode. labels (bool): If True the diagnosis will be extracted from the given DataFrame. all_transformations (callable, options): Optional transform to be applied during training and evaluation. multi_cohort (bool): If True caps_directory is the path to a TSV file linking cohort names and paths. """ self.elem_index = None self.mode = "image" super().__init__(caps_directory, data_df, preprocessing, augmentation_transformations=train_transformations, labels=labels, transformations=all_transformations, multi_cohort=multi_cohort) def __getitem__(self, idx): participant, session, cohort, _, label = self._get_meta_data(idx) image_path = get_nii_path(self.caps_dict, participant, session, cohort, self.preprocessing) image_nii = nib.load(image_path) image_np = image_nii.get_fdata() image = ToTensor()(image_np) # image_path = self._get_path(participant, session, cohort, "image") # image = torch.load(image_path) if self.transformations: image = self.transformations(image) if self.augmentation_transformations and not self.eval_mode: image = self.augmentation_transformations(image) sample = {'image': image, 'label': label, 'participant_id': participant, 'session_id': session, 'image_path': image_path} return sample def num_elem_per_image(self): return 1 class MinMaxNormalization(object): """Normalizes a tensor between 0 and 1""" def __call__(self, image): return (image - image.min()) / (image.max() - image.min()) def get_transforms(mode, minmaxnormalization=True, data_augmentation=None): """ Outputs the transformations that will be applied to the dataset :param mode: (str) input used by the network. Chosen from ['image', 'patch', 'roi', 'slice']. :param minmaxnormalization: (bool) if True will perform MinMaxNormalization :param data_augmentation: (list[str]) list of data augmentation performed on the training set. :return: - container transforms.Compose including transforms to apply in train and evaluation mode. - container transforms.Compose including transforms to apply in evaluation mode only. """ augmentation_dict = {"None": None} if data_augmentation: augmentation_list = [augmentation_dict[augmentation] for augmentation in data_augmentation] else: augmentation_list = [] if minmaxnormalization: transformations_list = [MinMaxNormalization()] else: transformations_list = [] all_transformations = transforms.Compose(transformations_list) train_transformations = transforms.Compose(augmentation_list) return train_transformations, all_transformations

Define model

class Conv5_FC3(nn.Module): """ Classifier for a binary classification task Image level architecture used on Minimal preprocessing """ def __init__(self, dropout=0.5): super(Conv5_FC3, self).__init__() self.features = nn.Sequential( nn.Conv3d(1, 8, 3, padding=1), nn.BatchNorm3d(8), nn.ReLU(), PadMaxPool3d(2, 2), nn.Conv3d(8, 16, 3, padding=1), nn.BatchNorm3d(16), nn.ReLU(), PadMaxPool3d(2, 2), nn.Conv3d(16, 32, 3, padding=1), nn.BatchNorm3d(32), nn.ReLU(), PadMaxPool3d(2, 2), nn.Conv3d(32, 64, 3, padding=1), nn.BatchNorm3d(64), nn.ReLU(), PadMaxPool3d(2, 2), nn.Conv3d(64, 128, 3, padding=1), nn.BatchNorm3d(128), nn.ReLU(), PadMaxPool3d(2, 2), ) self.classifier = nn.Sequential( Flatten(), nn.Dropout(p=0.5), nn.Linear(128 * 6 * 7 * 6, 1300), nn.ReLU(), nn.Linear(1300, 50), nn.ReLU(), nn.Linear(50, 2) ) self.gradients = None self.flattened_shape = [-1, 128, 6, 7, 6] def activations_hook(self, grad): self.gradients = grad def forward(self, x): x = self.features(x) if self.train and x.requires_grad: h = x.register_hook(self.activations_hook) x = self.classifier(x) return x def get_activations_gradient(self): return self.gradients def get_activations(self, x): return self.features(x) class Flatten(nn.Module): def forward(self, input): return input.view(input.size(0), -1) class PadMaxPool3d(nn.Module): def __init__(self, kernel_size, stride, return_indices=False, return_pad=False): super(PadMaxPool3d, self).__init__() self.kernel_size = kernel_size self.stride = stride self.pool = nn.MaxPool3d( kernel_size, stride, return_indices=return_indices) self.pad = nn.ConstantPad3d(padding=0, value=0) self.return_indices = return_indices self.return_pad = return_pad def set_new_return(self, return_indices=True, return_pad=True): self.return_indices = return_indices self.return_pad = return_pad self.pool.return_indices = return_indices def forward(self, f_maps): coords = [self.stride - f_maps.size(i + 2) % self.stride for i in range(3)] for i, coord in enumerate(coords): if coord == self.stride: coords[i] = 0 self.pad.padding = (coords[2], 0, coords[1], 0, coords[0], 0) if self.return_indices: output, indices = self.pool(self.pad(f_maps)) if self.return_pad: return output, indices, (coords[2], 0, coords[1], 0, coords[0], 0) else: return output, indices else: output = self.pool(self.pad(f_maps)) if self.return_pad: return output, (coords[2], 0, coords[1], 0, coords[0], 0) else: return output

Interpretation methods

Grad-cam

The Idea: to take the gradients of the target class flowing into the final convolutional layer to produce a heatmap highlighting the important regions in the image to predict the concept.

  1. Select the class of interest ( target class)

  2. Сalculate the gradient of the class logit nd the activation maps

  3. Average over activations using the global average pooling

  4. Obtain he neuron importance weights coefficients α k c for each map (this weight α c k represents a partial linearization of the deep network downstream from A, and captures the ‘importance’ of feature map k for a target class c)

  5. Consider a linear combination

  6. Apply ReLU

  7. Interpolate the heat-map (increase the dimension)

class GradCam(): def __init__(self, model): self.model = model def grad_cam(self, input, logit, size): logit[:, logit.data.max(1)[1]].backward() ## get the gradient of the output with respect to the parameters of the model # logit[:,0].backward() activation = self.model.get_activations(input).detach() # get the activations of the last convolutional layer act_grad = self.model.get_activations_gradient() # pull the gradients out of the model pool_act_grad = torch.mean(act_grad, dim=[2, 3, 4], keepdim=True) # pool the gradients across the channels activation = activation * pool_act_grad # weight the channels by corresponding gradients heatmap = torch.sum(activation, dim=1) # heatmap = F.relu(heatmap) # relu on top of the heatmap heatmap /= torch.max(heatmap) # normalize the heatmap heatmap = F.interpolate(heatmap.unsqueeze(0), size[1:], mode='trilinear', align_corners=False) # 58 70 58 interpolate the heat-map and project it onto the original image return heatmap
def get_masks(model, loader, mean_mask = True, mask_type='grad_cam', size=(180, 180, 180), save = None, save_binary=None, task='AD_CN'): masks = [] labels = [] output_dir = '/output' mask_dir = os.path.join(output_dir, 'img_mask') os.makedirs(mask_dir, exist_ok=True) for i, data in tqdm(enumerate(loader, 0)): image = data['image'].cuda() labels.append(data['label'].numpy().item()) logit = model(image) if mask_type == 'grad_cam': gc = GradCam(model) heatmap = gc.grad_cam(image, logit, size) masks.append(heatmap.cpu().numpy()) name = data['image_path'][0][-80:-53] if save: nib.save(nib.Nifti1Image(heatmap.cpu().numpy(), affine=np.eye(4)), os.path.join(mask_dir, '{}_gradcam_mask.nii.gz'.format(name))) if save_binary: mask_binary_dir = os.path.join(output_dir, 'img_mask_binary') os.makedirs(mask_binary_dir, exist_ok=True) binary = heatmap.cpu().numpy()[heatmap.cpu().numpy() <= 0.35] = 0 nib.save(nib.Nifti1Image(binary, affine=np.eye(4)), os.path.join(mask_binary_dir, '{}_gradcam_mask.nii.gz'.format(name))) del image, heatmap elif mask_type == 'guided_backprop': gp = GuidedBackprop(model) pred = logit.data.max(1)[1].item() img_grad = gp.guided_backprop(image, pred) masks.append(img_grad) del image, img_grad, pred elif mask_type == 'mean_pertrub': mp = MeanPertrub(rep=9) pred = logit.data.max(1)[1].item() for param in model.parameters(): param.requires_grad = False masks_pertrub = mp.get_masks(image, pred, model) masks.append(masks_pertrub) del image, masks_pertrub, pred else: raise NotImplementedType('define mask_type') if mean_mask: name = data['image_path'][0][-80:-53] concat = np.concatenate(masks, axis=0).squeeze(axis=1) labels_cn = np.array(labels) == 0 labels_ad = np.array(labels) == 1 mean_0 = concat[labels_cn].mean(axis=0) mean_1 = concat[labels_ad].mean(axis=0) nib.save(nib.Nifti1Image(mean_0, affine=np.eye(4)), os.path.join(output_dir, '{}_{}_mean_0_{}.nii.gz'.format(name, mask_type, task))) nib.save(nib.Nifti1Image(mean_1, affine=np.eye(4)), os.path.join(output_dir, '{}_{}_mean_1_{}.nii.gz'.format(name, mask_type, task))) return mean_0, mean_1
tsv_path = Path('10_sub_for_validation/labels_list_10') caps = Path("10_sub_for_validation/10_sub_for_validation") task_diagnoses = ['AD','CN'] mask_type = 'grad_cam' source_path = Path('10_sub_for_validation/model') task = 'test'
!cd 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data && ls
ground_truth_mask_sub-ADNI002S4262.nii.gz interpretation_gradcam_mask_mask_T1_sub-ADNI002S4262_ses-M60.nii.gz interpretation_guided_backprop_mask_T1_sub-ADNI002S4262_ses-M60.nii.gz interpretation_mean_pertrub_mask_T1_sub-ADNI002S4262_ses-M60.nii.gz sub-ADNI002S4262_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w_cn.nii.gz sub-ADNI002S4262_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz sub-ADNI002S4262_ses-M60_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w_ad.nii.gz sub-ADNI002S4262_ses-M60_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz
model = Conv5_FC3().eval() model.cuda() model_path = os.path.join(source_path, "model_best.pth.tar") results = torch.load(model_path, map_location='cuda') model.load_state_dict(results['model']) test_transforms, all_transforms = get_transforms('image', minmaxnormalization=True, data_augmentation=None) test_df = pd.DataFrame() for diagnosis in task_diagnoses: test_diagnosis_path = path.join( tsv_path, diagnosis + '.tsv') test_diagnosis_df = pd.read_csv(test_diagnosis_path, sep='\t') test_df = pd.concat([test_df, test_diagnosis_df]) test_df.reset_index(inplace=True, drop=True) test_df["cohort"] = "single" data_test = MRIDatasetImage(caps, data_df=test_df, preprocessing='t1-linear', train_transformations=test_transforms, all_transformations=all_transforms, labels=True) test_loader = DataLoader(data_test, batch_size=1, shuffle=False, num_workers=0, pin_memory=True) _, mean_1 = get_masks(model, test_loader, mean_mask=True, mask_type=mask_type, size=data_test.size, task=task, save=True)
10it [00:16, 1.61s/it] /usr/local/lib/python3.7/dist-packages/ipykernel_launcher.py:47: RuntimeWarning: Mean of empty slice. /usr/local/lib/python3.7/dist-packages/numpy/core/_methods.py:182: RuntimeWarning: invalid value encountered in true_divide ret, rcount, out=ret, casting='unsafe', subok=False) 20it [00:26, 1.34s/it]

Display Grad-cam Interpetation

def display_interpretation(interp_img, data_img, cut_coords=(40, 25, 55), threshold=0.35, name = 'mean'): fig, axes = plt.subplots(figsize=(16, 8)) roi_img = nib.Nifti1Image(interp_img, affine=np.eye(4)) bim_img = nib.Nifti1Image(np.squeeze(data_img['image']).cpu().detach().numpy(), affine=np.eye(4)) if cut_coords is None: plotting.plot_roi(roi_img, bim_img, axes=axes, colorbar=True, cmap='jet', threshold=threshold) else: plotting.plot_roi(roi_img, bim_img, cut_coords=cut_coords, axes=axes, colorbar=True, cmap='jet', threshold=threshold) plt.show() fig.savefig("grad_cam_{}".format(name), bbox_inches='tight')
test_loader.dataset[0]['image_path'], test_loader.dataset[0]['label']
('10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data/sub-ADNI002S4262_ses-M60_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz', 1)
dataset_img = data_test.__getitem__(0) display_interpretation(mean_1, dataset_img, threshold=0.30)
/usr/local/lib/python3.7/dist-packages/numpy/ma/core.py:2830: UserWarning: Warning: converting a masked element to nan. order=order, subok=True, ndmin=ndmin)
Image in a Jupyter notebook

Guided Backprop

Idea: using gradient back propagation as it is except at the ReLU stages. Guided Backpropagation basically combines vanilla backpropagation and DeconvNets when handling the ReLU nonlinearity:

  • Like DeconvNets, in Guided Backpropagation we only backpropagate positive error signals – i.e. we set the negative gradients to zero (ref). This is the application of the ReLU to the error signal itself during the backward pass.

  • Like vanilla backpropagation, we also restrict ourselves to only positive inputs.

Thus, the gradient is “guided” by both the input and the error signal.

class GuidedBackprop(): def __init__(self, model): self.model = model def guided_backprop(self, input, label): def hookfunc(module, gradInput, gradOutput): return tuple([(None if g is None else g.clamp(min=0)) for g in gradInput]) input.requires_grad = True h = [0] * len(list(self.model.features) + list(self.model.classifier)) for i, module in enumerate(list(self.model.features) + list(self.model.classifier)): if type(module) == nn.ReLU: h[i] = module.register_backward_hook(hookfunc) self.model.eval() output = self.model(input) self.model.zero_grad() output[0][label].backward() grad = input.grad.data grad /= grad.max() return np.clip(grad.cpu().numpy(), 0, 1)
mean_0_gp, mean_1_gp = get_masks(model, test_loader, mean_mask=True, mask_type='guided_backprop', size=data_test.size)
20it [00:12, 1.64it/s]
dataset_img = data_test.__getitem__(0) display_interpretation(mean_1_gp, dataset_img, threshold=0.015)
Image in a Jupyter notebook
dataset_img = data_test.__getitem__(10) display_interpretation(mean_0_gp, dataset_img, threshold=0.015)
Image in a Jupyter notebook

MeanPertrub

from scipy.ndimage import gaussian_filter from torch.optim import Adam def jittering(img, jit, C, D, H, W): return np.pad(img, [(0, 0), (0, jit), (0, jit), (0, jit)], mode='constant') def upsample(mask, img_size): x = F.interpolate(mask, size=img_size, mode='trilinear', align_corners=False) return x def np_to_torch(X, img_size, requires_grad=False): output = torch.tensor(X, requires_grad=requires_grad).cuda() return output.reshape(img_size) def tv_norm(x, beta=1): d1 = torch.mean(torch.abs(x[:, :, :-1, :, :] - x[:, :, 1:, :, :]).pow(beta)) d2 = torch.mean(torch.abs(x[:, :, :, :-1, :] - x[:, :, :, 1:, :]).pow(beta)) d3 = torch.mean(torch.abs(x[:, :, :, :, :-1] - x[:, :, :, :, 1:]).pow(beta)) tv = d1 + d2 + d3 return tv class GaussianFilter(nn.Module): def __init__(self, k_size, g_filter): super(GaussianFilter, self).__init__() # self.device = device pad = (k_size - 1) // 2 self.k_size = k_size self.conv = nn.Conv3d(1, 1, k_size, padding=(pad, pad, pad), bias=None) self.conv.cuda() self.g_filter = g_filter def forward(self, x, sigma): n = np.zeros((self.k_size, self.k_size, self.k_size)) n[self.k_size // 2 + 1, self.k_size // 2 + 1, self.k_size // 2 + 1] = 1 k = self.g_filter(n, sigma=sigma)[None, None, :, :, :] self.conv.weight = torch.nn.Parameter(torch.from_numpy(k).float().cuda()) for param in self.conv.parameters(): param.requires_grad = False return self.conv(x) class MeanPertrub(): def __init__(self, mask_scale=4, blur_img=10, blur_mask=10, max_iter=300, l1_coef=3, tv_coef=1, tv_beta=7, rep=10, jit=5, k_size=5, lr=1e-4): # self.device = device self.lr = lr self.mask_scale = 4 self.blur_img = blur_img self.blur_mask = blur_mask self.max_iter = max_iter self.l1_coef = l1_coef self.tv_coef = tv_coef self.tv_beta = tv_beta self.rep = rep self.jit = jit self.filter_gaus = GaussianFilter(k_size, gaussian_filter) def get_masks(self, img, pred, model): res = [] rw_max = self.max_iter // 5 i = 0 img = img.squeeze(axis=0) C, D, H, W = img.shape model_ans = pred mask = torch.ones((1, C, D // self.mask_scale, H // self.mask_scale, W // self.mask_scale), requires_grad=True, device='cuda') optimizer = Adam([mask], lr=self.lr, betas=(0.9, 0.99), amsgrad=True, weight_decay=1e-4) scheduler = torch.optim.lr_scheduler.StepLR(optimizer, step_size=30, gamma=0.1) best_loss, best_mask = float('inf'), None for epoch in tqdm(range(self.max_iter)): mask_up = upsample(mask, img_size=(D, H, W)) mask_up = self.filter_gaus(mask_up, self.blur_mask) total_pred_loss = 0 for _ in range(self.rep): img_jit = jittering(img.cpu(), self.jit, C, D, H, W) j0 = np.random.randint(self.jit) j1 = np.random.randint(self.jit) j2 = np.random.randint(self.jit) img_jit = img_jit[:, j0:(D + j0), j1:(H + j1), j2:(W + j2)] img_torch = np_to_torch(img_jit, img_size=(1, C, D, H, W), requires_grad=False) blur = self.filter_gaus(img_torch, self.blur_img) perturbated_input = img_torch.mul(mask_up) + blur.mul(1 - mask_up).cuda() outputs = model(perturbated_input.float()) # problem prob = torch.exp(outputs) total_pred_loss += F.relu(prob[0, model_ans] - 0.05) del outputs, prob, perturbated_input, blur, img_torch, img_jit reg_loss = self.l1_coef * torch.mean(torch.abs(1 - mask)) + self.tv_coef * tv_norm(mask_up, self.tv_beta) rw = 1 if epoch > rw_max else epoch / rw_max loss = total_pred_loss / self.rep + rw * reg_loss if epoch > 50 and loss.item() <= best_loss: best_loss = loss.item() best_mask = mask.clone().detach() optimizer.zero_grad() loss.backward() optimizer.step() scheduler.step() mask.data.clamp_(0, 1) res_mask = upsample((1 - best_mask), img_size=(D, H, W)) res.append(res_mask.cpu().numpy()) i += 1 return res_mask.cpu().numpy()
mean_0_mp, mean_1_mp = get_masks(model, test_loader, mean_mask=True, mask_type='mean_pertrub', size=data_test.size)
0it [00:00, ?it/s] 0%| | 0/300 [00:00<?, ?it/s] 0%| | 1/300 [00:00<04:31, 1.10it/s] 1%| | 2/300 [00:02<05:23, 1.09s/it] 1%| | 3/300 [00:03<05:42, 1.15s/it] 1%|▏ | 4/300 [00:04<05:50, 1.18s/it] 2%|▏ | 5/300 [00:05<05:54, 1.20s/it] 2%|▏ | 6/300 [00:07<05:55, 1.21s/it] 2%|▏ | 7/300 [00:08<06:11, 1.27s/it] 3%|▎ | 8/300 [00:09<06:09, 1.26s/it] 3%|▎ | 9/300 [00:10<06:04, 1.25s/it] 3%|▎ | 10/300 [00:12<06:00, 1.24s/it] 4%|▎ | 11/300 [00:13<05:57, 1.24s/it] 4%|▍ | 12/300 [00:14<05:55, 1.23s/it] 4%|▍ | 13/300 [00:15<05:53, 1.23s/it] 5%|▍ | 14/300 [00:17<05:51, 1.23s/it] 5%|▌ | 15/300 [00:18<05:49, 1.23s/it] 5%|▌ | 16/300 [00:19<05:48, 1.23s/it] 6%|▌ | 17/300 [00:20<05:47, 1.23s/it] 6%|▌ | 18/300 [00:21<05:46, 1.23s/it] 6%|▋ | 19/300 [00:23<05:44, 1.23s/it] 7%|▋ | 20/300 [00:24<05:43, 1.23s/it] 7%|▋ | 21/300 [00:25<05:47, 1.25s/it] 7%|▋ | 22/300 [00:26<05:44, 1.24s/it] 8%|▊ | 23/300 [00:28<05:42, 1.24s/it] 8%|▊ | 24/300 [00:29<05:41, 1.24s/it] 8%|▊ | 25/300 [00:30<05:38, 1.23s/it] 9%|▊ | 26/300 [00:31<05:36, 1.23s/it] 9%|▉ | 27/300 [00:33<05:35, 1.23s/it] 9%|▉ | 28/300 [00:34<05:34, 1.23s/it] 10%|▉ | 29/300 [00:35<05:33, 1.23s/it] 10%|█ | 30/300 [00:36<05:32, 1.23s/it] 10%|█ | 31/300 [00:37<05:30, 1.23s/it] 11%|█ | 32/300 [00:39<05:29, 1.23s/it] 11%|█ | 33/300 [00:40<05:28, 1.23s/it] 11%|█▏ | 34/300 [00:41<05:27, 1.23s/it] 12%|█▏ | 35/300 [00:42<05:26, 1.23s/it] 12%|█▏ | 36/300 [00:44<05:25, 1.23s/it] 12%|█▏ | 37/300 [00:45<05:23, 1.23s/it] 13%|█▎ | 38/300 [00:46<05:23, 1.23s/it] 13%|█▎ | 39/300 [00:47<05:22, 1.23s/it] 13%|█▎ | 40/300 [00:49<05:20, 1.23s/it] 14%|█▎ | 41/300 [00:50<05:19, 1.23s/it] 14%|█▍ | 42/300 [00:51<05:17, 1.23s/it] 14%|█▍ | 43/300 [00:52<05:17, 1.23s/it] 15%|█▍ | 44/300 [00:54<05:15, 1.23s/it] 15%|█▌ | 45/300 [00:55<05:13, 1.23s/it] 15%|█▌ | 46/300 [00:56<05:13, 1.23s/it] 16%|█▌ | 47/300 [00:57<05:11, 1.23s/it] 16%|█▌ | 48/300 [00:58<05:14, 1.25s/it] 16%|█▋ | 49/300 [01:00<05:12, 1.24s/it] 17%|█▋ | 50/300 [01:01<05:10, 1.24s/it] 17%|█▋ | 51/300 [01:02<05:08, 1.24s/it] 17%|█▋ | 52/300 [01:03<05:07, 1.24s/it] 18%|█▊ | 53/300 [01:05<05:05, 1.24s/it] 18%|█▊ | 54/300 [01:06<05:03, 1.24s/it] 18%|█▊ | 55/300 [01:07<05:02, 1.23s/it] 19%|█▊ | 56/300 [01:08<05:00, 1.23s/it] 19%|█▉ | 57/300 [01:10<04:59, 1.23s/it] 19%|█▉ | 58/300 [01:11<04:58, 1.23s/it] 20%|█▉ | 59/300 [01:12<04:57, 1.23s/it] 20%|██ | 60/300 [01:13<04:56, 1.23s/it] 20%|██ | 61/300 [01:15<04:54, 1.23s/it] 21%|██ | 62/300 [01:16<04:53, 1.23s/it] 21%|██ | 63/300 [01:17<04:52, 1.23s/it] 21%|██▏ | 64/300 [01:18<04:51, 1.23s/it] 22%|██▏ | 65/300 [01:19<04:50, 1.23s/it] 22%|██▏ | 66/300 [01:21<04:48, 1.23s/it] 22%|██▏ | 67/300 [01:22<04:47, 1.23s/it] 23%|██▎ | 68/300 [01:23<04:45, 1.23s/it] 23%|██▎ | 69/300 [01:24<04:44, 1.23s/it] 23%|██▎ | 70/300 [01:26<04:43, 1.23s/it] 24%|██▎ | 71/300 [01:27<04:42, 1.23s/it] 24%|██▍ | 72/300 [01:28<04:41, 1.23s/it] 24%|██▍ | 73/300 [01:29<04:40, 1.24s/it] 25%|██▍ | 74/300 [01:31<04:43, 1.26s/it] 25%|██▌ | 75/300 [01:32<04:41, 1.25s/it] 25%|██▌ | 76/300 [01:33<04:39, 1.25s/it] 26%|██▌ | 77/300 [01:34<04:37, 1.25s/it] 26%|██▌ | 78/300 [01:36<04:36, 1.24s/it] 26%|██▋ | 79/300 [01:37<04:34, 1.24s/it] 27%|██▋ | 80/300 [01:38<04:32, 1.24s/it] 27%|██▋ | 81/300 [01:39<04:31, 1.24s/it] 27%|██▋ | 82/300 [01:41<04:30, 1.24s/it] 28%|██▊ | 83/300 [01:42<04:28, 1.24s/it] 28%|██▊ | 84/300 [01:43<04:27, 1.24s/it] 28%|██▊ | 85/300 [01:44<04:26, 1.24s/it] 29%|██▊ | 86/300 [01:45<04:24, 1.24s/it] 29%|██▉ | 87/300 [01:47<04:23, 1.24s/it] 29%|██▉ | 88/300 [01:48<04:22, 1.24s/it] 30%|██▉ | 89/300 [01:49<04:21, 1.24s/it] 30%|███ | 90/300 [01:50<04:19, 1.24s/it] 30%|███ | 91/300 [01:52<04:18, 1.24s/it] 31%|███ | 92/300 [01:53<04:17, 1.24s/it] 31%|███ | 93/300 [01:54<04:16, 1.24s/it] 31%|███▏ | 94/300 [01:55<04:15, 1.24s/it] 32%|███▏ | 95/300 [01:57<04:13, 1.24s/it] 32%|███▏ | 96/300 [01:58<04:12, 1.24s/it] 32%|███▏ | 97/300 [01:59<04:11, 1.24s/it] 33%|███▎ | 98/300 [02:00<04:10, 1.24s/it] 33%|███▎ | 99/300 [02:02<04:09, 1.24s/it] 33%|███▎ | 100/300 [02:03<04:07, 1.24s/it] 34%|███▎ | 101/300 [02:04<04:11, 1.26s/it] 34%|███▍ | 102/300 [02:05<04:08, 1.26s/it] 34%|███▍ | 103/300 [02:07<04:06, 1.25s/it] 35%|███▍ | 104/300 [02:08<04:04, 1.25s/it] 35%|███▌ | 105/300 [02:09<04:03, 1.25s/it] 35%|███▌ | 106/300 [02:10<04:01, 1.24s/it] 36%|███▌ | 107/300 [02:12<04:00, 1.24s/it] 36%|███▌ | 108/300 [02:13<03:58, 1.24s/it] 36%|███▋ | 109/300 [02:14<03:57, 1.24s/it] 37%|███▋ | 110/300 [02:15<03:55, 1.24s/it] 37%|███▋ | 111/300 [02:17<03:54, 1.24s/it] 37%|███▋ | 112/300 [02:18<03:53, 1.24s/it] 38%|███▊ | 113/300 [02:19<03:52, 1.24s/it] 38%|███▊ | 114/300 [02:20<03:50, 1.24s/it] 38%|███▊ | 115/300 [02:22<03:49, 1.24s/it] 39%|███▊ | 116/300 [02:23<03:48, 1.24s/it] 39%|███▉ | 117/300 [02:24<03:47, 1.24s/it] 39%|███▉ | 118/300 [02:25<03:45, 1.24s/it] 40%|███▉ | 119/300 [02:26<03:44, 1.24s/it] 40%|████ | 120/300 [02:28<03:43, 1.24s/it] 40%|████ | 121/300 [02:29<03:42, 1.24s/it] 41%|████ | 122/300 [02:30<03:40, 1.24s/it] 41%|████ | 123/300 [02:31<03:39, 1.24s/it] 41%|████▏ | 124/300 [02:33<03:38, 1.24s/it] 42%|████▏ | 125/300 [02:34<03:37, 1.24s/it] 42%|████▏ | 126/300 [02:35<03:36, 1.24s/it] 42%|████▏ | 127/300 [02:36<03:37, 1.26s/it] 43%|████▎ | 128/300 [02:38<03:35, 1.25s/it] 43%|████▎ | 129/300 [02:39<03:33, 1.25s/it] 43%|████▎ | 130/300 [02:40<03:32, 1.25s/it] 44%|████▎ | 131/300 [02:41<03:30, 1.25s/it] 44%|████▍ | 132/300 [02:43<03:29, 1.24s/it] 44%|████▍ | 133/300 [02:44<03:27, 1.24s/it] 45%|████▍ | 134/300 [02:45<03:26, 1.25s/it] 45%|████▌ | 135/300 [02:46<03:25, 1.24s/it] 45%|████▌ | 136/300 [02:48<03:24, 1.25s/it] 46%|████▌ | 137/300 [02:49<03:22, 1.24s/it] 46%|████▌ | 138/300 [02:50<03:21, 1.24s/it] 46%|████▋ | 139/300 [02:51<03:20, 1.24s/it] 47%|████▋ | 140/300 [02:53<03:18, 1.24s/it] 47%|████▋ | 141/300 [02:54<03:17, 1.24s/it] 47%|████▋ | 142/300 [02:55<03:16, 1.24s/it] 48%|████▊ | 143/300 [02:56<03:15, 1.24s/it] 48%|████▊ | 144/300 [02:58<03:13, 1.24s/it] 48%|████▊ | 145/300 [02:59<03:12, 1.24s/it] 49%|████▊ | 146/300 [03:00<03:11, 1.24s/it] 49%|████▉ | 147/300 [03:01<03:10, 1.24s/it] 49%|████▉ | 148/300 [03:03<03:09, 1.24s/it] 50%|████▉ | 149/300 [03:04<03:08, 1.25s/it] 50%|█████ | 150/300 [03:05<03:06, 1.24s/it] 50%|█████ | 151/300 [03:06<03:05, 1.24s/it] 51%|█████ | 152/300 [03:08<03:03, 1.24s/it] 51%|█████ | 153/300 [03:09<03:02, 1.24s/it] 51%|█████▏ | 154/300 [03:10<03:03, 1.26s/it] 52%|█████▏ | 155/300 [03:11<03:01, 1.25s/it] 52%|█████▏ | 156/300 [03:13<03:00, 1.25s/it] 52%|█████▏ | 157/300 [03:14<02:58, 1.25s/it] 53%|█████▎ | 158/300 [03:15<02:56, 1.25s/it] 53%|█████▎ | 159/300 [03:16<02:55, 1.24s/it] 53%|█████▎ | 160/300 [03:18<02:53, 1.24s/it] 54%|█████▎ | 161/300 [03:19<02:52, 1.24s/it] 54%|█████▍ | 162/300 [03:20<02:51, 1.24s/it] 54%|█████▍ | 163/300 [03:21<02:49, 1.24s/it] 55%|█████▍ | 164/300 [03:22<02:48, 1.24s/it] 55%|█████▌ | 165/300 [03:24<02:47, 1.24s/it] 55%|█████▌ | 166/300 [03:25<02:46, 1.24s/it] 56%|█████▌ | 167/300 [03:26<02:44, 1.24s/it] 56%|█████▌ | 168/300 [03:27<02:43, 1.24s/it] 56%|█████▋ | 169/300 [03:29<02:42, 1.24s/it] 57%|█████▋ | 170/300 [03:30<02:41, 1.24s/it] 57%|█████▋ | 171/300 [03:31<02:40, 1.24s/it] 57%|█████▋ | 172/300 [03:32<02:38, 1.24s/it] 58%|█████▊ | 173/300 [03:34<02:37, 1.24s/it] 58%|█████▊ | 174/300 [03:35<02:36, 1.24s/it] 58%|█████▊ | 175/300 [03:36<02:35, 1.24s/it] 59%|█████▊ | 176/300 [03:37<02:33, 1.24s/it] 59%|█████▉ | 177/300 [03:39<02:32, 1.24s/it] 59%|█████▉ | 178/300 [03:40<02:31, 1.24s/it] 60%|█████▉ | 179/300 [03:41<02:30, 1.24s/it] 60%|██████ | 180/300 [03:42<02:31, 1.26s/it] 60%|██████ | 181/300 [03:44<02:29, 1.25s/it] 61%|██████ | 182/300 [03:45<02:27, 1.25s/it] 61%|██████ | 183/300 [03:46<02:26, 1.25s/it] 61%|██████▏ | 184/300 [03:47<02:24, 1.25s/it] 62%|██████▏ | 185/300 [03:49<02:23, 1.24s/it] 62%|██████▏ | 186/300 [03:50<02:21, 1.24s/it] 62%|██████▏ | 187/300 [03:51<02:20, 1.24s/it] 63%|██████▎ | 188/300 [03:52<02:19, 1.24s/it] 63%|██████▎ | 189/300 [03:54<02:18, 1.24s/it] 63%|██████▎ | 190/300 [03:55<02:16, 1.24s/it] 64%|██████▎ | 191/300 [03:56<02:15, 1.24s/it] 64%|██████▍ | 192/300 [03:57<02:14, 1.24s/it] 64%|██████▍ | 193/300 [03:59<02:12, 1.24s/it] 65%|██████▍ | 194/300 [04:00<02:11, 1.24s/it] 65%|██████▌ | 195/300 [04:01<02:10, 1.24s/it] 65%|██████▌ | 196/300 [04:02<02:09, 1.24s/it] 66%|██████▌ | 197/300 [04:04<02:07, 1.24s/it] 66%|██████▌ | 198/300 [04:05<02:06, 1.24s/it] 66%|██████▋ | 199/300 [04:06<02:05, 1.24s/it] 67%|██████▋ | 200/300 [04:07<02:03, 1.24s/it] 67%|██████▋ | 201/300 [04:08<02:02, 1.24s/it] 67%|██████▋ | 202/300 [04:10<02:01, 1.24s/it] 68%|██████▊ | 203/300 [04:11<02:00, 1.24s/it] 68%|██████▊ | 204/300 [04:12<01:59, 1.24s/it] 68%|██████▊ | 205/300 [04:13<01:57, 1.24s/it] 69%|██████▊ | 206/300 [04:15<01:58, 1.26s/it] 69%|██████▉ | 207/300 [04:16<01:56, 1.26s/it] 69%|██████▉ | 208/300 [04:17<01:55, 1.25s/it] 70%|██████▉ | 209/300 [04:18<01:53, 1.25s/it] 70%|███████ | 210/300 [04:20<01:52, 1.25s/it] 70%|███████ | 211/300 [04:21<01:50, 1.25s/it] 71%|███████ | 212/300 [04:22<01:49, 1.24s/it] 71%|███████ | 213/300 [04:23<01:48, 1.24s/it] 71%|███████▏ | 214/300 [04:25<01:46, 1.24s/it] 72%|███████▏ | 215/300 [04:26<01:45, 1.24s/it] 72%|███████▏ | 216/300 [04:27<01:44, 1.24s/it] 72%|███████▏ | 217/300 [04:28<01:42, 1.24s/it] 73%|███████▎ | 218/300 [04:30<01:41, 1.24s/it] 73%|███████▎ | 219/300 [04:31<01:40, 1.24s/it] 73%|███████▎ | 220/300 [04:32<01:39, 1.24s/it] 74%|███████▎ | 221/300 [04:33<01:38, 1.24s/it] 74%|███████▍ | 222/300 [04:35<01:36, 1.24s/it] 74%|███████▍ | 223/300 [04:36<01:35, 1.24s/it] 75%|███████▍ | 224/300 [04:37<01:34, 1.24s/it] 75%|███████▌ | 225/300 [04:38<01:32, 1.24s/it] 75%|███████▌ | 226/300 [04:40<01:31, 1.24s/it] 76%|███████▌ | 227/300 [04:41<01:30, 1.24s/it] 76%|███████▌ | 228/300 [04:42<01:29, 1.24s/it] 76%|███████▋ | 229/300 [04:43<01:27, 1.24s/it] 77%|███████▋ | 230/300 [04:44<01:26, 1.24s/it] 77%|███████▋ | 231/300 [04:46<01:25, 1.24s/it] 77%|███████▋ | 232/300 [04:47<01:24, 1.24s/it] 78%|███████▊ | 233/300 [04:48<01:24, 1.26s/it] 78%|███████▊ | 234/300 [04:50<01:22, 1.25s/it] 78%|███████▊ | 235/300 [04:51<01:21, 1.25s/it] 79%|███████▊ | 236/300 [04:52<01:19, 1.24s/it] 79%|███████▉ | 237/300 [04:53<01:18, 1.24s/it] 79%|███████▉ | 238/300 [04:54<01:17, 1.24s/it] 80%|███████▉ | 239/300 [04:56<01:15, 1.24s/it] 80%|████████ | 240/300 [04:57<01:14, 1.24s/it] 80%|████████ | 241/300 [04:58<01:13, 1.24s/it] 81%|████████ | 242/300 [04:59<01:11, 1.24s/it] 81%|████████ | 243/300 [05:01<01:10, 1.24s/it] 81%|████████▏ | 244/300 [05:02<01:09, 1.24s/it] 82%|████████▏ | 245/300 [05:03<01:08, 1.24s/it] 82%|████████▏ | 246/300 [05:04<01:06, 1.24s/it] 82%|████████▏ | 247/300 [05:06<01:05, 1.24s/it] 83%|████████▎ | 248/300 [05:07<01:04, 1.24s/it] 83%|████████▎ | 249/300 [05:08<01:03, 1.24s/it] 83%|████████▎ | 250/300 [05:09<01:01, 1.24s/it] 84%|████████▎ | 251/300 [05:11<01:00, 1.24s/it] 84%|████████▍ | 252/300 [05:12<00:59, 1.24s/it] 84%|████████▍ | 253/300 [05:13<00:58, 1.24s/it] 85%|████████▍ | 254/300 [05:14<00:57, 1.24s/it] 85%|████████▌ | 255/300 [05:16<00:55, 1.24s/it] 85%|████████▌ | 256/300 [05:17<00:54, 1.24s/it] 86%|████████▌ | 257/300 [05:18<00:53, 1.24s/it] 86%|████████▌ | 258/300 [05:19<00:51, 1.24s/it] 86%|████████▋ | 259/300 [05:21<00:51, 1.26s/it] 87%|████████▋ | 260/300 [05:22<00:49, 1.25s/it] 87%|████████▋ | 261/300 [05:23<00:48, 1.25s/it] 87%|████████▋ | 262/300 [05:24<00:47, 1.25s/it] 88%|████████▊ | 263/300 [05:25<00:45, 1.24s/it] 88%|████████▊ | 264/300 [05:27<00:44, 1.24s/it] 88%|████████▊ | 265/300 [05:28<00:43, 1.24s/it] 89%|████████▊ | 266/300 [05:29<00:42, 1.24s/it] 89%|████████▉ | 267/300 [05:30<00:40, 1.24s/it] 89%|████████▉ | 268/300 [05:32<00:39, 1.24s/it] 90%|████████▉ | 269/300 [05:33<00:38, 1.24s/it] 90%|█████████ | 270/300 [05:34<00:37, 1.24s/it] 90%|█████████ | 271/300 [05:35<00:35, 1.24s/it] 91%|█████████ | 272/300 [05:37<00:34, 1.24s/it] 91%|█████████ | 273/300 [05:38<00:33, 1.24s/it] 91%|█████████▏| 274/300 [05:39<00:32, 1.24s/it] 92%|█████████▏| 275/300 [05:40<00:30, 1.24s/it] 92%|█████████▏| 276/300 [05:42<00:29, 1.24s/it] 92%|█████████▏| 277/300 [05:43<00:28, 1.24s/it] 93%|█████████▎| 278/300 [05:44<00:27, 1.24s/it] 93%|█████████▎| 279/300 [05:45<00:26, 1.24s/it] 93%|█████████▎| 280/300 [05:47<00:24, 1.24s/it] 94%|█████████▎| 281/300 [05:48<00:23, 1.24s/it] 94%|█████████▍| 282/300 [05:49<00:22, 1.24s/it] 94%|█████████▍| 283/300 [05:50<00:21, 1.24s/it] 95%|█████████▍| 284/300 [05:52<00:19, 1.24s/it] 95%|█████████▌| 285/300 [05:53<00:18, 1.26s/it] 95%|█████████▌| 286/300 [05:54<00:17, 1.26s/it] 96%|█████████▌| 287/300 [05:55<00:16, 1.26s/it] 96%|█████████▌| 288/300 [05:57<00:15, 1.25s/it] 96%|█████████▋| 289/300 [05:58<00:13, 1.25s/it] 97%|█████████▋| 290/300 [05:59<00:12, 1.25s/it] 97%|█████████▋| 291/300 [06:00<00:11, 1.24s/it] 97%|█████████▋| 292/300 [06:02<00:09, 1.24s/it] 98%|█████████▊| 293/300 [06:03<00:08, 1.24s/it] 98%|█████████▊| 294/300 [06:04<00:07, 1.24s/it] 98%|█████████▊| 295/300 [06:05<00:06, 1.24s/it] 99%|█████████▊| 296/300 [06:07<00:04, 1.24s/it] 99%|█████████▉| 297/300 [06:08<00:03, 1.24s/it] 99%|█████████▉| 298/300 [06:09<00:02, 1.24s/it] 100%|█████████▉| 299/300 [06:10<00:01, 1.24s/it] 100%|██████████| 300/300 [06:11<00:00, 1.24s/it] 1it [06:12, 372.91s/it] 0%| | 0/300 [00:00<?, ?it/s] 0%| | 1/300 [00:00<04:10, 1.19it/s] 1%| | 2/300 [00:02<05:23, 1.08s/it] 1%| | 3/300 [00:03<05:43, 1.16s/it] 1%|▏ | 4/300 [00:04<05:53, 1.19s/it] 2%|▏ | 5/300 [00:05<05:57, 1.21s/it] 2%|▏ | 6/300 [00:07<05:59, 1.22s/it] 2%|▏ | 7/300 [00:08<06:00, 1.23s/it] 3%|▎ | 8/300 [00:09<06:01, 1.24s/it] 3%|▎ | 9/300 [00:10<06:01, 1.24s/it] 3%|▎ | 10/300 [00:12<06:00, 1.24s/it] 4%|▎ | 11/300 [00:13<06:05, 1.27s/it] 4%|▍ | 12/300 [00:14<06:02, 1.26s/it] 4%|▍ | 13/300 [00:15<06:00, 1.25s/it] 5%|▍ | 14/300 [00:17<05:59, 1.26s/it] 5%|▌ | 15/300 [00:18<05:57, 1.25s/it] 5%|▌ | 16/300 [00:19<05:55, 1.25s/it] 6%|▌ | 17/300 [00:20<05:53, 1.25s/it] 6%|▌ | 18/300 [00:22<05:52, 1.25s/it] 6%|▋ | 19/300 [00:23<05:52, 1.25s/it] 7%|▋ | 20/300 [00:24<05:51, 1.25s/it] 7%|▋ | 21/300 [00:25<05:50, 1.25s/it] 7%|▋ | 22/300 [00:27<05:48, 1.25s/it] 8%|▊ | 23/300 [00:28<05:47, 1.25s/it] 8%|▊ | 24/300 [00:29<05:45, 1.25s/it] 8%|▊ | 25/300 [00:30<05:44, 1.25s/it] 9%|▊ | 26/300 [00:32<05:42, 1.25s/it] 9%|▉ | 27/300 [00:33<05:41, 1.25s/it] 9%|▉ | 28/300 [00:34<05:40, 1.25s/it] 10%|▉ | 29/300 [00:35<05:38, 1.25s/it] 10%|█ | 30/300 [00:37<05:38, 1.25s/it] 10%|█ | 31/300 [00:38<05:36, 1.25s/it] 11%|█ | 32/300 [00:39<05:34, 1.25s/it] 11%|█ | 33/300 [00:40<05:32, 1.24s/it] 11%|█▏ | 34/300 [00:42<05:31, 1.24s/it] 12%|█▏ | 35/300 [00:43<05:29, 1.24s/it] 12%|█▏ | 36/300 [00:44<05:28, 1.24s/it] 12%|█▏ | 37/300 [00:45<05:26, 1.24s/it] 13%|█▎ | 38/300 [00:47<05:29, 1.26s/it] 13%|█▎ | 39/300 [00:48<05:27, 1.25s/it] 13%|█▎ | 40/300 [00:49<05:25, 1.25s/it] 14%|█▎ | 41/300 [00:50<05:23, 1.25s/it] 14%|█▍ | 42/300 [00:52<05:21, 1.25s/it] 14%|█▍ | 43/300 [00:53<05:20, 1.25s/it] 15%|█▍ | 44/300 [00:54<05:18, 1.25s/it] 15%|█▌ | 45/300 [00:55<05:17, 1.24s/it] 15%|█▌ | 46/300 [00:57<05:15, 1.24s/it] 16%|█▌ | 47/300 [00:58<05:14, 1.24s/it] 16%|█▌ | 48/300 [00:59<05:13, 1.24s/it] 16%|█▋ | 49/300 [01:00<05:12, 1.24s/it] 17%|█▋ | 50/300 [01:02<05:10, 1.24s/it] 17%|█▋ | 51/300 [01:03<05:10, 1.25s/it] 17%|█▋ | 52/300 [01:04<05:09, 1.25s/it] 18%|█▊ | 53/300 [01:05<05:07, 1.25s/it] 18%|█▊ | 54/300 [01:07<05:06, 1.25s/it] 18%|█▊ | 55/300 [01:08<05:05, 1.25s/it] 19%|█▊ | 56/300 [01:09<05:04, 1.25s/it] 19%|█▉ | 57/300 [01:10<05:03, 1.25s/it] 19%|█▉ | 58/300 [01:12<05:01, 1.25s/it] 20%|█▉ | 59/300 [01:13<05:01, 1.25s/it] 20%|██ | 60/300 [01:14<04:59, 1.25s/it] 20%|██ | 61/300 [01:15<04:57, 1.25s/it] 21%|██ | 62/300 [01:17<04:56, 1.25s/it] 21%|██ | 63/300 [01:18<04:54, 1.24s/it] 21%|██▏ | 64/300 [01:19<04:58, 1.27s/it] 22%|██▏ | 65/300 [01:20<04:56, 1.26s/it] 22%|██▏ | 66/300 [01:22<04:53, 1.26s/it] 22%|██▏ | 67/300 [01:23<04:52, 1.25s/it] 23%|██▎ | 68/300 [01:24<04:49, 1.25s/it] 23%|██▎ | 69/300 [01:25<04:47, 1.25s/it] 23%|██▎ | 70/300 [01:27<04:46, 1.24s/it] 24%|██▎ | 71/300 [01:28<04:44, 1.24s/it] 24%|██▍ | 72/300 [01:29<04:43, 1.24s/it] 24%|██▍ | 73/300 [01:30<04:42, 1.24s/it] 25%|██▍ | 74/300 [01:32<04:41, 1.24s/it] 25%|██▌ | 75/300 [01:33<04:40, 1.25s/it] 25%|██▌ | 76/300 [01:34<04:39, 1.25s/it] 26%|██▌ | 77/300 [01:35<04:38, 1.25s/it] 26%|██▌ | 78/300 [01:37<04:37, 1.25s/it] 26%|██▋ | 79/300 [01:38<04:36, 1.25s/it] 27%|██▋ | 80/300 [01:39<04:35, 1.25s/it] 27%|██▋ | 81/300 [01:40<04:33, 1.25s/it] 27%|██▋ | 82/300 [01:42<04:31, 1.25s/it] 28%|██▊ | 83/300 [01:43<04:30, 1.25s/it] 28%|██▊ | 84/300 [01:44<04:28, 1.24s/it] 28%|██▊ | 85/300 [01:45<04:27, 1.24s/it] 29%|██▊ | 86/300 [01:47<04:26, 1.24s/it] 29%|██▉ | 87/300 [01:48<04:24, 1.24s/it] 29%|██▉ | 88/300 [01:49<04:23, 1.24s/it] 30%|██▉ | 89/300 [01:50<04:22, 1.24s/it] 30%|███ | 90/300 [01:52<04:25, 1.26s/it] 30%|███ | 91/300 [01:53<04:22, 1.26s/it] 31%|███ | 92/300 [01:54<04:20, 1.25s/it] 31%|███ | 93/300 [01:55<04:18, 1.25s/it] 31%|███▏ | 94/300 [01:57<04:16, 1.25s/it] 32%|███▏ | 95/300 [01:58<04:15, 1.24s/it] 32%|███▏ | 96/300 [01:59<04:13, 1.24s/it] 32%|███▏ | 97/300 [02:00<04:12, 1.24s/it] 33%|███▎ | 98/300 [02:01<04:11, 1.24s/it] 33%|███▎ | 99/300 [02:03<04:09, 1.24s/it] 33%|███▎ | 100/300 [02:04<04:08, 1.24s/it] 34%|███▎ | 101/300 [02:05<04:07, 1.24s/it] 34%|███▍ | 102/300 [02:06<04:06, 1.24s/it] 34%|███▍ | 103/300 [02:08<04:05, 1.24s/it] 35%|███▍ | 104/300 [02:09<04:04, 1.25s/it] 35%|███▌ | 105/300 [02:10<04:02, 1.25s/it] 35%|███▌ | 106/300 [02:11<04:01, 1.24s/it] 36%|███▌ | 107/300 [02:13<03:59, 1.24s/it] 36%|███▌ | 108/300 [02:14<03:58, 1.24s/it] 36%|███▋ | 109/300 [02:15<03:57, 1.24s/it] 37%|███▋ | 110/300 [02:16<03:55, 1.24s/it] 37%|███▋ | 111/300 [02:18<03:54, 1.24s/it] 37%|███▋ | 112/300 [02:19<03:53, 1.24s/it] 38%|███▊ | 113/300 [02:20<03:52, 1.24s/it] 38%|███▊ | 114/300 [02:21<03:51, 1.24s/it] 38%|███▊ | 115/300 [02:23<03:49, 1.24s/it] 39%|███▊ | 116/300 [02:24<03:48, 1.24s/it] 39%|███▉ | 117/300 [02:25<03:50, 1.26s/it] 39%|███▉ | 118/300 [02:26<03:48, 1.26s/it] 40%|███▉ | 119/300 [02:28<03:46, 1.25s/it] 40%|████ | 120/300 [02:29<03:44, 1.25s/it] 40%|████ | 121/300 [02:30<03:43, 1.25s/it] 41%|████ | 122/300 [02:31<03:41, 1.25s/it] 41%|████ | 123/300 [02:33<03:40, 1.24s/it] 41%|████▏ | 124/300 [02:34<03:38, 1.24s/it] 42%|████▏ | 125/300 [02:35<03:37, 1.24s/it] 42%|████▏ | 126/300 [02:36<03:36, 1.24s/it] 42%|████▏ | 127/300 [02:38<03:35, 1.24s/it] 43%|████▎ | 128/300 [02:39<03:34, 1.24s/it] 43%|████▎ | 129/300 [02:40<03:32, 1.24s/it] 43%|████▎ | 130/300 [02:41<03:31, 1.24s/it] 44%|████▎ | 131/300 [02:43<03:30, 1.24s/it] 44%|████▍ | 132/300 [02:44<03:28, 1.24s/it] 44%|████▍ | 133/300 [02:45<03:27, 1.24s/it] 45%|████▍ | 134/300 [02:46<03:26, 1.24s/it] 45%|████▌ | 135/300 [02:48<03:24, 1.24s/it] 45%|████▌ | 136/300 [02:49<03:23, 1.24s/it] 46%|████▌ | 137/300 [02:50<03:22, 1.24s/it] 46%|████▌ | 138/300 [02:51<03:21, 1.24s/it] 46%|████▋ | 139/300 [02:52<03:19, 1.24s/it] 47%|████▋ | 140/300 [02:54<03:19, 1.25s/it] 47%|████▋ | 141/300 [02:55<03:17, 1.24s/it] 47%|████▋ | 142/300 [02:56<03:16, 1.24s/it] 48%|████▊ | 143/300 [02:58<03:18, 1.26s/it] 48%|████▊ | 144/300 [02:59<03:16, 1.26s/it] 48%|████▊ | 145/300 [03:00<03:14, 1.25s/it] 49%|████▊ | 146/300 [03:01<03:12, 1.25s/it] 49%|████▉ | 147/300 [03:03<03:11, 1.25s/it] 49%|████▉ | 148/300 [03:04<03:09, 1.25s/it] 50%|████▉ | 149/300 [03:05<03:08, 1.25s/it] 50%|█████ | 150/300 [03:06<03:06, 1.24s/it] 50%|█████ | 151/300 [03:07<03:05, 1.24s/it] 51%|█████ | 152/300 [03:09<03:04, 1.24s/it] 51%|█████ | 153/300 [03:10<03:02, 1.24s/it] 51%|█████▏ | 154/300 [03:11<03:01, 1.24s/it] 52%|█████▏ | 155/300 [03:12<03:00, 1.24s/it] 52%|█████▏ | 156/300 [03:14<02:58, 1.24s/it] 52%|█████▏ | 157/300 [03:15<02:57, 1.24s/it] 53%|█████▎ | 158/300 [03:16<02:56, 1.24s/it] 53%|█████▎ | 159/300 [03:17<02:55, 1.24s/it] 53%|█████▎ | 160/300 [03:19<02:53, 1.24s/it] 54%|█████▎ | 161/300 [03:20<02:52, 1.24s/it] 54%|█████▍ | 162/300 [03:21<02:51, 1.24s/it] 54%|█████▍ | 163/300 [03:22<02:50, 1.24s/it] 55%|█████▍ | 164/300 [03:24<02:48, 1.24s/it] 55%|█████▌ | 165/300 [03:25<02:47, 1.24s/it] 55%|█████▌ | 166/300 [03:26<02:46, 1.24s/it] 56%|█████▌ | 167/300 [03:27<02:45, 1.24s/it] 56%|█████▌ | 168/300 [03:29<02:43, 1.24s/it] 56%|█████▋ | 169/300 [03:30<02:45, 1.26s/it] 57%|█████▋ | 170/300 [03:31<02:43, 1.26s/it] 57%|█████▋ | 171/300 [03:32<02:41, 1.25s/it] 57%|█████▋ | 172/300 [03:34<02:39, 1.25s/it] 58%|█████▊ | 173/300 [03:35<02:38, 1.25s/it] 58%|█████▊ | 174/300 [03:36<02:36, 1.24s/it] 58%|█████▊ | 175/300 [03:37<02:35, 1.24s/it] 59%|█████▊ | 176/300 [03:39<02:34, 1.24s/it] 59%|█████▉ | 177/300 [03:40<02:32, 1.24s/it] 59%|█████▉ | 178/300 [03:41<02:31, 1.24s/it] 60%|█████▉ | 179/300 [03:42<02:30, 1.24s/it] 60%|██████ | 180/300 [03:44<02:29, 1.24s/it] 60%|██████ | 181/300 [03:45<02:27, 1.24s/it] 61%|██████ | 182/300 [03:46<02:26, 1.24s/it] 61%|██████ | 183/300 [03:47<02:25, 1.24s/it] 61%|██████▏ | 184/300 [03:49<02:24, 1.24s/it] 62%|██████▏ | 185/300 [03:50<02:22, 1.24s/it] 62%|██████▏ | 186/300 [03:51<02:21, 1.24s/it] 62%|██████▏ | 187/300 [03:52<02:20, 1.24s/it] 63%|██████▎ | 188/300 [03:54<02:19, 1.24s/it] 63%|██████▎ | 189/300 [03:55<02:18, 1.24s/it] 63%|██████▎ | 190/300 [03:56<02:16, 1.24s/it] 64%|██████▎ | 191/300 [03:57<02:15, 1.24s/it] 64%|██████▍ | 192/300 [03:58<02:14, 1.24s/it] 64%|██████▍ | 193/300 [04:00<02:13, 1.24s/it] 65%|██████▍ | 194/300 [04:01<02:11, 1.24s/it] 65%|██████▌ | 195/300 [04:02<02:10, 1.24s/it] 65%|██████▌ | 196/300 [04:04<02:11, 1.26s/it] 66%|██████▌ | 197/300 [04:05<02:09, 1.26s/it] 66%|██████▌ | 198/300 [04:06<02:07, 1.25s/it] 66%|██████▋ | 199/300 [04:07<02:06, 1.25s/it] 67%|██████▋ | 200/300 [04:09<02:04, 1.25s/it] 67%|██████▋ | 201/300 [04:10<02:03, 1.25s/it] 67%|██████▋ | 202/300 [04:11<02:02, 1.25s/it] 68%|██████▊ | 203/300 [04:12<02:00, 1.24s/it] 68%|██████▊ | 204/300 [04:13<01:59, 1.24s/it] 68%|██████▊ | 205/300 [04:15<01:58, 1.24s/it] 69%|██████▊ | 206/300 [04:16<01:56, 1.24s/it] 69%|██████▉ | 207/300 [04:17<01:55, 1.24s/it] 69%|██████▉ | 208/300 [04:18<01:54, 1.24s/it] 70%|██████▉ | 209/300 [04:20<01:52, 1.24s/it] 70%|███████ | 210/300 [04:21<01:51, 1.24s/it] 70%|███████ | 211/300 [04:22<01:50, 1.24s/it] 71%|███████ | 212/300 [04:23<01:49, 1.24s/it] 71%|███████ | 213/300 [04:25<01:48, 1.24s/it] 71%|███████▏ | 214/300 [04:26<01:46, 1.24s/it] 72%|███████▏ | 215/300 [04:27<01:45, 1.24s/it] 72%|███████▏ | 216/300 [04:28<01:44, 1.24s/it] 72%|███████▏ | 217/300 [04:30<01:43, 1.24s/it] 73%|███████▎ | 218/300 [04:31<01:41, 1.24s/it] 73%|███████▎ | 219/300 [04:32<01:40, 1.24s/it] 73%|███████▎ | 220/300 [04:33<01:39, 1.24s/it] 74%|███████▎ | 221/300 [04:35<01:38, 1.24s/it] 74%|███████▍ | 222/300 [04:36<01:38, 1.26s/it] 74%|███████▍ | 223/300 [04:37<01:36, 1.25s/it] 75%|███████▍ | 224/300 [04:38<01:35, 1.25s/it] 75%|███████▌ | 225/300 [04:40<01:33, 1.25s/it] 75%|███████▌ | 226/300 [04:41<01:32, 1.25s/it] 76%|███████▌ | 227/300 [04:42<01:30, 1.25s/it] 76%|███████▌ | 228/300 [04:43<01:29, 1.24s/it] 76%|███████▋ | 229/300 [04:45<01:28, 1.24s/it] 77%|███████▋ | 230/300 [04:46<01:27, 1.24s/it] 77%|███████▋ | 231/300 [04:47<01:25, 1.24s/it] 77%|███████▋ | 232/300 [04:48<01:24, 1.24s/it] 78%|███████▊ | 233/300 [04:50<01:23, 1.24s/it] 78%|███████▊ | 234/300 [04:51<01:22, 1.25s/it] 78%|███████▊ | 235/300 [04:52<01:20, 1.24s/it] 79%|███████▊ | 236/300 [04:53<01:19, 1.25s/it] 79%|███████▉ | 237/300 [04:55<01:18, 1.24s/it] 79%|███████▉ | 238/300 [04:56<01:17, 1.24s/it] 80%|███████▉ | 239/300 [04:57<01:15, 1.24s/it] 80%|████████ | 240/300 [04:58<01:14, 1.25s/it] 80%|████████ | 241/300 [05:00<01:13, 1.25s/it] 81%|████████ | 242/300 [05:01<01:12, 1.24s/it] 81%|████████ | 243/300 [05:02<01:10, 1.24s/it] 81%|████████▏ | 244/300 [05:03<01:09, 1.24s/it] 82%|████████▏ | 245/300 [05:05<01:08, 1.24s/it] 82%|████████▏ | 246/300 [05:06<01:07, 1.24s/it] 82%|████████▏ | 247/300 [05:07<01:05, 1.25s/it] 83%|████████▎ | 248/300 [05:08<01:05, 1.26s/it] 83%|████████▎ | 249/300 [05:10<01:04, 1.26s/it] 83%|████████▎ | 250/300 [05:11<01:02, 1.25s/it] 84%|████████▎ | 251/300 [05:12<01:01, 1.25s/it] 84%|████████▍ | 252/300 [05:13<01:00, 1.25s/it] 84%|████████▍ | 253/300 [05:15<00:58, 1.25s/it] 85%|████████▍ | 254/300 [05:16<00:57, 1.25s/it] 85%|████████▌ | 255/300 [05:17<00:56, 1.25s/it] 85%|████████▌ | 256/300 [05:18<00:54, 1.25s/it] 86%|████████▌ | 257/300 [05:20<00:53, 1.25s/it] 86%|████████▌ | 258/300 [05:21<00:52, 1.25s/it] 86%|████████▋ | 259/300 [05:22<00:51, 1.25s/it] 87%|████████▋ | 260/300 [05:23<00:49, 1.25s/it] 87%|████████▋ | 261/300 [05:24<00:48, 1.24s/it] 87%|████████▋ | 262/300 [05:26<00:47, 1.24s/it] 88%|████████▊ | 263/300 [05:27<00:45, 1.24s/it] 88%|████████▊ | 264/300 [05:28<00:44, 1.24s/it] 88%|████████▊ | 265/300 [05:29<00:43, 1.24s/it] 89%|████████▊ | 266/300 [05:31<00:42, 1.24s/it] 89%|████████▉ | 267/300 [05:32<00:40, 1.24s/it] 89%|████████▉ | 268/300 [05:33<00:39, 1.24s/it] 90%|████████▉ | 269/300 [05:34<00:38, 1.24s/it] 90%|█████████ | 270/300 [05:36<00:37, 1.24s/it] 90%|█████████ | 271/300 [05:37<00:36, 1.24s/it] 91%|█████████ | 272/300 [05:38<00:34, 1.24s/it] 91%|█████████ | 273/300 [05:39<00:33, 1.24s/it] 91%|█████████▏| 274/300 [05:41<00:32, 1.26s/it] 92%|█████████▏| 275/300 [05:42<00:31, 1.26s/it] 92%|█████████▏| 276/300 [05:43<00:30, 1.25s/it] 92%|█████████▏| 277/300 [05:44<00:28, 1.25s/it] 93%|█████████▎| 278/300 [05:46<00:27, 1.25s/it] 93%|█████████▎| 279/300 [05:47<00:26, 1.24s/it] 93%|█████████▎| 280/300 [05:48<00:24, 1.24s/it] 94%|█████████▎| 281/300 [05:49<00:23, 1.24s/it] 94%|█████████▍| 282/300 [05:51<00:22, 1.24s/it] 94%|█████████▍| 283/300 [05:52<00:21, 1.24s/it] 95%|█████████▍| 284/300 [05:53<00:19, 1.24s/it] 95%|█████████▌| 285/300 [05:54<00:18, 1.24s/it] 95%|█████████▌| 286/300 [05:56<00:17, 1.24s/it] 96%|█████████▌| 287/300 [05:57<00:16, 1.24s/it] 96%|█████████▌| 288/300 [05:58<00:14, 1.24s/it] 96%|█████████▋| 289/300 [05:59<00:13, 1.25s/it] 97%|█████████▋| 290/300 [06:01<00:12, 1.25s/it] 97%|█████████▋| 291/300 [06:02<00:11, 1.25s/it] 97%|█████████▋| 292/300 [06:03<00:09, 1.25s/it] 98%|█████████▊| 293/300 [06:04<00:08, 1.25s/it] 98%|█████████▊| 294/300 [06:06<00:07, 1.25s/it] 98%|█████████▊| 295/300 [06:07<00:06, 1.25s/it] 99%|█████████▊| 296/300 [06:08<00:05, 1.25s/it] 99%|█████████▉| 297/300 [06:09<00:03, 1.25s/it] 99%|█████████▉| 298/300 [06:11<00:02, 1.25s/it] 100%|█████████▉| 299/300 [06:12<00:01, 1.25s/it] 100%|██████████| 300/300 [06:13<00:00, 1.25s/it] 2it [12:27, 373.85s/it] 0%| | 0/300 [00:00<?, ?it/s] 0%| | 1/300 [00:00<04:32, 1.10it/s] 1%| | 2/300 [00:02<05:31, 1.11s/it] 1%| | 3/300 [00:03<05:50, 1.18s/it] 1%|▏ | 4/300 [00:04<05:57, 1.21s/it] 2%|▏ | 5/300 [00:05<06:00, 1.22s/it] 2%|▏ | 6/300 [00:07<06:02, 1.23s/it] 2%|▏ | 7/300 [00:08<06:02, 1.24s/it] 3%|▎ | 8/300 [00:09<06:02, 1.24s/it] 3%|▎ | 9/300 [00:10<06:02, 1.24s/it] 3%|▎ | 10/300 [00:12<06:02, 1.25s/it] 4%|▎ | 11/300 [00:13<06:01, 1.25s/it] 4%|▍ | 12/300 [00:14<06:00, 1.25s/it] 4%|▍ | 13/300 [00:15<05:59, 1.25s/it] 5%|▍ | 14/300 [00:17<05:58, 1.25s/it] 5%|▌ | 15/300 [00:18<05:56, 1.25s/it] 5%|▌ | 16/300 [00:19<05:55, 1.25s/it] 6%|▌ | 17/300 [00:20<05:54, 1.25s/it] 6%|▌ | 18/300 [00:22<05:53, 1.25s/it] 6%|▋ | 19/300 [00:23<05:51, 1.25s/it] 7%|▋ | 20/300 [00:24<05:49, 1.25s/it] 7%|▋ | 21/300 [00:25<05:48, 1.25s/it] 7%|▋ | 22/300 [00:27<05:47, 1.25s/it] 8%|▊ | 23/300 [00:28<05:46, 1.25s/it] 8%|▊ | 24/300 [00:29<05:45, 1.25s/it] 8%|▊ | 25/300 [00:30<05:44, 1.25s/it] 9%|▊ | 26/300 [00:32<05:43, 1.25s/it] 9%|▉ | 27/300 [00:33<05:47, 1.27s/it] 9%|▉ | 28/300 [00:34<05:44, 1.27s/it] 10%|▉ | 29/300 [00:36<05:41, 1.26s/it] 10%|█ | 30/300 [00:37<05:39, 1.26s/it] 10%|█ | 31/300 [00:38<05:37, 1.26s/it] 11%|█ | 32/300 [00:39<05:36, 1.25s/it] 11%|█ | 33/300 [00:41<05:34, 1.25s/it] 11%|█▏ | 34/300 [00:42<05:33, 1.25s/it] 12%|█▏ | 35/300 [00:43<05:32, 1.25s/it] 12%|█▏ | 36/300 [00:44<05:30, 1.25s/it] 12%|█▏ | 37/300 [00:46<05:30, 1.26s/it] 13%|█▎ | 38/300 [00:47<05:29, 1.26s/it] 13%|█▎ | 39/300 [00:48<05:27, 1.26s/it] 13%|█▎ | 40/300 [00:49<05:26, 1.26s/it] 14%|█▎ | 41/300 [00:51<05:24, 1.25s/it] 14%|█▍ | 42/300 [00:52<05:23, 1.25s/it] 14%|█▍ | 43/300 [00:53<05:22, 1.25s/it] 15%|█▍ | 44/300 [00:54<05:20, 1.25s/it] 15%|█▌ | 45/300 [00:56<05:19, 1.25s/it] 15%|█▌ | 46/300 [00:57<05:18, 1.25s/it] 16%|█▌ | 47/300 [00:58<05:17, 1.25s/it] 16%|█▌ | 48/300 [00:59<05:15, 1.25s/it] 16%|█▋ | 49/300 [01:01<05:14, 1.25s/it] 17%|█▋ | 50/300 [01:02<05:13, 1.25s/it] 17%|█▋ | 51/300 [01:03<05:12, 1.25s/it] 17%|█▋ | 52/300 [01:04<05:10, 1.25s/it] 18%|█▊ | 53/300 [01:06<05:14, 1.27s/it] 18%|█▊ | 54/300 [01:07<05:12, 1.27s/it] 18%|█▊ | 55/300 [01:08<05:09, 1.26s/it] 19%|█▊ | 56/300 [01:09<05:07, 1.26s/it] 19%|█▉ | 57/300 [01:11<05:06, 1.26s/it] 19%|█▉ | 58/300 [01:12<05:04, 1.26s/it] 20%|█▉ | 59/300 [01:13<05:02, 1.25s/it] 20%|██ | 60/300 [01:14<05:00, 1.25s/it] 20%|██ | 61/300 [01:16<04:59, 1.25s/it] 21%|██ | 62/300 [01:17<04:57, 1.25s/it] 21%|██ | 63/300 [01:18<04:56, 1.25s/it] 21%|██▏ | 64/300 [01:19<04:55, 1.25s/it] 22%|██▏ | 65/300 [01:21<04:54, 1.25s/it] 22%|██▏ | 66/300 [01:22<04:52, 1.25s/it] 22%|██▏ | 67/300 [01:23<04:51, 1.25s/it] 23%|██▎ | 68/300 [01:24<04:50, 1.25s/it] 23%|██▎ | 69/300 [01:26<04:49, 1.25s/it] 23%|██▎ | 70/300 [01:27<04:48, 1.25s/it] 24%|██▎ | 71/300 [01:28<04:46, 1.25s/it] 24%|██▍ | 72/300 [01:29<04:45, 1.25s/it] 24%|██▍ | 73/300 [01:31<04:44, 1.25s/it] 25%|██▍ | 74/300 [01:32<04:43, 1.25s/it] 25%|██▌ | 75/300 [01:33<04:41, 1.25s/it] 25%|██▌ | 76/300 [01:34<04:40, 1.25s/it] 26%|██▌ | 77/300 [01:36<04:39, 1.25s/it] 26%|██▌ | 78/300 [01:37<04:37, 1.25s/it] 26%|██▋ | 79/300 [01:38<04:40, 1.27s/it] 27%|██▋ | 80/300 [01:40<04:38, 1.26s/it] 27%|██▋ | 81/300 [01:41<04:36, 1.26s/it] 27%|██▋ | 82/300 [01:42<04:33, 1.26s/it] 28%|██▊ | 83/300 [01:43<04:32, 1.26s/it] 28%|██▊ | 84/300 [01:45<04:30, 1.25s/it] 28%|██▊ | 85/300 [01:46<04:29, 1.26s/it] 29%|██▊ | 86/300 [01:47<04:28, 1.25s/it] 29%|██▉ | 87/300 [01:48<04:27, 1.25s/it] 29%|██▉ | 88/300 [01:50<04:26, 1.26s/it] 30%|██▉ | 89/300 [01:51<04:24, 1.25s/it] 30%|███ | 90/300 [01:52<04:22, 1.25s/it] 30%|███ | 91/300 [01:53<04:21, 1.25s/it] 31%|███ | 92/300 [01:55<04:20, 1.25s/it] 31%|███ | 93/300 [01:56<04:18, 1.25s/it] 31%|███▏ | 94/300 [01:57<04:17, 1.25s/it] 32%|███▏ | 95/300 [01:58<04:16, 1.25s/it] 32%|███▏ | 96/300 [02:00<04:15, 1.25s/it] 32%|███▏ | 97/300 [02:01<04:14, 1.25s/it] 33%|███▎ | 98/300 [02:02<04:13, 1.25s/it] 33%|███▎ | 99/300 [02:03<04:11, 1.25s/it] 33%|███▎ | 100/300 [02:05<04:10, 1.25s/it] 34%|███▎ | 101/300 [02:06<04:08, 1.25s/it] 34%|███▍ | 102/300 [02:07<04:07, 1.25s/it] 34%|███▍ | 103/300 [02:08<04:06, 1.25s/it] 35%|███▍ | 104/300 [02:10<04:05, 1.25s/it] 35%|███▌ | 105/300 [02:11<04:04, 1.25s/it] 35%|███▌ | 106/300 [02:12<04:06, 1.27s/it] 36%|███▌ | 107/300 [02:13<04:04, 1.27s/it] 36%|███▌ | 108/300 [02:15<04:01, 1.26s/it] 36%|███▋ | 109/300 [02:16<03:59, 1.26s/it] 37%|███▋ | 110/300 [02:17<03:58, 1.26s/it] 37%|███▋ | 111/300 [02:18<03:57, 1.25s/it] 37%|███▋ | 112/300 [02:20<03:55, 1.25s/it] 38%|███▊ | 113/300 [02:21<03:53, 1.25s/it] 38%|███▊ | 114/300 [02:22<03:52, 1.25s/it] 38%|███▊ | 115/300 [02:23<03:51, 1.25s/it] 39%|███▊ | 116/300 [02:25<03:50, 1.25s/it] 39%|███▉ | 117/300 [02:26<03:48, 1.25s/it] 39%|███▉ | 118/300 [02:27<03:47, 1.25s/it] 40%|███▉ | 119/300 [02:28<03:46, 1.25s/it] 40%|████ | 120/300 [02:30<03:45, 1.25s/it] 40%|████ | 121/300 [02:31<03:43, 1.25s/it] 41%|████ | 122/300 [02:32<03:42, 1.25s/it] 41%|████ | 123/300 [02:33<03:41, 1.25s/it] 41%|████▏ | 124/300 [02:35<03:39, 1.25s/it] 42%|████▏ | 125/300 [02:36<03:38, 1.25s/it] 42%|████▏ | 126/300 [02:37<03:37, 1.25s/it] 42%|████▏ | 127/300 [02:38<03:36, 1.25s/it] 43%|████▎ | 128/300 [02:40<03:35, 1.25s/it] 43%|████▎ | 129/300 [02:41<03:34, 1.25s/it] 43%|████▎ | 130/300 [02:42<03:32, 1.25s/it] 44%|████▎ | 131/300 [02:43<03:31, 1.25s/it] 44%|████▍ | 132/300 [02:45<03:33, 1.27s/it] 44%|████▍ | 133/300 [02:46<03:31, 1.26s/it] 45%|████▍ | 134/300 [02:47<03:29, 1.26s/it] 45%|████▌ | 135/300 [02:49<03:27, 1.26s/it] 45%|████▌ | 136/300 [02:50<03:26, 1.26s/it] 46%|████▌ | 137/300 [02:51<03:24, 1.26s/it] 46%|████▌ | 138/300 [02:52<03:23, 1.25s/it] 46%|████▋ | 139/300 [02:54<03:21, 1.25s/it] 47%|████▋ | 140/300 [02:55<03:20, 1.25s/it] 47%|████▋ | 141/300 [02:56<03:19, 1.25s/it] 47%|████▋ | 142/300 [02:57<03:17, 1.25s/it] 48%|████▊ | 143/300 [02:59<03:16, 1.25s/it] 48%|████▊ | 144/300 [03:00<03:15, 1.25s/it] 48%|████▊ | 145/300 [03:01<03:13, 1.25s/it] 49%|████▊ | 146/300 [03:02<03:12, 1.25s/it] 49%|████▉ | 147/300 [03:04<03:11, 1.25s/it] 49%|████▉ | 148/300 [03:05<03:09, 1.25s/it] 50%|████▉ | 149/300 [03:06<03:08, 1.25s/it] 50%|█████ | 150/300 [03:07<03:07, 1.25s/it] 50%|█████ | 151/300 [03:09<03:06, 1.25s/it] 51%|█████ | 152/300 [03:10<03:05, 1.25s/it] 51%|█████ | 153/300 [03:11<03:03, 1.25s/it] 51%|█████▏ | 154/300 [03:12<03:02, 1.25s/it] 52%|█████▏ | 155/300 [03:14<03:01, 1.25s/it] 52%|█████▏ | 156/300 [03:15<03:00, 1.25s/it] 52%|█████▏ | 157/300 [03:16<02:59, 1.25s/it] 53%|█████▎ | 158/300 [03:17<03:00, 1.27s/it] 53%|█████▎ | 159/300 [03:19<02:58, 1.27s/it] 53%|█████▎ | 160/300 [03:20<02:56, 1.26s/it] 54%|█████▎ | 161/300 [03:21<02:54, 1.26s/it] 54%|█████▍ | 162/300 [03:22<02:53, 1.26s/it] 54%|█████▍ | 163/300 [03:24<02:51, 1.25s/it] 55%|█████▍ | 164/300 [03:25<02:50, 1.25s/it] 55%|█████▌ | 165/300 [03:26<02:49, 1.25s/it] 55%|█████▌ | 166/300 [03:27<02:47, 1.25s/it] 56%|█████▌ | 167/300 [03:29<02:46, 1.25s/it] 56%|█████▌ | 168/300 [03:30<02:45, 1.25s/it] 56%|█████▋ | 169/300 [03:31<02:43, 1.25s/it] 57%|█████▋ | 170/300 [03:32<02:42, 1.25s/it] 57%|█████▋ | 171/300 [03:34<02:41, 1.25s/it] 57%|█████▋ | 172/300 [03:35<02:40, 1.25s/it] 58%|█████▊ | 173/300 [03:36<02:38, 1.25s/it] 58%|█████▊ | 174/300 [03:37<02:37, 1.25s/it] 58%|█████▊ | 175/300 [03:39<02:36, 1.25s/it] 59%|█████▊ | 176/300 [03:40<02:35, 1.25s/it] 59%|█████▉ | 177/300 [03:41<02:33, 1.25s/it] 59%|█████▉ | 178/300 [03:42<02:32, 1.25s/it] 60%|█████▉ | 179/300 [03:44<02:31, 1.25s/it] 60%|██████ | 180/300 [03:45<02:30, 1.25s/it] 60%|██████ | 181/300 [03:46<02:29, 1.25s/it] 61%|██████ | 182/300 [03:47<02:27, 1.25s/it] 61%|██████ | 183/300 [03:49<02:26, 1.26s/it] 61%|██████▏ | 184/300 [03:50<02:25, 1.25s/it] 62%|██████▏ | 185/300 [03:51<02:26, 1.27s/it] 62%|██████▏ | 186/300 [03:52<02:24, 1.27s/it] 62%|██████▏ | 187/300 [03:54<02:22, 1.26s/it] 63%|██████▎ | 188/300 [03:55<02:20, 1.26s/it] 63%|██████▎ | 189/300 [03:56<02:19, 1.26s/it] 63%|██████▎ | 190/300 [03:57<02:17, 1.25s/it] 64%|██████▎ | 191/300 [03:59<02:16, 1.25s/it] 64%|██████▍ | 192/300 [04:00<02:15, 1.25s/it] 64%|██████▍ | 193/300 [04:01<02:13, 1.25s/it] 65%|██████▍ | 194/300 [04:02<02:12, 1.25s/it] 65%|██████▌ | 195/300 [04:04<02:11, 1.25s/it] 65%|██████▌ | 196/300 [04:05<02:10, 1.25s/it] 66%|██████▌ | 197/300 [04:06<02:08, 1.25s/it] 66%|██████▌ | 198/300 [04:07<02:07, 1.25s/it] 66%|██████▋ | 199/300 [04:09<02:06, 1.25s/it] 67%|██████▋ | 200/300 [04:10<02:05, 1.25s/it] 67%|██████▋ | 201/300 [04:11<02:03, 1.25s/it] 67%|██████▋ | 202/300 [04:12<02:02, 1.25s/it] 68%|██████▊ | 203/300 [04:14<02:01, 1.25s/it] 68%|██████▊ | 204/300 [04:15<01:59, 1.25s/it] 68%|██████▊ | 205/300 [04:16<01:58, 1.25s/it] 69%|██████▊ | 206/300 [04:17<01:57, 1.25s/it] 69%|██████▉ | 207/300 [04:19<01:56, 1.25s/it] 69%|██████▉ | 208/300 [04:20<01:54, 1.25s/it] 70%|██████▉ | 209/300 [04:21<01:53, 1.25s/it] 70%|███████ | 210/300 [04:22<01:52, 1.25s/it] 70%|███████ | 211/300 [04:24<01:53, 1.27s/it] 71%|███████ | 212/300 [04:25<01:51, 1.26s/it] 71%|███████ | 213/300 [04:26<01:49, 1.26s/it] 71%|███████▏ | 214/300 [04:28<01:47, 1.26s/it] 72%|███████▏ | 215/300 [04:29<01:46, 1.26s/it] 72%|███████▏ | 216/300 [04:30<01:45, 1.25s/it] 72%|███████▏ | 217/300 [04:31<01:43, 1.25s/it] 73%|███████▎ | 218/300 [04:33<01:42, 1.25s/it] 73%|███████▎ | 219/300 [04:34<01:41, 1.25s/it] 73%|███████▎ | 220/300 [04:35<01:39, 1.25s/it] 74%|███████▎ | 221/300 [04:36<01:38, 1.25s/it] 74%|███████▍ | 222/300 [04:38<01:37, 1.25s/it] 74%|███████▍ | 223/300 [04:39<01:36, 1.25s/it] 75%|███████▍ | 224/300 [04:40<01:34, 1.25s/it] 75%|███████▌ | 225/300 [04:41<01:33, 1.25s/it] 75%|███████▌ | 226/300 [04:43<01:32, 1.25s/it] 76%|███████▌ | 227/300 [04:44<01:31, 1.25s/it] 76%|███████▌ | 228/300 [04:45<01:30, 1.25s/it] 76%|███████▋ | 229/300 [04:46<01:28, 1.25s/it] 77%|███████▋ | 230/300 [04:48<01:27, 1.25s/it] 77%|███████▋ | 231/300 [04:49<01:26, 1.25s/it] 77%|███████▋ | 232/300 [04:50<01:25, 1.25s/it] 78%|███████▊ | 233/300 [04:51<01:23, 1.25s/it] 78%|███████▊ | 234/300 [04:53<01:22, 1.25s/it] 78%|███████▊ | 235/300 [04:54<01:21, 1.25s/it] 79%|███████▊ | 236/300 [04:55<01:20, 1.25s/it] 79%|███████▉ | 237/300 [04:56<01:20, 1.27s/it] 79%|███████▉ | 238/300 [04:58<01:18, 1.26s/it] 80%|███████▉ | 239/300 [04:59<01:16, 1.26s/it] 80%|████████ | 240/300 [05:00<01:15, 1.26s/it] 80%|████████ | 241/300 [05:01<01:13, 1.25s/it] 81%|████████ | 242/300 [05:03<01:12, 1.25s/it] 81%|████████ | 243/300 [05:04<01:11, 1.25s/it] 81%|████████▏ | 244/300 [05:05<01:10, 1.25s/it] 82%|████████▏ | 245/300 [05:06<01:08, 1.25s/it] 82%|████████▏ | 246/300 [05:08<01:07, 1.25s/it] 82%|████████▏ | 247/300 [05:09<01:06, 1.25s/it] 83%|████████▎ | 248/300 [05:10<01:05, 1.25s/it] 83%|████████▎ | 249/300 [05:11<01:03, 1.25s/it] 83%|████████▎ | 250/300 [05:13<01:02, 1.25s/it] 84%|████████▎ | 251/300 [05:14<01:01, 1.25s/it] 84%|████████▍ | 252/300 [05:15<00:59, 1.25s/it] 84%|████████▍ | 253/300 [05:16<00:58, 1.25s/it] 85%|████████▍ | 254/300 [05:18<00:57, 1.25s/it] 85%|████████▌ | 255/300 [05:19<00:56, 1.25s/it] 85%|████████▌ | 256/300 [05:20<00:54, 1.25s/it] 86%|████████▌ | 257/300 [05:21<00:53, 1.25s/it] 86%|████████▌ | 258/300 [05:23<00:52, 1.25s/it] 86%|████████▋ | 259/300 [05:24<00:51, 1.25s/it] 87%|████████▋ | 260/300 [05:25<00:49, 1.25s/it] 87%|████████▋ | 261/300 [05:26<00:48, 1.25s/it] 87%|████████▋ | 262/300 [05:28<00:47, 1.25s/it] 88%|████████▊ | 263/300 [05:29<00:46, 1.25s/it] 88%|████████▊ | 264/300 [05:30<00:45, 1.27s/it] 88%|████████▊ | 265/300 [05:31<00:44, 1.26s/it] 89%|████████▊ | 266/300 [05:33<00:42, 1.26s/it] 89%|████████▉ | 267/300 [05:34<00:41, 1.26s/it] 89%|████████▉ | 268/300 [05:35<00:40, 1.25s/it] 90%|████████▉ | 269/300 [05:36<00:38, 1.26s/it] 90%|█████████ | 270/300 [05:38<00:37, 1.25s/it] 90%|█████████ | 271/300 [05:39<00:36, 1.25s/it] 91%|█████████ | 272/300 [05:40<00:35, 1.25s/it] 91%|█████████ | 273/300 [05:41<00:33, 1.25s/it] 91%|█████████▏| 274/300 [05:43<00:32, 1.26s/it] 92%|█████████▏| 275/300 [05:44<00:31, 1.26s/it] 92%|█████████▏| 276/300 [05:45<00:30, 1.26s/it] 92%|█████████▏| 277/300 [05:46<00:29, 1.26s/it] 93%|█████████▎| 278/300 [05:48<00:27, 1.26s/it] 93%|█████████▎| 279/300 [05:49<00:26, 1.26s/it] 93%|█████████▎| 280/300 [05:50<00:25, 1.27s/it] 94%|█████████▎| 281/300 [05:52<00:24, 1.27s/it] 94%|█████████▍| 282/300 [05:53<00:22, 1.26s/it] 94%|█████████▍| 283/300 [05:54<00:21, 1.26s/it] 95%|█████████▍| 284/300 [05:55<00:20, 1.26s/it] 95%|█████████▌| 285/300 [05:57<00:18, 1.26s/it] 95%|█████████▌| 286/300 [05:58<00:17, 1.26s/it] 96%|█████████▌| 287/300 [05:59<00:16, 1.25s/it] 96%|█████████▌| 288/300 [06:00<00:15, 1.25s/it] 96%|█████████▋| 289/300 [06:02<00:13, 1.25s/it] 97%|█████████▋| 290/300 [06:03<00:12, 1.27s/it] 97%|█████████▋| 291/300 [06:04<00:11, 1.26s/it] 97%|█████████▋| 292/300 [06:05<00:10, 1.26s/it] 98%|█████████▊| 293/300 [06:07<00:08, 1.26s/it] 98%|█████████▊| 294/300 [06:08<00:07, 1.26s/it] 98%|█████████▊| 295/300 [06:09<00:06, 1.25s/it] 99%|█████████▊| 296/300 [06:10<00:05, 1.25s/it] 99%|█████████▉| 297/300 [06:12<00:03, 1.25s/it] 99%|█████████▉| 298/300 [06:13<00:02, 1.25s/it] 100%|█████████▉| 299/300 [06:14<00:01, 1.25s/it] 100%|██████████| 300/300 [06:15<00:00, 1.25s/it] 3it [18:44, 375.20s/it] 0%| | 0/300 [00:00<?, ?it/s] 0%| | 1/300 [00:00<04:12, 1.19it/s] 1%| | 2/300 [00:02<05:22, 1.08s/it] 1%| | 3/300 [00:03<05:44, 1.16s/it] 1%|▏ | 4/300 [00:04<05:53, 1.19s/it] 2%|▏ | 5/300 [00:05<05:57, 1.21s/it] 2%|▏ | 6/300 [00:07<05:59, 1.22s/it] 2%|▏ | 7/300 [00:08<06:00, 1.23s/it] 3%|▎ | 8/300 [00:09<06:01, 1.24s/it] 3%|▎ | 9/300 [00:10<06:01, 1.24s/it] 3%|▎ | 10/300 [00:12<06:00, 1.24s/it] 4%|▎ | 11/300 [00:13<05:59, 1.24s/it] 4%|▍ | 12/300 [00:14<05:58, 1.25s/it] 4%|▍ | 13/300 [00:15<05:58, 1.25s/it] 5%|▍ | 14/300 [00:17<05:56, 1.25s/it] 5%|▌ | 15/300 [00:18<05:55, 1.25s/it] 5%|▌ | 16/300 [00:19<06:00, 1.27s/it] 6%|▌ | 17/300 [00:20<05:58, 1.27s/it] 6%|▌ | 18/300 [00:22<05:56, 1.26s/it] 6%|▋ | 19/300 [00:23<05:55, 1.26s/it] 7%|▋ | 20/300 [00:24<05:54, 1.26s/it] 7%|▋ | 21/300 [00:25<05:52, 1.26s/it] 7%|▋ | 22/300 [00:27<05:49, 1.26s/it] 8%|▊ | 23/300 [00:28<05:47, 1.26s/it] 8%|▊ | 24/300 [00:29<05:45, 1.25s/it] 8%|▊ | 25/300 [00:30<05:44, 1.25s/it] 9%|▊ | 26/300 [00:32<05:43, 1.25s/it] 9%|▉ | 27/300 [00:33<05:41, 1.25s/it] 9%|▉ | 28/300 [00:34<05:40, 1.25s/it] 10%|▉ | 29/300 [00:35<05:39, 1.25s/it] 10%|█ | 30/300 [00:37<05:37, 1.25s/it] 10%|█ | 31/300 [00:38<05:36, 1.25s/it] 11%|█ | 32/300 [00:39<05:35, 1.25s/it] 11%|█ | 33/300 [00:40<05:33, 1.25s/it] 11%|█▏ | 34/300 [00:42<05:33, 1.25s/it] 12%|█▏ | 35/300 [00:43<05:32, 1.25s/it] 12%|█▏ | 36/300 [00:44<05:30, 1.25s/it] 12%|█▏ | 37/300 [00:45<05:29, 1.25s/it] 13%|█▎ | 38/300 [00:47<05:27, 1.25s/it] 13%|█▎ | 39/300 [00:48<05:26, 1.25s/it] 13%|█▎ | 40/300 [00:49<05:25, 1.25s/it] 14%|█▎ | 41/300 [00:50<05:25, 1.26s/it] 14%|█▍ | 42/300 [00:52<05:28, 1.27s/it] 14%|█▍ | 43/300 [00:53<05:24, 1.26s/it] 15%|█▍ | 44/300 [00:54<05:22, 1.26s/it] 15%|█▌ | 45/300 [00:56<05:20, 1.26s/it] 15%|█▌ | 46/300 [00:57<05:18, 1.25s/it] 16%|█▌ | 47/300 [00:58<05:16, 1.25s/it] 16%|█▌ | 48/300 [00:59<05:15, 1.25s/it] 16%|█▋ | 49/300 [01:01<05:13, 1.25s/it] 17%|█▋ | 50/300 [01:02<05:12, 1.25s/it] 17%|█▋ | 51/300 [01:03<05:11, 1.25s/it] 17%|█▋ | 52/300 [01:04<05:10, 1.25s/it] 18%|█▊ | 53/300 [01:06<05:08, 1.25s/it] 18%|█▊ | 54/300 [01:07<05:08, 1.25s/it] 18%|█▊ | 55/300 [01:08<05:06, 1.25s/it] 19%|█▊ | 56/300 [01:09<05:05, 1.25s/it] 19%|█▉ | 57/300 [01:11<05:04, 1.25s/it] 19%|█▉ | 58/300 [01:12<05:03, 1.26s/it] 20%|█▉ | 59/300 [01:13<05:02, 1.25s/it] 20%|██ | 60/300 [01:14<05:00, 1.25s/it] 20%|██ | 61/300 [01:16<04:59, 1.25s/it] 21%|██ | 62/300 [01:17<04:58, 1.25s/it] 21%|██ | 63/300 [01:18<04:57, 1.25s/it] 21%|██▏ | 64/300 [01:19<04:55, 1.25s/it] 22%|██▏ | 65/300 [01:21<04:53, 1.25s/it] 22%|██▏ | 66/300 [01:22<04:52, 1.25s/it] 22%|██▏ | 67/300 [01:23<04:51, 1.25s/it] 23%|██▎ | 68/300 [01:24<04:50, 1.25s/it] 23%|██▎ | 69/300 [01:26<04:53, 1.27s/it] 23%|██▎ | 70/300 [01:27<04:50, 1.26s/it] 24%|██▎ | 71/300 [01:28<04:48, 1.26s/it] 24%|██▍ | 72/300 [01:29<04:46, 1.26s/it] 24%|██▍ | 73/300 [01:31<04:44, 1.25s/it] 25%|██▍ | 74/300 [01:32<04:43, 1.25s/it] 25%|██▌ | 75/300 [01:33<04:41, 1.25s/it] 25%|██▌ | 76/300 [01:34<04:40, 1.25s/it] 26%|██▌ | 77/300 [01:36<04:39, 1.25s/it] 26%|██▌ | 78/300 [01:37<04:38, 1.25s/it] 26%|██▋ | 79/300 [01:38<04:36, 1.25s/it] 27%|██▋ | 80/300 [01:39<04:35, 1.25s/it] 27%|██▋ | 81/300 [01:41<04:33, 1.25s/it] 27%|██▋ | 82/300 [01:42<04:32, 1.25s/it] 28%|██▊ | 83/300 [01:43<04:31, 1.25s/it] 28%|██▊ | 84/300 [01:44<04:29, 1.25s/it] 28%|██▊ | 85/300 [01:46<04:28, 1.25s/it] 29%|██▊ | 86/300 [01:47<04:27, 1.25s/it] 29%|██▉ | 87/300 [01:48<04:26, 1.25s/it] 29%|██▉ | 88/300 [01:49<04:24, 1.25s/it] 30%|██▉ | 89/300 [01:51<04:23, 1.25s/it] 30%|███ | 90/300 [01:52<04:22, 1.25s/it] 30%|███ | 91/300 [01:53<04:21, 1.25s/it] 31%|███ | 92/300 [01:54<04:19, 1.25s/it] 31%|███ | 93/300 [01:56<04:18, 1.25s/it] 31%|███▏ | 94/300 [01:57<04:17, 1.25s/it] 32%|███▏ | 95/300 [01:58<04:19, 1.27s/it] 32%|███▏ | 96/300 [01:59<04:17, 1.26s/it] 32%|███▏ | 97/300 [02:01<04:15, 1.26s/it] 33%|███▎ | 98/300 [02:02<04:13, 1.26s/it] 33%|███▎ | 99/300 [02:03<04:12, 1.26s/it] 33%|███▎ | 100/300 [02:04<04:10, 1.25s/it] 34%|███▎ | 101/300 [02:06<04:09, 1.25s/it] 34%|███▍ | 102/300 [02:07<04:07, 1.25s/it] 34%|███▍ | 103/300 [02:08<04:06, 1.25s/it] 35%|███▍ | 104/300 [02:09<04:05, 1.25s/it] 35%|███▌ | 105/300 [02:11<04:03, 1.25s/it] 35%|███▌ | 106/300 [02:12<04:03, 1.25s/it] 36%|███▌ | 107/300 [02:13<04:01, 1.25s/it] 36%|███▌ | 108/300 [02:14<03:59, 1.25s/it] 36%|███▋ | 109/300 [02:16<03:59, 1.25s/it] 37%|███▋ | 110/300 [02:17<03:57, 1.25s/it] 37%|███▋ | 111/300 [02:18<03:56, 1.25s/it] 37%|███▋ | 112/300 [02:19<03:55, 1.25s/it] 38%|███▊ | 113/300 [02:21<03:54, 1.25s/it] 38%|███▊ | 114/300 [02:22<03:52, 1.25s/it] 38%|███▊ | 115/300 [02:23<03:51, 1.25s/it] 39%|███▊ | 116/300 [02:24<03:50, 1.25s/it] 39%|███▉ | 117/300 [02:26<03:49, 1.25s/it] 39%|███▉ | 118/300 [02:27<03:47, 1.25s/it] 40%|███▉ | 119/300 [02:28<03:46, 1.25s/it] 40%|████ | 120/300 [02:29<03:45, 1.25s/it] 40%|████ | 121/300 [02:31<03:47, 1.27s/it] 41%|████ | 122/300 [02:32<03:45, 1.27s/it] 41%|████ | 123/300 [02:33<03:43, 1.26s/it] 41%|████▏ | 124/300 [02:35<03:41, 1.26s/it] 42%|████▏ | 125/300 [02:36<03:40, 1.26s/it] 42%|████▏ | 126/300 [02:37<03:38, 1.26s/it] 42%|████▏ | 127/300 [02:38<03:37, 1.26s/it] 43%|████▎ | 128/300 [02:40<03:36, 1.26s/it] 43%|████▎ | 129/300 [02:41<03:34, 1.26s/it] 43%|████▎ | 130/300 [02:42<03:33, 1.26s/it] 44%|████▎ | 131/300 [02:43<03:32, 1.26s/it] 44%|████▍ | 132/300 [02:45<03:31, 1.26s/it] 44%|████▍ | 133/300 [02:46<03:30, 1.26s/it] 45%|████▍ | 134/300 [02:47<03:29, 1.26s/it] 45%|████▌ | 135/300 [02:48<03:28, 1.27s/it] 45%|████▌ | 136/300 [02:50<03:27, 1.26s/it] 46%|████▌ | 137/300 [02:51<03:25, 1.26s/it] 46%|████▌ | 138/300 [02:52<03:24, 1.26s/it] 46%|████▋ | 139/300 [02:53<03:23, 1.26s/it] 47%|████▋ | 140/300 [02:55<03:22, 1.27s/it] 47%|████▋ | 141/300 [02:56<03:21, 1.27s/it] 47%|████▋ | 142/300 [02:57<03:20, 1.27s/it] 48%|████▊ | 143/300 [02:59<03:18, 1.26s/it] 48%|████▊ | 144/300 [03:00<03:17, 1.26s/it] 48%|████▊ | 145/300 [03:01<03:16, 1.27s/it] 49%|████▊ | 146/300 [03:02<03:14, 1.26s/it] 49%|████▉ | 147/300 [03:04<03:13, 1.26s/it] 49%|████▉ | 148/300 [03:05<03:15, 1.28s/it] 50%|████▉ | 149/300 [03:06<03:12, 1.28s/it] 50%|█████ | 150/300 [03:07<03:10, 1.27s/it] 50%|█████ | 151/300 [03:09<03:09, 1.27s/it] 51%|█████ | 152/300 [03:10<03:07, 1.27s/it] 51%|█████ | 153/300 [03:11<03:06, 1.27s/it] 51%|█████▏ | 154/300 [03:13<03:05, 1.27s/it] 52%|█████▏ | 155/300 [03:14<03:03, 1.27s/it] 52%|█████▏ | 156/300 [03:15<03:01, 1.26s/it] 52%|█████▏ | 157/300 [03:16<03:00, 1.26s/it] 53%|█████▎ | 158/300 [03:18<02:59, 1.26s/it] 53%|█████▎ | 159/300 [03:19<02:58, 1.26s/it] 53%|█████▎ | 160/300 [03:20<02:56, 1.26s/it] 54%|█████▎ | 161/300 [03:21<02:55, 1.26s/it] 54%|█████▍ | 162/300 [03:23<02:54, 1.27s/it] 54%|█████▍ | 163/300 [03:24<02:53, 1.26s/it] 55%|█████▍ | 164/300 [03:25<02:51, 1.26s/it] 55%|█████▌ | 165/300 [03:26<02:50, 1.26s/it] 55%|█████▌ | 166/300 [03:28<02:49, 1.26s/it] 56%|█████▌ | 167/300 [03:29<02:48, 1.27s/it] 56%|█████▌ | 168/300 [03:30<02:46, 1.26s/it] 56%|█████▋ | 169/300 [03:31<02:44, 1.26s/it] 57%|█████▋ | 170/300 [03:33<02:43, 1.26s/it] 57%|█████▋ | 171/300 [03:34<02:42, 1.26s/it] 57%|█████▋ | 172/300 [03:35<02:41, 1.26s/it] 58%|█████▊ | 173/300 [03:37<02:40, 1.26s/it] 58%|█████▊ | 174/300 [03:38<02:41, 1.28s/it] 58%|█████▊ | 175/300 [03:39<02:39, 1.28s/it] 59%|█████▊ | 176/300 [03:40<02:37, 1.27s/it] 59%|█████▉ | 177/300 [03:42<02:36, 1.27s/it] 59%|█████▉ | 178/300 [03:43<02:34, 1.27s/it] 60%|█████▉ | 179/300 [03:44<02:33, 1.26s/it] 60%|██████ | 180/300 [03:45<02:31, 1.26s/it] 60%|██████ | 181/300 [03:47<02:30, 1.26s/it] 61%|██████ | 182/300 [03:48<02:29, 1.26s/it] 61%|██████ | 183/300 [03:49<02:27, 1.26s/it] 61%|██████▏ | 184/300 [03:50<02:26, 1.26s/it] 62%|██████▏ | 185/300 [03:52<02:25, 1.26s/it] 62%|██████▏ | 186/300 [03:53<02:24, 1.26s/it] 62%|██████▏ | 187/300 [03:54<02:22, 1.26s/it] 63%|██████▎ | 188/300 [03:56<02:21, 1.27s/it] 63%|██████▎ | 189/300 [03:57<02:20, 1.27s/it] 63%|██████▎ | 190/300 [03:58<02:19, 1.26s/it] 64%|██████▎ | 191/300 [03:59<02:18, 1.27s/it] 64%|██████▍ | 192/300 [04:01<02:16, 1.27s/it] 64%|██████▍ | 193/300 [04:02<02:15, 1.27s/it] 65%|██████▍ | 194/300 [04:03<02:14, 1.27s/it] 65%|██████▌ | 195/300 [04:04<02:13, 1.27s/it] 65%|██████▌ | 196/300 [04:06<02:11, 1.27s/it] 66%|██████▌ | 197/300 [04:07<02:10, 1.27s/it] 66%|██████▌ | 198/300 [04:08<02:09, 1.27s/it] 66%|██████▋ | 199/300 [04:09<02:07, 1.26s/it] 67%|██████▋ | 200/300 [04:11<02:08, 1.28s/it] 67%|██████▋ | 201/300 [04:12<02:06, 1.28s/it] 67%|██████▋ | 202/300 [04:13<02:05, 1.28s/it] 68%|██████▊ | 203/300 [04:15<02:03, 1.27s/it] 68%|██████▊ | 204/300 [04:16<02:01, 1.27s/it] 68%|██████▊ | 205/300 [04:17<02:00, 1.27s/it] 69%|██████▊ | 206/300 [04:18<01:59, 1.27s/it] 69%|██████▉ | 207/300 [04:20<01:57, 1.27s/it] 69%|██████▉ | 208/300 [04:21<01:56, 1.27s/it] 70%|██████▉ | 209/300 [04:22<01:55, 1.27s/it] 70%|███████ | 210/300 [04:23<01:54, 1.27s/it] 70%|███████ | 211/300 [04:25<01:52, 1.27s/it] 71%|███████ | 212/300 [04:26<01:51, 1.27s/it] 71%|███████ | 213/300 [04:27<01:50, 1.27s/it] 71%|███████▏ | 214/300 [04:29<01:48, 1.27s/it] 72%|███████▏ | 215/300 [04:30<01:47, 1.27s/it] 72%|███████▏ | 216/300 [04:31<01:46, 1.27s/it] 72%|███████▏ | 217/300 [04:32<01:45, 1.27s/it] 73%|███████▎ | 218/300 [04:34<01:43, 1.27s/it] 73%|███████▎ | 219/300 [04:35<01:42, 1.27s/it] 73%|███████▎ | 220/300 [04:36<01:41, 1.27s/it] 74%|███████▎ | 221/300 [04:37<01:40, 1.27s/it] 74%|███████▍ | 222/300 [04:39<01:38, 1.27s/it] 74%|███████▍ | 223/300 [04:40<01:37, 1.27s/it] 75%|███████▍ | 224/300 [04:41<01:36, 1.27s/it] 75%|███████▌ | 225/300 [04:42<01:34, 1.27s/it] 75%|███████▌ | 226/300 [04:44<01:33, 1.27s/it] 76%|███████▌ | 227/300 [04:45<01:33, 1.29s/it] 76%|███████▌ | 228/300 [04:46<01:32, 1.28s/it] 76%|███████▋ | 229/300 [04:48<01:30, 1.28s/it] 77%|███████▋ | 230/300 [04:49<01:29, 1.27s/it] 77%|███████▋ | 231/300 [04:50<01:27, 1.27s/it] 77%|███████▋ | 232/300 [04:51<01:26, 1.27s/it] 78%|███████▊ | 233/300 [04:53<01:24, 1.26s/it] 78%|███████▊ | 234/300 [04:54<01:23, 1.26s/it] 78%|███████▊ | 235/300 [04:55<01:21, 1.26s/it] 79%|███████▊ | 236/300 [04:56<01:20, 1.26s/it] 79%|███████▉ | 237/300 [04:58<01:19, 1.25s/it] 79%|███████▉ | 238/300 [04:59<01:17, 1.25s/it] 80%|███████▉ | 239/300 [05:00<01:16, 1.25s/it] 80%|████████ | 240/300 [05:01<01:15, 1.25s/it] 80%|████████ | 241/300 [05:03<01:13, 1.25s/it] 81%|████████ | 242/300 [05:04<01:12, 1.25s/it] 81%|████████ | 243/300 [05:05<01:11, 1.25s/it] 81%|████████▏ | 244/300 [05:06<01:10, 1.25s/it] 82%|████████▏ | 245/300 [05:08<01:08, 1.25s/it] 82%|████████▏ | 246/300 [05:09<01:07, 1.25s/it] 82%|████████▏ | 247/300 [05:10<01:06, 1.25s/it] 83%|████████▎ | 248/300 [05:11<01:05, 1.25s/it] 83%|████████▎ | 249/300 [05:13<01:03, 1.25s/it] 83%|████████▎ | 250/300 [05:14<01:02, 1.25s/it] 84%|████████▎ | 251/300 [05:15<01:01, 1.25s/it] 84%|████████▍ | 252/300 [05:16<01:00, 1.25s/it] 84%|████████▍ | 253/300 [05:18<00:59, 1.27s/it] 85%|████████▍ | 254/300 [05:19<00:58, 1.26s/it] 85%|████████▌ | 255/300 [05:20<00:56, 1.26s/it] 85%|████████▌ | 256/300 [05:21<00:55, 1.26s/it] 86%|████████▌ | 257/300 [05:23<00:54, 1.26s/it] 86%|████████▌ | 258/300 [05:24<00:52, 1.25s/it] 86%|████████▋ | 259/300 [05:25<00:51, 1.26s/it] 87%|████████▋ | 260/300 [05:26<00:50, 1.26s/it] 87%|████████▋ | 261/300 [05:28<00:49, 1.26s/it] 87%|████████▋ | 262/300 [05:29<00:47, 1.26s/it] 88%|████████▊ | 263/300 [05:30<00:46, 1.26s/it] 88%|████████▊ | 264/300 [05:32<00:45, 1.25s/it] 88%|████████▊ | 265/300 [05:33<00:43, 1.25s/it] 89%|████████▊ | 266/300 [05:34<00:42, 1.25s/it] 89%|████████▉ | 267/300 [05:35<00:41, 1.25s/it] 89%|████████▉ | 268/300 [05:37<00:40, 1.25s/it] 90%|████████▉ | 269/300 [05:38<00:38, 1.25s/it] 90%|█████████ | 270/300 [05:39<00:37, 1.25s/it] 90%|█████████ | 271/300 [05:40<00:36, 1.25s/it] 91%|█████████ | 272/300 [05:42<00:35, 1.25s/it] 91%|█████████ | 273/300 [05:43<00:33, 1.25s/it] 91%|█████████▏| 274/300 [05:44<00:32, 1.25s/it] 92%|█████████▏| 275/300 [05:45<00:31, 1.25s/it] 92%|█████████▏| 276/300 [05:47<00:30, 1.25s/it] 92%|█████████▏| 277/300 [05:48<00:28, 1.25s/it] 93%|█████████▎| 278/300 [05:49<00:27, 1.25s/it] 93%|█████████▎| 279/300 [05:50<00:26, 1.26s/it] 93%|█████████▎| 280/300 [05:52<00:25, 1.26s/it] 94%|█████████▎| 281/300 [05:53<00:23, 1.26s/it] 94%|█████████▍| 282/300 [05:54<00:22, 1.25s/it] 94%|█████████▍| 283/300 [05:55<00:21, 1.25s/it] 95%|█████████▍| 284/300 [05:57<00:20, 1.25s/it] 95%|█████████▌| 285/300 [05:58<00:18, 1.25s/it] 95%|█████████▌| 286/300 [05:59<00:17, 1.25s/it] 96%|█████████▌| 287/300 [06:00<00:16, 1.25s/it] 96%|█████████▌| 288/300 [06:02<00:15, 1.25s/it] 96%|█████████▋| 289/300 [06:03<00:13, 1.25s/it] 97%|█████████▋| 290/300 [06:04<00:12, 1.25s/it] 97%|█████████▋| 291/300 [06:05<00:11, 1.25s/it] 97%|█████████▋| 292/300 [06:07<00:10, 1.25s/it] 98%|█████████▊| 293/300 [06:08<00:08, 1.25s/it] 98%|█████████▊| 294/300 [06:09<00:07, 1.25s/it] 98%|█████████▊| 295/300 [06:10<00:06, 1.25s/it] 99%|█████████▊| 296/300 [06:12<00:05, 1.25s/it] 99%|█████████▉| 297/300 [06:13<00:03, 1.25s/it] 99%|█████████▉| 298/300 [06:14<00:02, 1.25s/it] 100%|█████████▉| 299/300 [06:15<00:01, 1.25s/it] 100%|██████████| 300/300 [06:17<00:00, 1.26s/it] 4it [25:02, 376.28s/it] 0%| | 0/300 [00:00<?, ?it/s] 0%| | 1/300 [00:00<04:12, 1.19it/s] 1%| | 2/300 [00:02<05:21, 1.08s/it] 1%| | 3/300 [00:03<05:44, 1.16s/it] 1%|▏ | 4/300 [00:04<05:53, 1.19s/it] 2%|▏ | 5/300 [00:05<06:04, 1.23s/it] 2%|▏ | 6/300 [00:07<06:04, 1.24s/it] 2%|▏ | 7/300 [00:08<06:04, 1.24s/it] 3%|▎ | 8/300 [00:09<06:03, 1.25s/it] 3%|▎ | 9/300 [00:10<06:02, 1.25s/it] 3%|▎ | 10/300 [00:12<06:01, 1.25s/it] 4%|▎ | 11/300 [00:13<06:00, 1.25s/it] 4%|▍ | 12/300 [00:14<06:00, 1.25s/it] 4%|▍ | 13/300 [00:15<05:58, 1.25s/it] 5%|▍ | 14/300 [00:17<05:57, 1.25s/it] 5%|▌ | 15/300 [00:18<05:56, 1.25s/it] 5%|▌ | 16/300 [00:19<05:55, 1.25s/it] 6%|▌ | 17/300 [00:20<05:54, 1.25s/it] 6%|▌ | 18/300 [00:22<05:52, 1.25s/it] 6%|▋ | 19/300 [00:23<05:51, 1.25s/it] 7%|▋ | 20/300 [00:24<05:50, 1.25s/it] 7%|▋ | 21/300 [00:25<05:49, 1.25s/it] 7%|▋ | 22/300 [00:27<05:47, 1.25s/it] 8%|▊ | 23/300 [00:28<05:46, 1.25s/it] 8%|▊ | 24/300 [00:29<05:45, 1.25s/it] 8%|▊ | 25/300 [00:30<05:44, 1.25s/it] 9%|▊ | 26/300 [00:32<05:43, 1.25s/it] 9%|▉ | 27/300 [00:33<05:42, 1.25s/it] 9%|▉ | 28/300 [00:34<05:40, 1.25s/it] 10%|▉ | 29/300 [00:35<05:39, 1.25s/it] 10%|█ | 30/300 [00:37<05:37, 1.25s/it] 10%|█ | 31/300 [00:38<05:41, 1.27s/it] 11%|█ | 32/300 [00:39<05:38, 1.26s/it] 11%|█ | 33/300 [00:40<05:35, 1.26s/it] 11%|█▏ | 34/300 [00:42<05:33, 1.26s/it] 12%|█▏ | 35/300 [00:43<05:32, 1.25s/it] 12%|█▏ | 36/300 [00:44<05:31, 1.25s/it] 12%|█▏ | 37/300 [00:45<05:29, 1.25s/it] 13%|█▎ | 38/300 [00:47<05:28, 1.25s/it] 13%|█▎ | 39/300 [00:48<05:27, 1.26s/it] 13%|█▎ | 40/300 [00:49<05:26, 1.26s/it] 14%|█▎ | 41/300 [00:51<05:24, 1.25s/it] 14%|█▍ | 42/300 [00:52<05:23, 1.25s/it] 14%|█▍ | 43/300 [00:53<05:21, 1.25s/it] 15%|█▍ | 44/300 [00:54<05:19, 1.25s/it] 15%|█▌ | 45/300 [00:56<05:18, 1.25s/it] 15%|█▌ | 46/300 [00:57<05:17, 1.25s/it] 16%|█▌ | 47/300 [00:58<05:16, 1.25s/it] 16%|█▌ | 48/300 [00:59<05:15, 1.25s/it] 16%|█▋ | 49/300 [01:01<05:13, 1.25s/it] 17%|█▋ | 50/300 [01:02<05:13, 1.25s/it] 17%|█▋ | 51/300 [01:03<05:12, 1.25s/it] 17%|█▋ | 52/300 [01:04<05:10, 1.25s/it] 18%|█▊ | 53/300 [01:06<05:09, 1.25s/it] 18%|█▊ | 54/300 [01:07<05:07, 1.25s/it] 18%|█▊ | 55/300 [01:08<05:06, 1.25s/it] 19%|█▊ | 56/300 [01:09<05:05, 1.25s/it] 19%|█▉ | 57/300 [01:11<05:04, 1.25s/it] 19%|█▉ | 58/300 [01:12<05:07, 1.27s/it] 20%|█▉ | 59/300 [01:13<05:04, 1.26s/it] 20%|██ | 60/300 [01:14<05:02, 1.26s/it] 20%|██ | 61/300 [01:16<05:00, 1.26s/it] 21%|██ | 62/300 [01:17<04:58, 1.25s/it] 21%|██ | 63/300 [01:18<04:57, 1.25s/it] 21%|██▏ | 64/300 [01:19<04:55, 1.25s/it] 22%|██▏ | 65/300 [01:21<04:54, 1.25s/it] 22%|██▏ | 66/300 [01:22<04:53, 1.25s/it] 22%|██▏ | 67/300 [01:23<04:52, 1.26s/it] 23%|██▎ | 68/300 [01:24<04:51, 1.25s/it] 23%|██▎ | 69/300 [01:26<04:49, 1.25s/it] 23%|██▎ | 70/300 [01:27<04:47, 1.25s/it] 24%|██▎ | 71/300 [01:28<04:46, 1.25s/it] 24%|██▍ | 72/300 [01:29<04:45, 1.25s/it] 24%|██▍ | 73/300 [01:31<04:44, 1.25s/it] 25%|██▍ | 74/300 [01:32<04:43, 1.25s/it] 25%|██▌ | 75/300 [01:33<04:41, 1.25s/it] 25%|██▌ | 76/300 [01:34<04:40, 1.25s/it] 26%|██▌ | 77/300 [01:36<04:40, 1.26s/it] 26%|██▌ | 78/300 [01:37<04:38, 1.25s/it] 26%|██▋ | 79/300 [01:38<04:36, 1.25s/it] 27%|██▋ | 80/300 [01:39<04:35, 1.25s/it] 27%|██▋ | 81/300 [01:41<04:34, 1.25s/it] 27%|██▋ | 82/300 [01:42<04:33, 1.25s/it] 28%|██▊ | 83/300 [01:43<04:31, 1.25s/it] 28%|██▊ | 84/300 [01:44<04:34, 1.27s/it] 28%|██▊ | 85/300 [01:46<04:32, 1.27s/it] 29%|██▊ | 86/300 [01:47<04:29, 1.26s/it] 29%|██▉ | 87/300 [01:48<04:28, 1.26s/it] 29%|██▉ | 88/300 [01:49<04:26, 1.26s/it] 30%|██▉ | 89/300 [01:51<04:24, 1.25s/it] 30%|███ | 90/300 [01:52<04:23, 1.25s/it] 30%|███ | 91/300 [01:53<04:21, 1.25s/it] 31%|███ | 92/300 [01:54<04:20, 1.25s/it] 31%|███ | 93/300 [01:56<04:19, 1.25s/it] 31%|███▏ | 94/300 [01:57<04:17, 1.25s/it] 32%|███▏ | 95/300 [01:58<04:16, 1.25s/it] 32%|███▏ | 96/300 [01:59<04:15, 1.25s/it] 32%|███▏ | 97/300 [02:01<04:14, 1.25s/it] 33%|███▎ | 98/300 [02:02<04:13, 1.25s/it] 33%|███▎ | 99/300 [02:03<04:11, 1.25s/it] 33%|███▎ | 100/300 [02:05<04:10, 1.25s/it] 34%|███▎ | 101/300 [02:06<04:09, 1.25s/it] 34%|███▍ | 102/300 [02:07<04:07, 1.25s/it] 34%|███▍ | 103/300 [02:08<04:06, 1.25s/it] 35%|███▍ | 104/300 [02:10<04:05, 1.25s/it] 35%|███▌ | 105/300 [02:11<04:04, 1.25s/it] 35%|███▌ | 106/300 [02:12<04:02, 1.25s/it] 36%|███▌ | 107/300 [02:13<04:01, 1.25s/it] 36%|███▌ | 108/300 [02:15<04:00, 1.25s/it] 36%|███▋ | 109/300 [02:16<03:59, 1.25s/it] 37%|███▋ | 110/300 [02:17<03:58, 1.25s/it] 37%|███▋ | 111/300 [02:18<04:00, 1.27s/it] 37%|███▋ | 112/300 [02:20<03:57, 1.26s/it] 38%|███▊ | 113/300 [02:21<03:55, 1.26s/it] 38%|███▊ | 114/300 [02:22<03:53, 1.26s/it] 38%|███▊ | 115/300 [02:23<03:52, 1.25s/it] 39%|███▊ | 116/300 [02:25<03:50, 1.25s/it] 39%|███▉ | 117/300 [02:26<03:49, 1.26s/it] 39%|███▉ | 118/300 [02:27<03:48, 1.25s/it] 40%|███▉ | 119/300 [02:28<03:46, 1.25s/it] 40%|████ | 120/300 [02:30<03:45, 1.25s/it] 40%|████ | 121/300 [02:31<03:44, 1.25s/it] 41%|████ | 122/300 [02:32<03:42, 1.25s/it] 41%|████ | 123/300 [02:33<03:41, 1.25s/it] 41%|████▏ | 124/300 [02:35<03:40, 1.25s/it] 42%|████▏ | 125/300 [02:36<03:38, 1.25s/it] 42%|████▏ | 126/300 [02:37<03:37, 1.25s/it] 42%|████▏ | 127/300 [02:38<03:35, 1.25s/it] 43%|████▎ | 128/300 [02:40<03:34, 1.25s/it] 43%|████▎ | 129/300 [02:41<03:33, 1.25s/it] 43%|████▎ | 130/300 [02:42<03:32, 1.25s/it] 44%|████▎ | 131/300 [02:43<03:31, 1.25s/it] 44%|████▍ | 132/300 [02:45<03:29, 1.25s/it] 44%|████▍ | 133/300 [02:46<03:29, 1.25s/it] 45%|████▍ | 134/300 [02:47<03:27, 1.25s/it] 45%|████▌ | 135/300 [02:48<03:26, 1.25s/it] 45%|████▌ | 136/300 [02:50<03:25, 1.25s/it] 46%|████▌ | 137/300 [02:51<03:26, 1.27s/it] 46%|████▌ | 138/300 [02:52<03:24, 1.26s/it] 46%|████▋ | 139/300 [02:53<03:22, 1.26s/it] 47%|████▋ | 140/300 [02:55<03:21, 1.26s/it] 47%|████▋ | 141/300 [02:56<03:19, 1.25s/it] 47%|████▋ | 142/300 [02:57<03:18, 1.25s/it] 48%|████▊ | 143/300 [02:58<03:16, 1.25s/it] 48%|████▊ | 144/300 [03:00<03:15, 1.25s/it] 48%|████▊ | 145/300 [03:01<03:14, 1.25s/it] 49%|████▊ | 146/300 [03:02<03:13, 1.25s/it] 49%|████▉ | 147/300 [03:03<03:11, 1.25s/it] 49%|████▉ | 148/300 [03:05<03:10, 1.25s/it] 50%|████▉ | 149/300 [03:06<03:09, 1.25s/it] 50%|█████ | 150/300 [03:07<03:07, 1.25s/it] 50%|█████ | 151/300 [03:08<03:06, 1.25s/it] 51%|█████ | 152/300 [03:10<03:05, 1.25s/it] 51%|█████ | 153/300 [03:11<03:03, 1.25s/it] 51%|█████▏ | 154/300 [03:12<03:02, 1.25s/it] 52%|█████▏ | 155/300 [03:13<03:01, 1.25s/it] 52%|█████▏ | 156/300 [03:15<03:00, 1.25s/it] 52%|█████▏ | 157/300 [03:16<02:58, 1.25s/it] 53%|█████▎ | 158/300 [03:17<02:57, 1.25s/it] 53%|█████▎ | 159/300 [03:18<02:56, 1.25s/it] 53%|█████▎ | 160/300 [03:20<02:55, 1.25s/it] 54%|█████▎ | 161/300 [03:21<02:53, 1.25s/it] 54%|█████▍ | 162/300 [03:22<02:52, 1.25s/it] 54%|█████▍ | 163/300 [03:23<02:51, 1.25s/it] 55%|█████▍ | 164/300 [03:25<02:52, 1.27s/it] 55%|█████▌ | 165/300 [03:26<02:50, 1.26s/it] 55%|█████▌ | 166/300 [03:27<02:48, 1.26s/it] 56%|█████▌ | 167/300 [03:29<02:47, 1.26s/it] 56%|█████▌ | 168/300 [03:30<02:45, 1.26s/it] 56%|█████▋ | 169/300 [03:31<02:44, 1.26s/it] 57%|█████▋ | 170/300 [03:32<02:43, 1.26s/it] 57%|█████▋ | 171/300 [03:34<02:42, 1.26s/it] 57%|█████▋ | 172/300 [03:35<02:40, 1.25s/it] 58%|█████▊ | 173/300 [03:36<02:39, 1.25s/it] 58%|█████▊ | 174/300 [03:37<02:37, 1.25s/it] 58%|█████▊ | 175/300 [03:39<02:36, 1.25s/it] 59%|█████▊ | 176/300 [03:40<02:35, 1.25s/it] 59%|█████▉ | 177/300 [03:41<02:33, 1.25s/it] 59%|█████▉ | 178/300 [03:42<02:32, 1.25s/it] 60%|█████▉ | 179/300 [03:44<02:31, 1.25s/it] 60%|██████ | 180/300 [03:45<02:29, 1.25s/it] 60%|██████ | 181/300 [03:46<02:28, 1.25s/it] 61%|██████ | 182/300 [03:47<02:27, 1.25s/it] 61%|██████ | 183/300 [03:49<02:26, 1.25s/it] 61%|██████▏ | 184/300 [03:50<02:24, 1.25s/it] 62%|██████▏ | 185/300 [03:51<02:23, 1.25s/it] 62%|██████▏ | 186/300 [03:52<02:22, 1.25s/it] 62%|██████▏ | 187/300 [03:54<02:21, 1.25s/it] 63%|██████▎ | 188/300 [03:55<02:20, 1.25s/it] 63%|██████▎ | 189/300 [03:56<02:18, 1.25s/it] 63%|██████▎ | 190/300 [03:57<02:19, 1.27s/it] 64%|██████▎ | 191/300 [03:59<02:17, 1.26s/it] 64%|██████▍ | 192/300 [04:00<02:15, 1.26s/it] 64%|██████▍ | 193/300 [04:01<02:14, 1.26s/it] 65%|██████▍ | 194/300 [04:02<02:13, 1.25s/it] 65%|██████▌ | 195/300 [04:04<02:11, 1.25s/it] 65%|██████▌ | 196/300 [04:05<02:10, 1.25s/it] 66%|██████▌ | 197/300 [04:06<02:09, 1.25s/it] 66%|██████▌ | 198/300 [04:07<02:07, 1.25s/it] 66%|██████▋ | 199/300 [04:09<02:06, 1.25s/it] 67%|██████▋ | 200/300 [04:10<02:04, 1.25s/it] 67%|██████▋ | 201/300 [04:11<02:03, 1.25s/it] 67%|██████▋ | 202/300 [04:12<02:02, 1.25s/it] 68%|██████▊ | 203/300 [04:14<02:01, 1.25s/it] 68%|██████▊ | 204/300 [04:15<02:00, 1.25s/it] 68%|██████▊ | 205/300 [04:16<01:58, 1.25s/it] 69%|██████▊ | 206/300 [04:17<01:57, 1.25s/it] 69%|██████▉ | 207/300 [04:19<01:56, 1.25s/it] 69%|██████▉ | 208/300 [04:20<01:55, 1.25s/it] 70%|██████▉ | 209/300 [04:21<01:54, 1.26s/it] 70%|███████ | 210/300 [04:22<01:53, 1.26s/it] 70%|███████ | 211/300 [04:24<01:51, 1.26s/it] 71%|███████ | 212/300 [04:25<01:50, 1.26s/it] 71%|███████ | 213/300 [04:26<01:49, 1.26s/it] 71%|███████▏ | 214/300 [04:27<01:48, 1.26s/it] 72%|███████▏ | 215/300 [04:29<01:46, 1.26s/it] 72%|███████▏ | 216/300 [04:30<01:46, 1.27s/it] 72%|███████▏ | 217/300 [04:31<01:45, 1.27s/it] 73%|███████▎ | 218/300 [04:32<01:43, 1.26s/it] 73%|███████▎ | 219/300 [04:34<01:41, 1.26s/it] 73%|███████▎ | 220/300 [04:35<01:40, 1.26s/it] 74%|███████▎ | 221/300 [04:36<01:39, 1.25s/it] 74%|███████▍ | 222/300 [04:37<01:37, 1.25s/it] 74%|███████▍ | 223/300 [04:39<01:36, 1.25s/it] 75%|███████▍ | 224/300 [04:40<01:35, 1.25s/it] 75%|███████▌ | 225/300 [04:41<01:33, 1.25s/it] 75%|███████▌ | 226/300 [04:42<01:32, 1.25s/it] 76%|███████▌ | 227/300 [04:44<01:31, 1.25s/it] 76%|███████▌ | 228/300 [04:45<01:30, 1.25s/it] 76%|███████▋ | 229/300 [04:46<01:28, 1.25s/it] 77%|███████▋ | 230/300 [04:47<01:27, 1.25s/it] 77%|███████▋ | 231/300 [04:49<01:26, 1.25s/it] 77%|███████▋ | 232/300 [04:50<01:25, 1.25s/it] 78%|███████▊ | 233/300 [04:51<01:23, 1.25s/it] 78%|███████▊ | 234/300 [04:52<01:22, 1.25s/it] 78%|███████▊ | 235/300 [04:54<01:21, 1.25s/it] 79%|███████▊ | 236/300 [04:55<01:20, 1.25s/it] 79%|███████▉ | 237/300 [04:56<01:18, 1.25s/it] 79%|███████▉ | 238/300 [04:57<01:17, 1.25s/it] 80%|███████▉ | 239/300 [04:59<01:16, 1.25s/it] 80%|████████ | 240/300 [05:00<01:15, 1.25s/it] 80%|████████ | 241/300 [05:01<01:13, 1.25s/it] 81%|████████ | 242/300 [05:02<01:12, 1.25s/it] 81%|████████ | 243/300 [05:04<01:12, 1.27s/it] 81%|████████▏ | 244/300 [05:05<01:10, 1.27s/it] 82%|████████▏ | 245/300 [05:06<01:09, 1.26s/it] 82%|████████▏ | 246/300 [05:08<01:07, 1.26s/it] 82%|████████▏ | 247/300 [05:09<01:06, 1.25s/it] 83%|████████▎ | 248/300 [05:10<01:05, 1.25s/it] 83%|████████▎ | 249/300 [05:11<01:03, 1.25s/it] 83%|████████▎ | 250/300 [05:13<01:02, 1.25s/it] 84%|████████▎ | 251/300 [05:14<01:01, 1.25s/it] 84%|████████▍ | 252/300 [05:15<01:00, 1.25s/it] 84%|████████▍ | 253/300 [05:16<00:58, 1.25s/it] 85%|████████▍ | 254/300 [05:18<00:57, 1.25s/it] 85%|████████▌ | 255/300 [05:19<00:56, 1.25s/it] 85%|████████▌ | 256/300 [05:20<00:55, 1.25s/it] 86%|████████▌ | 257/300 [05:21<00:53, 1.25s/it] 86%|████████▌ | 258/300 [05:23<00:52, 1.25s/it] 86%|████████▋ | 259/300 [05:24<00:51, 1.25s/it] 87%|████████▋ | 260/300 [05:25<00:49, 1.25s/it] 87%|████████▋ | 261/300 [05:26<00:48, 1.25s/it] 87%|████████▋ | 262/300 [05:28<00:47, 1.25s/it] 88%|████████▊ | 263/300 [05:29<00:46, 1.25s/it] 88%|████████▊ | 264/300 [05:30<00:45, 1.25s/it] 88%|████████▊ | 265/300 [05:31<00:43, 1.25s/it] 89%|████████▊ | 266/300 [05:33<00:42, 1.25s/it] 89%|████████▉ | 267/300 [05:34<00:41, 1.25s/it] 89%|████████▉ | 268/300 [05:35<00:40, 1.25s/it] 90%|████████▉ | 269/300 [05:36<00:39, 1.27s/it] 90%|█████████ | 270/300 [05:38<00:37, 1.26s/it] 90%|█████████ | 271/300 [05:39<00:36, 1.26s/it] 91%|█████████ | 272/300 [05:40<00:35, 1.26s/it] 91%|█████████ | 273/300 [05:41<00:33, 1.26s/it] 91%|█████████▏| 274/300 [05:43<00:32, 1.25s/it] 92%|█████████▏| 275/300 [05:44<00:31, 1.25s/it] 92%|█████████▏| 276/300 [05:45<00:30, 1.25s/it] 92%|█████████▏| 277/300 [05:46<00:28, 1.25s/it] 93%|█████████▎| 278/300 [05:48<00:27, 1.25s/it] 93%|█████████▎| 279/300 [05:49<00:26, 1.25s/it] 93%|█████████▎| 280/300 [05:50<00:25, 1.26s/it] 94%|█████████▎| 281/300 [05:51<00:23, 1.25s/it] 94%|█████████▍| 282/300 [05:53<00:22, 1.25s/it] 94%|█████████▍| 283/300 [05:54<00:21, 1.25s/it] 95%|█████████▍| 284/300 [05:55<00:20, 1.25s/it] 95%|█████████▌| 285/300 [05:56<00:18, 1.25s/it] 95%|█████████▌| 286/300 [05:58<00:17, 1.25s/it] 96%|█████████▌| 287/300 [05:59<00:16, 1.25s/it] 96%|█████████▌| 288/300 [06:00<00:14, 1.25s/it] 96%|█████████▋| 289/300 [06:01<00:13, 1.25s/it] 97%|█████████▋| 290/300 [06:03<00:12, 1.25s/it] 97%|█████████▋| 291/300 [06:04<00:11, 1.25s/it] 97%|█████████▋| 292/300 [06:05<00:09, 1.25s/it] 98%|█████████▊| 293/300 [06:06<00:08, 1.25s/it] 98%|█████████▊| 294/300 [06:08<00:07, 1.25s/it] 98%|█████████▊| 295/300 [06:09<00:06, 1.27s/it] 99%|█████████▊| 296/300 [06:10<00:05, 1.26s/it] 99%|█████████▉| 297/300 [06:11<00:03, 1.26s/it] 99%|█████████▉| 298/300 [06:13<00:02, 1.26s/it] 100%|█████████▉| 299/300 [06:14<00:01, 1.25s/it] 100%|██████████| 300/300 [06:15<00:00, 1.25s/it] 5it [31:18, 376.40s/it] 0%| | 0/300 [00:00<?, ?it/s] 0%| | 1/300 [00:00<04:07, 1.21it/s] 1%| | 2/300 [00:02<05:17, 1.07s/it] 1%| | 3/300 [00:03<05:39, 1.14s/it] 1%|▏ | 4/300 [00:04<05:49, 1.18s/it] 2%|▏ | 5/300 [00:05<05:54, 1.20s/it] 2%|▏ | 6/300 [00:07<05:56, 1.21s/it] 2%|▏ | 7/300 [00:08<05:58, 1.22s/it] 3%|▎ | 8/300 [00:09<05:57, 1.23s/it] 3%|▎ | 9/300 [00:10<05:57, 1.23s/it] 3%|▎ | 10/300 [00:11<05:57, 1.23s/it] 4%|▎ | 11/300 [00:13<05:56, 1.23s/it] 4%|▍ | 12/300 [00:14<05:55, 1.23s/it] 4%|▍ | 13/300 [00:15<05:55, 1.24s/it] 5%|▍ | 14/300 [00:16<05:54, 1.24s/it] 5%|▌ | 15/300 [00:18<05:53, 1.24s/it] 5%|▌ | 16/300 [00:19<05:51, 1.24s/it] 6%|▌ | 17/300 [00:20<05:50, 1.24s/it] 6%|▌ | 18/300 [00:21<05:50, 1.24s/it] 6%|▋ | 19/300 [00:23<05:50, 1.25s/it] 7%|▋ | 20/300 [00:24<05:49, 1.25s/it] 7%|▋ | 21/300 [00:25<05:52, 1.26s/it] 7%|▋ | 22/300 [00:26<05:50, 1.26s/it] 8%|▊ | 23/300 [00:28<05:47, 1.25s/it] 8%|▊ | 24/300 [00:29<05:44, 1.25s/it] 8%|▊ | 25/300 [00:30<05:42, 1.24s/it] 9%|▊ | 26/300 [00:31<05:41, 1.25s/it] 9%|▉ | 27/300 [00:33<05:39, 1.24s/it] 9%|▉ | 28/300 [00:34<05:38, 1.24s/it] 10%|▉ | 29/300 [00:35<05:36, 1.24s/it] 10%|█ | 30/300 [00:36<05:34, 1.24s/it] 10%|█ | 31/300 [00:38<05:33, 1.24s/it] 11%|█ | 32/300 [00:39<05:32, 1.24s/it] 11%|█ | 33/300 [00:40<05:30, 1.24s/it] 11%|█▏ | 34/300 [00:41<05:29, 1.24s/it] 12%|█▏ | 35/300 [00:43<05:28, 1.24s/it] 12%|█▏ | 36/300 [00:44<05:26, 1.24s/it] 12%|█▏ | 37/300 [00:45<05:25, 1.24s/it] 13%|█▎ | 38/300 [00:46<05:24, 1.24s/it] 13%|█▎ | 39/300 [00:48<05:23, 1.24s/it] 13%|█▎ | 40/300 [00:49<05:22, 1.24s/it] 14%|█▎ | 41/300 [00:50<05:21, 1.24s/it] 14%|█▍ | 42/300 [00:51<05:20, 1.24s/it] 14%|█▍ | 43/300 [00:52<05:18, 1.24s/it] 15%|█▍ | 44/300 [00:54<05:17, 1.24s/it] 15%|█▌ | 45/300 [00:55<05:15, 1.24s/it] 15%|█▌ | 46/300 [00:56<05:14, 1.24s/it] 16%|█▌ | 47/300 [00:57<05:14, 1.24s/it] 16%|█▌ | 48/300 [00:59<05:17, 1.26s/it] 16%|█▋ | 49/300 [01:00<05:14, 1.25s/it] 17%|█▋ | 50/300 [01:01<05:12, 1.25s/it] 17%|█▋ | 51/300 [01:02<05:10, 1.25s/it] 17%|█▋ | 52/300 [01:04<05:08, 1.24s/it] 18%|█▊ | 53/300 [01:05<05:07, 1.24s/it] 18%|█▊ | 54/300 [01:06<05:05, 1.24s/it] 18%|█▊ | 55/300 [01:07<05:04, 1.24s/it] 19%|█▊ | 56/300 [01:09<05:02, 1.24s/it] 19%|█▉ | 57/300 [01:10<05:01, 1.24s/it] 19%|█▉ | 58/300 [01:11<05:00, 1.24s/it] 20%|█▉ | 59/300 [01:12<04:58, 1.24s/it] 20%|██ | 60/300 [01:14<04:57, 1.24s/it] 20%|██ | 61/300 [01:15<04:56, 1.24s/it] 21%|██ | 62/300 [01:16<04:54, 1.24s/it] 21%|██ | 63/300 [01:17<04:53, 1.24s/it] 21%|██▏ | 64/300 [01:19<04:52, 1.24s/it] 22%|██▏ | 65/300 [01:20<04:51, 1.24s/it] 22%|██▏ | 66/300 [01:21<04:50, 1.24s/it] 22%|██▏ | 67/300 [01:22<04:49, 1.24s/it] 23%|██▎ | 68/300 [01:24<04:48, 1.24s/it] 23%|██▎ | 69/300 [01:25<04:46, 1.24s/it] 23%|██▎ | 70/300 [01:26<04:45, 1.24s/it] 24%|██▎ | 71/300 [01:27<04:43, 1.24s/it] 24%|██▍ | 72/300 [01:28<04:42, 1.24s/it] 24%|██▍ | 73/300 [01:30<04:41, 1.24s/it] 25%|██▍ | 74/300 [01:31<04:44, 1.26s/it] 25%|██▌ | 75/300 [01:32<04:41, 1.25s/it] 25%|██▌ | 76/300 [01:34<04:39, 1.25s/it] 26%|██▌ | 77/300 [01:35<04:37, 1.25s/it] 26%|██▌ | 78/300 [01:36<04:36, 1.24s/it] 26%|██▋ | 79/300 [01:37<04:34, 1.24s/it] 27%|██▋ | 80/300 [01:38<04:32, 1.24s/it] 27%|██▋ | 81/300 [01:40<04:31, 1.24s/it] 27%|██▋ | 82/300 [01:41<04:30, 1.24s/it] 28%|██▊ | 83/300 [01:42<04:28, 1.24s/it] 28%|██▊ | 84/300 [01:43<04:27, 1.24s/it] 28%|██▊ | 85/300 [01:45<04:26, 1.24s/it] 29%|██▊ | 86/300 [01:46<04:25, 1.24s/it] 29%|██▉ | 87/300 [01:47<04:24, 1.24s/it] 29%|██▉ | 88/300 [01:48<04:23, 1.24s/it] 30%|██▉ | 89/300 [01:50<04:21, 1.24s/it] 30%|███ | 90/300 [01:51<04:20, 1.24s/it] 30%|███ | 91/300 [01:52<04:19, 1.24s/it] 31%|███ | 92/300 [01:53<04:18, 1.24s/it] 31%|███ | 93/300 [01:55<04:16, 1.24s/it] 31%|███▏ | 94/300 [01:56<04:15, 1.24s/it] 32%|███▏ | 95/300 [01:57<04:14, 1.24s/it] 32%|███▏ | 96/300 [01:58<04:12, 1.24s/it] 32%|███▏ | 97/300 [02:00<04:11, 1.24s/it] 33%|███▎ | 98/300 [02:01<04:10, 1.24s/it] 33%|███▎ | 99/300 [02:02<04:08, 1.24s/it] 33%|███▎ | 100/300 [02:03<04:11, 1.26s/it] 34%|███▎ | 101/300 [02:05<04:09, 1.25s/it] 34%|███▍ | 102/300 [02:06<04:07, 1.25s/it] 34%|███▍ | 103/300 [02:07<04:05, 1.25s/it] 35%|███▍ | 104/300 [02:08<04:03, 1.24s/it] 35%|███▌ | 105/300 [02:10<04:02, 1.24s/it] 35%|███▌ | 106/300 [02:11<04:00, 1.24s/it] 36%|███▌ | 107/300 [02:12<03:59, 1.24s/it] 36%|███▌ | 108/300 [02:13<03:58, 1.24s/it] 36%|███▋ | 109/300 [02:14<03:56, 1.24s/it] 37%|███▋ | 110/300 [02:16<03:55, 1.24s/it] 37%|███▋ | 111/300 [02:17<03:54, 1.24s/it] 37%|███▋ | 112/300 [02:18<03:53, 1.24s/it] 38%|███▊ | 113/300 [02:19<03:51, 1.24s/it] 38%|███▊ | 114/300 [02:21<03:50, 1.24s/it] 38%|███▊ | 115/300 [02:22<03:49, 1.24s/it] 39%|███▊ | 116/300 [02:23<03:48, 1.24s/it] 39%|███▉ | 117/300 [02:24<03:46, 1.24s/it] 39%|███▉ | 118/300 [02:26<03:45, 1.24s/it] 40%|███▉ | 119/300 [02:27<03:44, 1.24s/it] 40%|████ | 120/300 [02:28<03:43, 1.24s/it] 40%|████ | 121/300 [02:29<03:41, 1.24s/it] 41%|████ | 122/300 [02:31<03:40, 1.24s/it] 41%|████ | 123/300 [02:32<03:39, 1.24s/it] 41%|████▏ | 124/300 [02:33<03:38, 1.24s/it] 42%|████▏ | 125/300 [02:34<03:37, 1.24s/it] 42%|████▏ | 126/300 [02:36<03:38, 1.26s/it] 42%|████▏ | 127/300 [02:37<03:36, 1.25s/it] 43%|████▎ | 128/300 [02:38<03:34, 1.25s/it] 43%|████▎ | 129/300 [02:39<03:32, 1.24s/it] 43%|████▎ | 130/300 [02:41<03:31, 1.24s/it] 44%|████▎ | 131/300 [02:42<03:29, 1.24s/it] 44%|████▍ | 132/300 [02:43<03:28, 1.24s/it] 44%|████▍ | 133/300 [02:44<03:27, 1.24s/it] 45%|████▍ | 134/300 [02:46<03:25, 1.24s/it] 45%|████▌ | 135/300 [02:47<03:24, 1.24s/it] 45%|████▌ | 136/300 [02:48<03:23, 1.24s/it] 46%|████▌ | 137/300 [02:49<03:22, 1.24s/it] 46%|████▌ | 138/300 [02:50<03:20, 1.24s/it] 46%|████▋ | 139/300 [02:52<03:19, 1.24s/it] 47%|████▋ | 140/300 [02:53<03:18, 1.24s/it] 47%|████▋ | 141/300 [02:54<03:16, 1.24s/it] 47%|████▋ | 142/300 [02:55<03:15, 1.24s/it] 48%|████▊ | 143/300 [02:57<03:14, 1.24s/it] 48%|████▊ | 144/300 [02:58<03:13, 1.24s/it] 48%|████▊ | 145/300 [02:59<03:12, 1.24s/it] 49%|████▊ | 146/300 [03:00<03:10, 1.24s/it] 49%|████▉ | 147/300 [03:02<03:09, 1.24s/it] 49%|████▉ | 148/300 [03:03<03:08, 1.24s/it] 50%|████▉ | 149/300 [03:04<03:07, 1.24s/it] 50%|█████ | 150/300 [03:05<03:06, 1.24s/it] 50%|█████ | 151/300 [03:07<03:04, 1.24s/it] 51%|█████ | 152/300 [03:08<03:03, 1.24s/it] 51%|█████ | 153/300 [03:09<03:04, 1.26s/it] 51%|█████▏ | 154/300 [03:10<03:02, 1.25s/it] 52%|█████▏ | 155/300 [03:12<03:01, 1.25s/it] 52%|█████▏ | 156/300 [03:13<02:59, 1.25s/it] 52%|█████▏ | 157/300 [03:14<02:58, 1.25s/it] 53%|█████▎ | 158/300 [03:15<02:56, 1.24s/it] 53%|█████▎ | 159/300 [03:17<02:55, 1.24s/it] 53%|█████▎ | 160/300 [03:18<02:53, 1.24s/it] 54%|█████▎ | 161/300 [03:19<02:52, 1.24s/it] 54%|█████▍ | 162/300 [03:20<02:51, 1.24s/it] 54%|█████▍ | 163/300 [03:22<02:49, 1.24s/it] 55%|█████▍ | 164/300 [03:23<02:48, 1.24s/it] 55%|█████▌ | 165/300 [03:24<02:47, 1.24s/it] 55%|█████▌ | 166/300 [03:25<02:46, 1.24s/it] 56%|█████▌ | 167/300 [03:27<02:44, 1.24s/it] 56%|█████▌ | 168/300 [03:28<02:43, 1.24s/it] 56%|█████▋ | 169/300 [03:29<02:42, 1.24s/it] 57%|█████▋ | 170/300 [03:30<02:41, 1.24s/it] 57%|█████▋ | 171/300 [03:31<02:39, 1.24s/it] 57%|█████▋ | 172/300 [03:33<02:38, 1.24s/it] 58%|█████▊ | 173/300 [03:34<02:37, 1.24s/it] 58%|█████▊ | 174/300 [03:35<02:36, 1.24s/it] 58%|█████▊ | 175/300 [03:36<02:35, 1.24s/it] 59%|█████▊ | 176/300 [03:38<02:33, 1.24s/it] 59%|█████▉ | 177/300 [03:39<02:32, 1.24s/it] 59%|█████▉ | 178/300 [03:40<02:30, 1.24s/it] 60%|█████▉ | 179/300 [03:41<02:32, 1.26s/it] 60%|██████ | 180/300 [03:43<02:30, 1.25s/it] 60%|██████ | 181/300 [03:44<02:28, 1.25s/it] 61%|██████ | 182/300 [03:45<02:26, 1.25s/it] 61%|██████ | 183/300 [03:46<02:25, 1.24s/it] 61%|██████▏ | 184/300 [03:48<02:24, 1.24s/it] 62%|██████▏ | 185/300 [03:49<02:22, 1.24s/it] 62%|██████▏ | 186/300 [03:50<02:21, 1.24s/it] 62%|██████▏ | 187/300 [03:51<02:20, 1.24s/it] 63%|██████▎ | 188/300 [03:53<02:18, 1.24s/it] 63%|██████▎ | 189/300 [03:54<02:17, 1.24s/it] 63%|██████▎ | 190/300 [03:55<02:16, 1.24s/it] 64%|██████▎ | 191/300 [03:56<02:15, 1.24s/it] 64%|██████▍ | 192/300 [03:58<02:13, 1.24s/it] 64%|██████▍ | 193/300 [03:59<02:12, 1.24s/it] 65%|██████▍ | 194/300 [04:00<02:11, 1.24s/it] 65%|██████▌ | 195/300 [04:01<02:10, 1.24s/it] 65%|██████▌ | 196/300 [04:03<02:08, 1.24s/it] 66%|██████▌ | 197/300 [04:04<02:07, 1.24s/it] 66%|██████▌ | 198/300 [04:05<02:06, 1.24s/it] 66%|██████▋ | 199/300 [04:06<02:05, 1.24s/it] 67%|██████▋ | 200/300 [04:07<02:04, 1.24s/it] 67%|██████▋ | 201/300 [04:09<02:02, 1.24s/it] 67%|██████▋ | 202/300 [04:10<02:01, 1.24s/it] 68%|██████▊ | 203/300 [04:11<02:00, 1.24s/it] 68%|██████▊ | 204/300 [04:12<01:58, 1.24s/it] 68%|██████▊ | 205/300 [04:14<01:57, 1.24s/it] 69%|██████▊ | 206/300 [04:15<01:58, 1.26s/it] 69%|██████▉ | 207/300 [04:16<01:56, 1.25s/it] 69%|██████▉ | 208/300 [04:17<01:54, 1.25s/it] 70%|██████▉ | 209/300 [04:19<01:53, 1.25s/it] 70%|███████ | 210/300 [04:20<01:52, 1.24s/it] 70%|███████ | 211/300 [04:21<01:50, 1.24s/it] 71%|███████ | 212/300 [04:22<01:49, 1.24s/it] 71%|███████ | 213/300 [04:24<01:47, 1.24s/it] 71%|███████▏ | 214/300 [04:25<01:46, 1.24s/it] 72%|███████▏ | 215/300 [04:26<01:45, 1.24s/it] 72%|███████▏ | 216/300 [04:27<01:44, 1.24s/it] 72%|███████▏ | 217/300 [04:29<01:42, 1.24s/it] 73%|███████▎ | 218/300 [04:30<01:41, 1.24s/it] 73%|███████▎ | 219/300 [04:31<01:40, 1.24s/it] 73%|███████▎ | 220/300 [04:32<01:39, 1.24s/it] 74%|███████▎ | 221/300 [04:34<01:37, 1.24s/it] 74%|███████▍ | 222/300 [04:35<01:36, 1.24s/it] 74%|███████▍ | 223/300 [04:36<01:35, 1.24s/it] 75%|███████▍ | 224/300 [04:37<01:34, 1.24s/it] 75%|███████▌ | 225/300 [04:39<01:32, 1.24s/it] 75%|███████▌ | 226/300 [04:40<01:31, 1.24s/it] 76%|███████▌ | 227/300 [04:41<01:30, 1.24s/it] 76%|███████▌ | 228/300 [04:42<01:29, 1.24s/it] 76%|███████▋ | 229/300 [04:43<01:28, 1.24s/it] 77%|███████▋ | 230/300 [04:45<01:26, 1.24s/it] 77%|███████▋ | 231/300 [04:46<01:26, 1.26s/it] 77%|███████▋ | 232/300 [04:47<01:28, 1.30s/it] 78%|███████▊ | 233/300 [04:49<01:28, 1.32s/it] 78%|███████▊ | 234/300 [04:50<01:28, 1.34s/it] 78%|███████▊ | 235/300 [04:51<01:25, 1.31s/it] 79%|███████▊ | 236/300 [04:53<01:22, 1.29s/it] 79%|███████▉ | 237/300 [04:54<01:20, 1.28s/it] 79%|███████▉ | 238/300 [04:55<01:18, 1.27s/it] 80%|███████▉ | 239/300 [04:56<01:16, 1.26s/it] 80%|████████ | 240/300 [04:58<01:15, 1.25s/it] 80%|████████ | 241/300 [04:59<01:13, 1.25s/it] 81%|████████ | 242/300 [05:00<01:12, 1.25s/it] 81%|████████ | 243/300 [05:01<01:10, 1.24s/it] 81%|████████▏ | 244/300 [05:03<01:09, 1.24s/it] 82%|████████▏ | 245/300 [05:04<01:08, 1.24s/it] 82%|████████▏ | 246/300 [05:05<01:06, 1.24s/it] 82%|████████▏ | 247/300 [05:06<01:05, 1.24s/it] 83%|████████▎ | 248/300 [05:08<01:04, 1.24s/it] 83%|████████▎ | 249/300 [05:09<01:03, 1.24s/it] 83%|████████▎ | 250/300 [05:10<01:01, 1.24s/it] 84%|████████▎ | 251/300 [05:11<01:00, 1.24s/it] 84%|████████▍ | 252/300 [05:13<00:59, 1.24s/it] 84%|████████▍ | 253/300 [05:14<00:58, 1.24s/it] 85%|████████▍ | 254/300 [05:15<00:57, 1.24s/it] 85%|████████▌ | 255/300 [05:16<00:55, 1.24s/it] 85%|████████▌ | 256/300 [05:17<00:54, 1.24s/it] 86%|████████▌ | 257/300 [05:19<00:53, 1.24s/it] 86%|████████▌ | 258/300 [05:20<00:52, 1.24s/it] 86%|████████▋ | 259/300 [05:21<00:51, 1.26s/it] 87%|████████▋ | 260/300 [05:22<00:50, 1.25s/it] 87%|████████▋ | 261/300 [05:24<00:48, 1.25s/it] 87%|████████▋ | 262/300 [05:25<00:47, 1.24s/it] 88%|████████▊ | 263/300 [05:26<00:45, 1.24s/it] 88%|████████▊ | 264/300 [05:27<00:44, 1.24s/it] 88%|████████▊ | 265/300 [05:29<00:43, 1.24s/it] 89%|████████▊ | 266/300 [05:30<00:42, 1.24s/it] 89%|████████▉ | 267/300 [05:31<00:40, 1.24s/it] 89%|████████▉ | 268/300 [05:32<00:39, 1.24s/it] 90%|████████▉ | 269/300 [05:34<00:38, 1.24s/it] 90%|█████████ | 270/300 [05:35<00:37, 1.24s/it] 90%|█████████ | 271/300 [05:36<00:36, 1.24s/it] 91%|█████████ | 272/300 [05:37<00:34, 1.24s/it] 91%|█████████ | 273/300 [05:39<00:33, 1.24s/it] 91%|█████████▏| 274/300 [05:40<00:32, 1.24s/it] 92%|█████████▏| 275/300 [05:41<00:30, 1.24s/it] 92%|█████████▏| 276/300 [05:42<00:29, 1.24s/it] 92%|█████████▏| 277/300 [05:44<00:28, 1.24s/it] 93%|█████████▎| 278/300 [05:45<00:27, 1.24s/it] 93%|█████████▎| 279/300 [05:46<00:25, 1.24s/it] 93%|█████████▎| 280/300 [05:47<00:24, 1.24s/it] 94%|█████████▎| 281/300 [05:49<00:23, 1.24s/it] 94%|█████████▍| 282/300 [05:50<00:22, 1.24s/it] 94%|█████████▍| 283/300 [05:51<00:21, 1.24s/it] 95%|█████████▍| 284/300 [05:52<00:19, 1.24s/it] 95%|█████████▌| 285/300 [05:54<00:18, 1.26s/it] 95%|█████████▌| 286/300 [05:55<00:17, 1.26s/it] 96%|█████████▌| 287/300 [05:56<00:16, 1.25s/it] 96%|█████████▌| 288/300 [05:57<00:14, 1.25s/it] 96%|█████████▋| 289/300 [05:58<00:13, 1.24s/it] 97%|█████████▋| 290/300 [06:00<00:12, 1.24s/it] 97%|█████████▋| 291/300 [06:01<00:11, 1.24s/it] 97%|█████████▋| 292/300 [06:02<00:09, 1.24s/it] 98%|█████████▊| 293/300 [06:03<00:08, 1.24s/it] 98%|█████████▊| 294/300 [06:05<00:07, 1.24s/it] 98%|█████████▊| 295/300 [06:06<00:06, 1.24s/it] 99%|█████████▊| 296/300 [06:07<00:04, 1.24s/it] 99%|█████████▉| 297/300 [06:08<00:03, 1.24s/it] 99%|█████████▉| 298/300 [06:10<00:02, 1.24s/it] 100%|█████████▉| 299/300 [06:11<00:01, 1.24s/it] 100%|██████████| 300/300 [06:12<00:00, 1.24s/it] 6it [37:32, 375.41s/it] 0%| | 0/300 [00:00<?, ?it/s] 0%| | 1/300 [00:00<04:15, 1.17it/s] 1%| | 2/300 [00:02<05:24, 1.09s/it] 1%| | 3/300 [00:03<05:43, 1.16s/it] 1%|▏ | 4/300 [00:04<05:52, 1.19s/it] 2%|▏ | 5/300 [00:05<05:57, 1.21s/it] 2%|▏ | 6/300 [00:07<05:59, 1.22s/it] 2%|▏ | 7/300 [00:08<06:01, 1.24s/it] 3%|▎ | 8/300 [00:09<06:01, 1.24s/it] 3%|▎ | 9/300 [00:10<06:01, 1.24s/it] 3%|▎ | 10/300 [00:12<06:00, 1.24s/it] 4%|▎ | 11/300 [00:13<05:59, 1.24s/it] 4%|▍ | 12/300 [00:14<06:04, 1.27s/it] 4%|▍ | 13/300 [00:15<06:01, 1.26s/it] 5%|▍ | 14/300 [00:17<05:59, 1.26s/it] 5%|▌ | 15/300 [00:18<05:56, 1.25s/it] 5%|▌ | 16/300 [00:19<05:54, 1.25s/it] 6%|▌ | 17/300 [00:20<05:54, 1.25s/it] 6%|▌ | 18/300 [00:22<05:52, 1.25s/it] 6%|▋ | 19/300 [00:23<05:50, 1.25s/it] 7%|▋ | 20/300 [00:24<05:49, 1.25s/it] 7%|▋ | 21/300 [00:25<05:47, 1.25s/it] 7%|▋ | 22/300 [00:27<05:46, 1.25s/it] 8%|▊ | 23/300 [00:28<05:45, 1.25s/it] 8%|▊ | 24/300 [00:29<05:43, 1.24s/it] 8%|▊ | 25/300 [00:30<05:42, 1.25s/it] 9%|▊ | 26/300 [00:32<05:41, 1.24s/it] 9%|▉ | 27/300 [00:33<05:39, 1.25s/it] 9%|▉ | 28/300 [00:34<05:38, 1.24s/it] 10%|▉ | 29/300 [00:35<05:37, 1.25s/it] 10%|█ | 30/300 [00:37<05:36, 1.25s/it] 10%|█ | 31/300 [00:38<05:35, 1.25s/it] 11%|█ | 32/300 [00:39<05:33, 1.25s/it] 11%|█ | 33/300 [00:40<05:33, 1.25s/it] 11%|█▏ | 34/300 [00:42<05:31, 1.25s/it] 12%|█▏ | 35/300 [00:43<05:30, 1.25s/it] 12%|█▏ | 36/300 [00:44<05:29, 1.25s/it] 12%|█▏ | 37/300 [00:45<05:27, 1.25s/it] 13%|█▎ | 38/300 [00:47<05:31, 1.27s/it] 13%|█▎ | 39/300 [00:48<05:29, 1.26s/it] 13%|█▎ | 40/300 [00:49<05:26, 1.26s/it] 14%|█▎ | 41/300 [00:50<05:24, 1.25s/it] 14%|█▍ | 42/300 [00:52<05:23, 1.25s/it] 14%|█▍ | 43/300 [00:53<05:21, 1.25s/it] 15%|█▍ | 44/300 [00:54<05:19, 1.25s/it] 15%|█▌ | 45/300 [00:55<05:18, 1.25s/it] 15%|█▌ | 46/300 [00:57<05:16, 1.25s/it] 16%|█▌ | 47/300 [00:58<05:16, 1.25s/it] 16%|█▌ | 48/300 [00:59<05:14, 1.25s/it] 16%|█▋ | 49/300 [01:00<05:13, 1.25s/it] 17%|█▋ | 50/300 [01:02<05:11, 1.25s/it] 17%|█▋ | 51/300 [01:03<05:11, 1.25s/it] 17%|█▋ | 52/300 [01:04<05:09, 1.25s/it] 18%|█▊ | 53/300 [01:05<05:08, 1.25s/it] 18%|█▊ | 54/300 [01:07<05:06, 1.25s/it] 18%|█▊ | 55/300 [01:08<05:05, 1.25s/it] 19%|█▊ | 56/300 [01:09<05:04, 1.25s/it] 19%|█▉ | 57/300 [01:10<05:02, 1.25s/it] 19%|█▉ | 58/300 [01:12<05:01, 1.25s/it] 20%|█▉ | 59/300 [01:13<05:00, 1.25s/it] 20%|██ | 60/300 [01:14<04:59, 1.25s/it] 20%|██ | 61/300 [01:15<04:58, 1.25s/it] 21%|██ | 62/300 [01:17<04:57, 1.25s/it] 21%|██ | 63/300 [01:18<04:55, 1.25s/it] 21%|██▏ | 64/300 [01:19<04:59, 1.27s/it] 22%|██▏ | 65/300 [01:20<04:56, 1.26s/it] 22%|██▏ | 66/300 [01:22<04:54, 1.26s/it] 22%|██▏ | 67/300 [01:23<04:52, 1.26s/it] 23%|██▎ | 68/300 [01:24<04:50, 1.25s/it] 23%|██▎ | 69/300 [01:25<04:49, 1.25s/it] 23%|██▎ | 70/300 [01:27<04:47, 1.25s/it] 24%|██▎ | 71/300 [01:28<04:46, 1.25s/it] 24%|██▍ | 72/300 [01:29<04:44, 1.25s/it] 24%|██▍ | 73/300 [01:30<04:43, 1.25s/it] 25%|██▍ | 74/300 [01:32<04:42, 1.25s/it] 25%|██▌ | 75/300 [01:33<04:40, 1.25s/it] 25%|██▌ | 76/300 [01:34<04:39, 1.25s/it] 26%|██▌ | 77/300 [01:35<04:38, 1.25s/it] 26%|██▌ | 78/300 [01:37<04:37, 1.25s/it] 26%|██▋ | 79/300 [01:38<04:35, 1.25s/it] 27%|██▋ | 80/300 [01:39<04:35, 1.25s/it] 27%|██▋ | 81/300 [01:40<04:33, 1.25s/it] 27%|██▋ | 82/300 [01:42<04:32, 1.25s/it] 28%|██▊ | 83/300 [01:43<04:31, 1.25s/it] 28%|██▊ | 84/300 [01:44<04:29, 1.25s/it] 28%|██▊ | 85/300 [01:45<04:28, 1.25s/it] 29%|██▊ | 86/300 [01:47<04:26, 1.25s/it] 29%|██▉ | 87/300 [01:48<04:25, 1.25s/it] 29%|██▉ | 88/300 [01:49<04:24, 1.25s/it] 30%|██▉ | 89/300 [01:50<04:23, 1.25s/it] 30%|███ | 90/300 [01:52<04:25, 1.27s/it] 30%|███ | 91/300 [01:53<04:23, 1.26s/it] 31%|███ | 92/300 [01:54<04:21, 1.26s/it] 31%|███ | 93/300 [01:55<04:19, 1.25s/it] 31%|███▏ | 94/300 [01:57<04:17, 1.25s/it] 32%|███▏ | 95/300 [01:58<04:16, 1.25s/it] 32%|███▏ | 96/300 [01:59<04:14, 1.25s/it] 32%|███▏ | 97/300 [02:00<04:13, 1.25s/it] 33%|███▎ | 98/300 [02:02<04:12, 1.25s/it] 33%|███▎ | 99/300 [02:03<04:11, 1.25s/it] 33%|███▎ | 100/300 [02:04<04:09, 1.25s/it] 34%|███▎ | 101/300 [02:05<04:08, 1.25s/it] 34%|███▍ | 102/300 [02:07<04:07, 1.25s/it] 34%|███▍ | 103/300 [02:08<04:05, 1.25s/it] 35%|███▍ | 104/300 [02:09<04:04, 1.25s/it] 35%|███▌ | 105/300 [02:10<04:03, 1.25s/it] 35%|███▌ | 106/300 [02:12<04:01, 1.25s/it] 36%|███▌ | 107/300 [02:13<04:00, 1.25s/it] 36%|███▌ | 108/300 [02:14<03:59, 1.25s/it] 36%|███▋ | 109/300 [02:15<03:57, 1.24s/it] 37%|███▋ | 110/300 [02:17<03:56, 1.25s/it] 37%|███▋ | 111/300 [02:18<03:55, 1.25s/it] 37%|███▋ | 112/300 [02:19<03:54, 1.25s/it] 38%|███▊ | 113/300 [02:20<03:53, 1.25s/it] 38%|███▊ | 114/300 [02:22<03:52, 1.25s/it] 38%|███▊ | 115/300 [02:23<03:50, 1.25s/it] 39%|███▊ | 116/300 [02:24<03:49, 1.25s/it] 39%|███▉ | 117/300 [02:25<03:51, 1.27s/it] 39%|███▉ | 118/300 [02:27<03:49, 1.26s/it] 40%|███▉ | 119/300 [02:28<03:47, 1.26s/it] 40%|████ | 120/300 [02:29<03:45, 1.25s/it] 40%|████ | 121/300 [02:30<03:44, 1.25s/it] 41%|████ | 122/300 [02:32<03:42, 1.25s/it] 41%|████ | 123/300 [02:33<03:41, 1.25s/it] 41%|████▏ | 124/300 [02:34<03:39, 1.25s/it] 42%|████▏ | 125/300 [02:35<03:38, 1.25s/it] 42%|████▏ | 126/300 [02:37<03:37, 1.25s/it] 42%|████▏ | 127/300 [02:38<03:35, 1.25s/it] 43%|████▎ | 128/300 [02:39<03:34, 1.25s/it] 43%|████▎ | 129/300 [02:40<03:33, 1.25s/it] 43%|████▎ | 130/300 [02:42<03:32, 1.25s/it] 44%|████▎ | 131/300 [02:43<03:31, 1.25s/it] 44%|████▍ | 132/300 [02:44<03:30, 1.25s/it] 44%|████▍ | 133/300 [02:45<03:28, 1.25s/it] 45%|████▍ | 134/300 [02:47<03:27, 1.25s/it] 45%|████▌ | 135/300 [02:48<03:26, 1.25s/it] 45%|████▌ | 136/300 [02:49<03:24, 1.25s/it] 46%|████▌ | 137/300 [02:50<03:23, 1.25s/it] 46%|████▌ | 138/300 [02:52<03:22, 1.25s/it] 46%|████▋ | 139/300 [02:53<03:21, 1.25s/it] 47%|████▋ | 140/300 [02:54<03:19, 1.25s/it] 47%|████▋ | 141/300 [02:55<03:18, 1.25s/it] 47%|████▋ | 142/300 [02:57<03:17, 1.25s/it] 48%|████▊ | 143/300 [02:58<03:18, 1.27s/it] 48%|████▊ | 144/300 [02:59<03:16, 1.26s/it] 48%|████▊ | 145/300 [03:00<03:15, 1.26s/it] 49%|████▊ | 146/300 [03:02<03:13, 1.26s/it] 49%|████▉ | 147/300 [03:03<03:11, 1.25s/it] 49%|████▉ | 148/300 [03:04<03:10, 1.25s/it] 50%|████▉ | 149/300 [03:05<03:08, 1.25s/it] 50%|█████ | 150/300 [03:07<03:07, 1.25s/it] 50%|█████ | 151/300 [03:08<03:05, 1.25s/it] 51%|█████ | 152/300 [03:09<03:04, 1.25s/it] 51%|█████ | 153/300 [03:10<03:03, 1.25s/it] 51%|█████▏ | 154/300 [03:12<03:02, 1.25s/it] 52%|█████▏ | 155/300 [03:13<03:01, 1.25s/it] 52%|█████▏ | 156/300 [03:14<02:59, 1.25s/it] 52%|█████▏ | 157/300 [03:15<02:58, 1.25s/it] 53%|█████▎ | 158/300 [03:17<02:57, 1.25s/it] 53%|█████▎ | 159/300 [03:18<02:56, 1.25s/it] 53%|█████▎ | 160/300 [03:19<02:54, 1.25s/it] 54%|█████▎ | 161/300 [03:20<02:53, 1.25s/it] 54%|█████▍ | 162/300 [03:22<02:52, 1.25s/it] 54%|█████▍ | 163/300 [03:23<02:51, 1.25s/it] 55%|█████▍ | 164/300 [03:24<02:49, 1.25s/it] 55%|█████▌ | 165/300 [03:25<02:48, 1.25s/it] 55%|█████▌ | 166/300 [03:27<02:47, 1.25s/it] 56%|█████▌ | 167/300 [03:28<02:46, 1.25s/it] 56%|█████▌ | 168/300 [03:29<02:45, 1.25s/it] 56%|█████▋ | 169/300 [03:30<02:46, 1.27s/it] 57%|█████▋ | 170/300 [03:32<02:44, 1.26s/it] 57%|█████▋ | 171/300 [03:33<02:42, 1.26s/it] 57%|█████▋ | 172/300 [03:34<02:40, 1.26s/it] 58%|█████▊ | 173/300 [03:35<02:39, 1.25s/it] 58%|█████▊ | 174/300 [03:37<02:37, 1.25s/it] 58%|█████▊ | 175/300 [03:38<02:36, 1.25s/it] 59%|█████▊ | 176/300 [03:39<02:34, 1.25s/it] 59%|█████▉ | 177/300 [03:40<02:33, 1.25s/it] 59%|█████▉ | 178/300 [03:42<02:32, 1.25s/it] 60%|█████▉ | 179/300 [03:43<02:31, 1.25s/it] 60%|██████ | 180/300 [03:44<02:30, 1.25s/it] 60%|██████ | 181/300 [03:45<02:29, 1.25s/it] 61%|██████ | 182/300 [03:47<02:27, 1.25s/it] 61%|██████ | 183/300 [03:48<02:26, 1.25s/it] 61%|██████▏ | 184/300 [03:49<02:24, 1.25s/it] 62%|██████▏ | 185/300 [03:50<02:23, 1.25s/it] 62%|██████▏ | 186/300 [03:52<02:22, 1.25s/it] 62%|██████▏ | 187/300 [03:53<02:20, 1.25s/it] 63%|██████▎ | 188/300 [03:54<02:19, 1.25s/it] 63%|██████▎ | 189/300 [03:55<02:18, 1.25s/it] 63%|██████▎ | 190/300 [03:57<02:17, 1.25s/it] 64%|██████▎ | 191/300 [03:58<02:15, 1.25s/it] 64%|██████▍ | 192/300 [03:59<02:14, 1.25s/it] 64%|██████▍ | 193/300 [04:00<02:13, 1.25s/it] 65%|██████▍ | 194/300 [04:02<02:12, 1.25s/it] 65%|██████▌ | 195/300 [04:03<02:11, 1.25s/it] 65%|██████▌ | 196/300 [04:04<02:11, 1.27s/it] 66%|██████▌ | 197/300 [04:05<02:09, 1.26s/it] 66%|██████▌ | 198/300 [04:07<02:08, 1.26s/it] 66%|██████▋ | 199/300 [04:08<02:06, 1.25s/it] 67%|██████▋ | 200/300 [04:09<02:05, 1.25s/it] 67%|██████▋ | 201/300 [04:10<02:03, 1.25s/it] 67%|██████▋ | 202/300 [04:12<02:02, 1.25s/it] 68%|██████▊ | 203/300 [04:13<02:01, 1.25s/it] 68%|██████▊ | 204/300 [04:14<02:00, 1.25s/it] 68%|██████▊ | 205/300 [04:15<01:58, 1.25s/it] 69%|██████▊ | 206/300 [04:17<01:57, 1.25s/it] 69%|██████▉ | 207/300 [04:18<01:56, 1.25s/it] 69%|██████▉ | 208/300 [04:19<01:54, 1.25s/it] 70%|██████▉ | 209/300 [04:20<01:53, 1.25s/it] 70%|███████ | 210/300 [04:22<01:52, 1.25s/it] 70%|███████ | 211/300 [04:23<01:51, 1.25s/it] 71%|███████ | 212/300 [04:24<01:49, 1.25s/it] 71%|███████ | 213/300 [04:25<01:48, 1.25s/it] 71%|███████▏ | 214/300 [04:27<01:47, 1.25s/it] 72%|███████▏ | 215/300 [04:28<01:46, 1.25s/it] 72%|███████▏ | 216/300 [04:29<01:44, 1.25s/it] 72%|███████▏ | 217/300 [04:30<01:43, 1.25s/it] 73%|███████▎ | 218/300 [04:32<01:42, 1.25s/it] 73%|███████▎ | 219/300 [04:33<01:41, 1.25s/it] 73%|███████▎ | 220/300 [04:34<01:40, 1.25s/it] 74%|███████▎ | 221/300 [04:35<01:38, 1.25s/it] 74%|███████▍ | 222/300 [04:37<01:38, 1.26s/it] 74%|███████▍ | 223/300 [04:39<01:36, 1.25s/it] 6it [42:12, 422.03s/it]
--------------------------------------------------------------------------- KeyboardInterrupt Traceback (most recent call last) <ipython-input-31-a820a011a8f0> in <module> 1 mean_0_mp, mean_1_mp = get_masks(model, test_loader, mean_mask=True, mask_type='mean_pertrub', ----> 2 size=data_test.size) <ipython-input-8-e734e7606190> in get_masks(model, loader, mean_mask, mask_type, size, save, save_binary, task) 35 for param in model.parameters(): 36 param.requires_grad = False ---> 37 masks_pertrub = mp.get_masks(image, pred, model) 38 masks.append(masks_pertrub) 39 del image, masks_pertrub, pred <ipython-input-30-504ae2c1471c> in get_masks(self, img, pred, model) 92 loss = total_pred_loss / self.rep + rw * reg_loss 93 ---> 94 if epoch > 50 and loss.item() <= best_loss: 95 best_loss = loss.item() 96 best_mask = mask.clone().detach() KeyboardInterrupt:
!cd 10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data && ls
ground_truth_mask_sub-ADNI002S4262.nii.gz interpretation_gradcam_mask_mask_T1_sub-ADNI002S4262_ses-M60.nii.gz interpretation_guided_backprop_mask_T1_sub-ADNI002S4262_ses-M60.nii.gz interpretation_mean_pertrub_mask_T1_sub-ADNI002S4262_ses-M60.nii.gz sub-ADNI002S4262_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w_cn.nii.gz sub-ADNI002S4262_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz sub-ADNI002S4262_ses-M60_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w_ad.nii.gz sub-ADNI002S4262_ses-M60_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz
m_ad = '10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data/interpretation_mean_pertrub_mask_T1_sub-ADNI002S4262_ses-M60.nii.gz' meanp_ad = nib.load(m_ad) dataset_img = data_test.__getitem__(2)
fig, axes = plt.subplots(figsize=(16, 8)) # roi_img = nib.Nifti1Image(interp_img, affine=np.eye(4)) bim_img = nib.Nifti1Image(np.squeeze(dataset_img['image']).cpu().detach().numpy(), affine=np.eye(4)) plotting.plot_roi(meanp_ad,bim_img, axes=axes, colorbar=True, cmap='jet', threshold=0.35, title='AD') plt.show()
Image in a Jupyter notebook

Ground Truth

!pip install antspyx
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Collecting antspyx Downloading antspyx-0.3.3-cp37-cp37m-manylinux_2_24_x86_64.whl (319.4 MB) |████████████████████████████████| 319.4 MB 41 kB/s Requirement already satisfied: nibabel in /usr/local/lib/python3.7/dist-packages (from antspyx) (4.0.2) Collecting webcolors Downloading webcolors-1.12-py3-none-any.whl (9.9 kB) Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from antspyx) (1.3.5) Requirement already satisfied: scipy in /usr/local/lib/python3.7/dist-packages (from antspyx) (1.7.3) Requirement already satisfied: scikit-learn in /usr/local/lib/python3.7/dist-packages (from antspyx) (1.0.2) Requirement already satisfied: Pillow in /usr/local/lib/python3.7/dist-packages (from antspyx) (7.1.2) Requirement already satisfied: pyyaml in /usr/local/lib/python3.7/dist-packages (from antspyx) (6.0) Collecting chart-studio Downloading chart_studio-1.1.0-py3-none-any.whl (64 kB) |████████████████████████████████| 64 kB 2.6 MB/s Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from antspyx) (1.21.6) Requirement already satisfied: scikit-image in /usr/local/lib/python3.7/dist-packages (from antspyx) (0.18.3) Requirement already satisfied: matplotlib in /usr/local/lib/python3.7/dist-packages (from antspyx) (3.2.2) Requirement already satisfied: statsmodels in /usr/local/lib/python3.7/dist-packages (from antspyx) (0.12.2) Requirement already satisfied: plotly in /usr/local/lib/python3.7/dist-packages (from chart-studio->antspyx) (5.5.0) Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from chart-studio->antspyx) (2.23.0) Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from chart-studio->antspyx) (1.15.0) Collecting retrying>=1.3.3 Downloading retrying-1.3.3.tar.gz (10 kB) Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib->antspyx) (0.11.0) Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->antspyx) (1.4.4) Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->antspyx) (2.8.2) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->antspyx) (3.0.9) Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from kiwisolver>=1.0.1->matplotlib->antspyx) (4.1.1) Requirement already satisfied: packaging>=17.0 in /usr/local/lib/python3.7/dist-packages (from nibabel->antspyx) (21.3) Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from nibabel->antspyx) (57.4.0) Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas->antspyx) (2022.2.1) Requirement already satisfied: tenacity>=6.2.0 in /usr/local/lib/python3.7/dist-packages (from plotly->chart-studio->antspyx) (8.0.1) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->chart-studio->antspyx) (1.24.3) Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->chart-studio->antspyx) (3.0.4) Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->chart-studio->antspyx) (2.10) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->chart-studio->antspyx) (2022.6.15) Requirement already satisfied: imageio>=2.3.0 in /usr/local/lib/python3.7/dist-packages (from scikit-image->antspyx) (2.9.0) Requirement already satisfied: networkx>=2.0 in /usr/local/lib/python3.7/dist-packages (from scikit-image->antspyx) (2.6.3) Requirement already satisfied: PyWavelets>=1.1.1 in /usr/local/lib/python3.7/dist-packages (from scikit-image->antspyx) (1.3.0) Requirement already satisfied: tifffile>=2019.7.26 in /usr/local/lib/python3.7/dist-packages (from scikit-image->antspyx) (2021.11.2) Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn->antspyx) (1.1.0) Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from scikit-learn->antspyx) (3.1.0) Requirement already satisfied: patsy>=0.5 in /usr/local/lib/python3.7/dist-packages (from statsmodels->antspyx) (0.5.2) Building wheels for collected packages: retrying Building wheel for retrying (setup.py) ... done Created wheel for retrying: filename=retrying-1.3.3-py3-none-any.whl size=11447 sha256=1055393f83749bbb3a9bb53a38fa01cb2caec5cb2fb6518f065ec8f0270065d5 Stored in directory: /root/.cache/pip/wheels/f9/8d/8d/f6af3f7f9eea3553bc2fe6d53e4b287dad18b06a861ac56ddf Successfully built retrying Installing collected packages: retrying, webcolors, chart-studio, antspyx Successfully installed antspyx-0.3.3 chart-studio-1.1.0 retrying-1.3.3 webcolors-1.12
!pip install torchio
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Collecting torchio Downloading torchio-0.18.84-py2.py3-none-any.whl (172 kB) |████████████████████████████████| 172 kB 6.6 MB/s Requirement already satisfied: numpy>=1.15 in /usr/local/lib/python3.7/dist-packages (from torchio) (1.21.6) Requirement already satisfied: tqdm in /usr/local/lib/python3.7/dist-packages (from torchio) (4.64.1) Requirement already satisfied: nibabel in /usr/local/lib/python3.7/dist-packages (from torchio) (4.0.2) Requirement already satisfied: scipy in /usr/local/lib/python3.7/dist-packages (from torchio) (1.7.3) Requirement already satisfied: humanize in /usr/local/lib/python3.7/dist-packages (from torchio) (0.5.1) Requirement already satisfied: torch>=1.1 in /usr/local/lib/python3.7/dist-packages (from torchio) (1.12.1+cu113) Collecting Deprecated Downloading Deprecated-1.2.13-py2.py3-none-any.whl (9.6 kB) Requirement already satisfied: click in /usr/local/lib/python3.7/dist-packages (from torchio) (7.1.2) Collecting SimpleITK!=2.0.*,!=2.1.1.1 Downloading SimpleITK-2.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (52.8 MB) |████████████████████████████████| 52.8 MB 153 kB/s Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from torch>=1.1->torchio) (4.1.1) Requirement already satisfied: wrapt<2,>=1.10 in /usr/local/lib/python3.7/dist-packages (from Deprecated->torchio) (1.14.1) Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from nibabel->torchio) (57.4.0) Requirement already satisfied: packaging>=17.0 in /usr/local/lib/python3.7/dist-packages (from nibabel->torchio) (21.3) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=17.0->nibabel->torchio) (3.0.9) Installing collected packages: SimpleITK, Deprecated, torchio Successfully installed Deprecated-1.2.13 SimpleITK-2.2.0 torchio-0.18.84
/usr/local/lib/python3.7/dist-packages/google/colab/_pip.py:83: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/local/lib/python3.7/dist-packages/Deprecated-1.2.13.dist-info/top_level.txt' mode='r' encoding='UTF-8'> /usr/local/lib/python3.7/dist-packages/google/colab/_pip.py:83: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/local/lib/python3.7/dist-packages/SimpleITK-2.2.0.dist-info/top_level.txt' mode='r' encoding='UTF-8'> /usr/local/lib/python3.7/dist-packages/google/colab/_pip.py:83: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/local/lib/python3.7/dist-packages/torchio-0.18.84.dist-info/top_level.txt' mode='r' encoding='UTF-8'>
import ants import torchio as tio from torchio.transforms import HistogramStandardization
ad = f'10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data/sub-ADNI002S4262_ses-M60_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz' cn = f'10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data/sub-ADNI002S4262_ses-M00_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz' ad_img = nib.load(ad) cn_img = nib.load(cn)
ref = ants.image_read(ad) cn_caps = ants.image_read(cn) cn_to_ref_caps = ants.registration(ref, cn_caps,'Rigid') # mask_to_ref = ants.apply_transforms(ref, mask, transformlist = [ad_to_ref['fwdtransforms'][0]]) # ants.image_write(mask_to_ref, 'mask_ad_to_ref.nii.gz', ri=False) cn_reg_caps = ants.apply_transforms(ref, cn_caps,transformlist = [cn_to_ref_caps['fwdtransforms'][0]]) ants.image_write(cn_reg_caps, os.path.join(f'cn_00_to_ref_ad_60_wo_skull.nii.gz'), ri=False) ants.plot(cn_reg_caps)
Image in a Jupyter notebook
cn_hist = f'cn_00_to_ref_ad_60_wo_skull.nii.gz' ad_hist = f'10_sub_for_validation/10_sub_for_validation/sub-ADNI002S4262/raw_data/sub-ADNI002S4262_ses-M60_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz' data = [ad_hist,cn_hist] landmarks = HistogramStandardization.train(data) hist_standardize = tio.HistogramStandardization({'mri':landmarks}) subjects_list = [] for each in data: subject = tio.Subject( mri=tio.ScalarImage(each) ) subjects_list.append(subject) for i, sample in enumerate(subjects_list): transformed = hist_standardize(sample) print(str(transformed.mri.path).split('/')[-1]) transformed.mri.save('hist_{}'.format(str(transformed.mri.path).split('/')[-1]))
sub-ADNI002S4262_ses-M60_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz
/usr/local/lib/python3.7/dist-packages/SimpleITK/extra.py:183: DeprecationWarning: Converting `np.character` to a dtype is deprecated. The current result is `np.dtype(np.str_)` which is not strictly correct. Note that `np.character` is generally deprecated and 'S1' should be used.
cn_00_to_ref_ad_60_wo_skull.nii.gz
!ls
10_sub_for_validation cn_00_to_ref_ad_60_wo_skull.nii.gz drive grad_cam_mean.png hist_cn_00_to_ref_ad_60_wo_skull.nii.gz hist_sub-ADNI002S4262_ses-M60_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz sample_data
hist_cn = nib.load(f'hist_cn_00_to_ref_ad_60_wo_skull.nii.gz') hist_ad = nib.load(f'hist_sub-ADNI002S4262_ses-M60_T1w_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_T1w.nii.gz')
np.sum(hist_cn.dataobj)
111505130.0
fig, axes = plt.subplots(figsize=(10,5)) # roi_img = nib.Nifti1Image(mask_cn.dataobj, affine=np.eye(4)) # bim_img = nib.Nifti1Image(diff_ad_cn,affine=ad_img.affine) plotting.plot_roi(hist_ad, axes=axes,colorbar=True,cmap='gray') plt.show()
/usr/local/lib/python3.7/dist-packages/nilearn/plotting/img_plotting.py:300: FutureWarning: Default resolution of the MNI template will change from 2mm to 1mm in version 0.10.0
Image in a Jupyter notebook
diff_hist_cn_ad = np.array(hist_cn.dataobj) - np.array(hist_ad.dataobj) diff_hist_cn_ad = diff_hist_cn_ad.astype('int16')
diff_hist_cn_ad.min(), diff_hist_cn_ad.max(), np.array(hist_ad.dataobj).min(), np.array(hist_ad.dataobj).max()
(-128, 139, 0.0, 193.62924)
fig, axes = plt.subplots(figsize=(10,5)) # roi_img = nib.Nifti1Image(mask_cn.dataobj, affine=np.eye(4)) bim_img = nib.Nifti1Image(diff_hist_cn_ad,affine=hist_ad.affine) plotting.plot_roi(bim_img,hist_ad, axes=axes,colorbar=True,cmap='jet') plt.show()
Image in a Jupyter notebook
diff_hist_cn_ad[diff_hist_cn_ad < 0] = 0
fig, axes = plt.subplots(figsize=(10,5)) # roi_img = nib.Nifti1Image(mask_cn.dataobj, affine=np.eye(4)) bim_img = nib.Nifti1Image(diff_hist_cn_ad,affine=hist_ad.affine) plotting.plot_roi(bim_img,hist_ad, axes=axes,colorbar=True,cmap='jet') plt.show()
Image in a Jupyter notebook