From 69e8373ce2f60d1dbe2383fb0f586363e5e45d1c Mon Sep 17 00:00:00 2001 From: osmr Date: Thu, 4 Jul 2019 23:01:36 +0300 Subject: [PATCH] Working on ImgMch, 3 --- gluon/datasets/hpatches_mch_dataset.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gluon/datasets/hpatches_mch_dataset.py b/gluon/datasets/hpatches_mch_dataset.py index 8c8f49a7c..264bd45f0 100644 --- a/gluon/datasets/hpatches_mch_dataset.py +++ b/gluon/datasets/hpatches_mch_dataset.py @@ -59,8 +59,10 @@ def __init__(self, def __getitem__(self, index): # image = cv2.imread(self.image_paths[index], flags=cv2.IMREAD_GRAYSCALE) # warped_image = cv2.imread(self.warped_image_paths[index], flags=cv2.IMREAD_GRAYSCALE) - image = mx.image.imread(self.image_paths[index], flag=0) - warped_image = mx.image.imread(self.warped_image_paths[index], flag=0) + # image = mx.image.imread(self.image_paths[index], flag=0) + # warped_image = mx.image.imread(self.warped_image_paths[index], flag=0) + image = mx.nd.array(cv2.imread(self.image_paths[index], flags=0)) + warped_image = mx.nd.array(cv2.imread(self.warped_image_paths[index], flags=0)) homography = mx.nd.array(self.homographies[index]) if self.transform is not None: