diff --git a/modules/deeplearning/cloud_fraction_fcn_viirs.py b/modules/deeplearning/cloud_fraction_fcn_viirs.py index 46761e21d62002f09bb447c2f3ff4ea960adb5a9..c487dc8b89333acfc120b7ba463f2b8cbb686dd7 100644 --- a/modules/deeplearning/cloud_fraction_fcn_viirs.py +++ b/modules/deeplearning/cloud_fraction_fcn_viirs.py @@ -1042,6 +1042,28 @@ def analyze_5cat(file): return cm_0_1, cm_1_2, cm_0_2, [acc_0, acc_1, acc_2], [recall_0, recall_1, recall_2],\ [precision_0, precision_1, precision_2], [mcc_0, mcc_1, mcc_2], lbls, pred +# from util.plot_cm import * +# from sklearn.metrics import confusion_matrix +# import numpy as np +# tup = np.load('/Users/tomrink/cld_frac_viirs.npy', allow_pickle=True) +# lbls = tup[0] +# pred = tup[1] +# cld_prob = tup[2] +# from util.plot import plot_image +# cm = confusion_matrix(lbls.flatten(), pred.flatten()) +# plot_confusion_matrix(cm, ['CLR', '1/4', '1/2', '3/4', 'CLD'], normalize=True, axis=0) + +# from deeplearning.cloud_fraction_fcn_viirs import run_evaluate_static +# run_evaluate_static('/Users/tomrink/clavrx_VNP02IMG.A2019306.1912.001.2019307003236.uwssec.nc', +# '/Users/tomrink/cld_frac_A2019306.1912', '/Users/tomrink/tf_model_cld_frac_viirs/run-20230421193944/') +# import numpy as np +# tup = np.load('/Users/tomrink/cld_frac_A2019306.1912.npy', allow_pickle=True) +# cfrac = tup[0] +# bt = tup[1] +# refl = tup[2] +# cp = tup[3] +# from util.plot import plot_image + if __name__ == "__main__": nn = SRCNN()