0
$\begingroup$

Below is the code I'm using for segmentation mask prediction after using fit_generator(...) on model named m :-

test_datagen = ImageDataGenerator(rescale=1./255)  

test_generator.reset()

test_generator =test_datagen.flow_from_directory('result/test', class_mode=None,seed=1, color_mode="grayscale",target_size=(256,256),batch_size=1)

results = m.predict_generator(test_generator,steps=17, verbose=1)  

It runs without any errors but how do I visualise the predicted segmentation masks from results?

$\endgroup$
0
$\begingroup$

Okay, I checked that m.predict_generator returns a numpy array so I just plotted it using plt.imshow(). Obviously I'd to do some slicing and squeeze on it.

Sorry if it was too trivial

$\endgroup$
1
  • $\begingroup$ Would still love to hear others opinions $\endgroup$ – Adarsh Kumar Feb 28 '20 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.