ct_segnet/train_utils.py
def fidelity(y_true, y_pred, tolerance = 0.95):
    """Fidelity is number of images with IoU > tolerance
    """

    XY = [(y_true[ii], y_pred[ii]) for ii in range(y_true.shape[0])]
    del y_true
    del y_pred
    
    jac_acc = np.asarray(Parallelize(XY, calc_jac_acc, procs = cpu_count()))
    
    mean_IoU = np.mean(jac_acc)

    jac_fid = np.zeros_like(jac_acc)
    jac_fid[jac_acc > tolerance] = 1
    jac_fid = np.sum(jac_fid).astype(np.float32) / np.size(jac_acc)
    
    
    return jac_fid, mean_IoU, jac_acc
Fidelity is number of images with IoU > tolerance
    
Fidelity is number of images with IoU > tolerance
Fidelity is number of images with IoU > tolerance
def fidelity(y_true, y_pred, tolerance = 0.95):
    XY = [(y_true[ii], y_pred[ii]) for ii in range(y_true.shape[0])]
    del y_true
    del y_pred
    jac_acc = np.asarray(Parallelize(XY, calc_jac_acc, procs = cpu_count()))
    mean_IoU = np.mean(jac_acc)
    jac_fid = np.zeros_like(jac_acc)
    jac_fid[jac_acc > tolerance] = 1
    jac_fid = np.sum(jac_fid).astype(np.float32) / np.size(jac_acc)
    return jac_fid, mean_IoU, jac_acc
def fidelity ( y_true , y_pred , tolerance = 0.95 ) : XY = [ ( y_true [ ii ] , y_pred [ ii ] ) for ii in range ( y_true . shape [ 0 ] ) ] del y_true del y_pred jac_acc = np . asarray ( Parallelize ( XY , calc_jac_acc , procs = cpu_count ( ) ) ) mean_IoU = np . mean ( jac_acc ) jac_fid = np . zeros_like ( jac_acc ) jac_fid [ jac_acc > tolerance ] = 1 jac_fid = np . sum ( jac_fid ) . astype ( np . float32 ) / np . size ( jac_acc ) return jac_fid , mean_IoU , jac_acc
Fidelity is number of images with IoU > tolerance
Fidelity is number of images with IoU > tolerance
"""Fidelity is number of images with IoU > tolerance
    """
y_true
y_pred
tolerance