CASED-Tensorflow

Tensorflow implementation of Curriculum Adaptive Sampling for Extreme Data Imbalance with multi GPU using LUNA16

Preprocessing Tutorial

Usage for preprocessing

> python all_in_one.py

Usage for train

> python main_train.py

Usage for test

> python main_test.py

Issue

snapshot

def Snapshot(t, T, M, alpha_zero) :
    """
    t = # of current iteration
    T = # of total iteration
    M = # of snapshot
    alpha_zero = init learning rate
    """

    x = (np.pi * (t % (T // M))) / (T // M)
    x = np.cos(x) + 1

    lr = (alpha_zero / 2) * x

    return lr

Summary

Preprocessing

Data augmentation

If you want to do augmentation, see this link

Network Architecture

network

Algorithm

framework

p_x = 1.0

for i in iteration :
    p = uniform(0,1)

    if p <= p_x :
        g_n_index = np.random.choice(N, size=batch_size, replace=False)
        batch_patch = nodule_patch[g_n_index]
        batch_y = nodule_patch_y[g_n_index]

    else :
        predictor_dict = Predictor(all_patch) # key = index, value = loss
        g_r_index = nlargest(batch_size, predictor_dict, key=predictor_dict.get)

        batch_patch = all_patch[g_r_index]
        batch_y = all_patch_y[g_r_index]

    p_x *= pow(1/M, 1/iteration)

Result

result2

Author

Junho Kim / @Lunit