This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import seaborn as sns | |
def plot_cm(cm, | |
xlabs, | |
ylabs, | |
data_range=[0.0, 0.2, 0.4, 0.6, 0.8, 1.0], | |
title="Confusion Matrix", | |
xlabel="Predicted Labels", | |
ylabel="Actual Labels", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from glob import glob | |
import os.path as path | |
from PIL import Image | |
def convert(img): | |
'''Convert an RGBA image to an RGB image | |
If the passed image has: | |
img.mode == 'RGBA' | |
then it will be converted to RGB. |