Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lime/lime_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import numpy as np
import sklearn
from sklearn.utils import check_random_state
from skimage.color import gray2rgb
from skimage.color import gray2rgb, rgb2gray
from tqdm.auto import tqdm


Expand Down Expand Up @@ -261,7 +261,7 @@ def data_labels(self,
for z in zeros:
mask[segments == z] = True
temp[mask] = fudged_image[mask]
imgs.append(temp)
imgs.append(rgb2gray(temp).reshape(temp.shape[0], temp.shape[1], 1))
if len(imgs) == batch_size:
preds = classifier_fn(np.array(imgs))
labels.extend(preds)
Expand Down