From 77d555145b351d032d6069c3dbabb81abe496151 Mon Sep 17 00:00:00 2001 From: Biswajit Rana <101043264+biswajit-github-2022@users.noreply.github.com> Date: Mon, 3 Jun 2024 23:59:37 +0530 Subject: [PATCH] Update 076-077-078-Unet_nuclei_tutorial.py --- 076-077-078-Unet_nuclei_tutorial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/076-077-078-Unet_nuclei_tutorial.py b/076-077-078-Unet_nuclei_tutorial.py index 5ce0ec3d0..66a96013b 100644 --- a/076-077-078-Unet_nuclei_tutorial.py +++ b/076-077-078-Unet_nuclei_tutorial.py @@ -37,7 +37,7 @@ test_ids = next(os.walk(TEST_PATH))[1] X_train = np.zeros((len(train_ids), IMG_HEIGHT, IMG_WIDTH, IMG_CHANNELS), dtype=np.uint8) -Y_train = np.zeros((len(train_ids), IMG_HEIGHT, IMG_WIDTH, 1), dtype=np.bool) +Y_train = np.zeros((len(train_ids), IMG_HEIGHT, IMG_WIDTH, 1), dtype=np.bool_) print('Resizing training images and masks') for n, id_ in tqdm(enumerate(train_ids), total=len(train_ids)): @@ -45,7 +45,7 @@ img = imread(path + '/images/' + id_ + '.png')[:,:,:IMG_CHANNELS] img = resize(img, (IMG_HEIGHT, IMG_WIDTH), mode='constant', preserve_range=True) X_train[n] = img #Fill empty X_train with values from img - mask = np.zeros((IMG_HEIGHT, IMG_WIDTH, 1), dtype=np.bool) + mask = np.zeros((IMG_HEIGHT, IMG_WIDTH, 1), dtype=np.bool_) for mask_file in next(os.walk(path + '/masks/'))[2]: mask_ = imread(path + '/masks/' + mask_file) mask_ = np.expand_dims(resize(mask_, (IMG_HEIGHT, IMG_WIDTH), mode='constant',