Exemplo n.º 1
0
    N=5,
    remove_baseline=True,
    dview=dview,
    robust_std=False,
    Athresh=0.1,
    thresh_C=0.3,
    num_traces_per_group=20)
#%%
from caiman.components_evaluation import evaluate_components_CNN
predictions, final_crops = evaluate_components_CNN(
    A, dims, gSig, model_name='use_cases/CaImAnpaper/cnn_model')
#%%
threshold = .95
from caiman.utils.visualization import matrixMontage
pl.figure()
matrixMontage(
    np.squeeze(final_crops[np.where(predictions[:, 1] >= threshold)[0]]))
pl.figure()
matrixMontage(
    np.squeeze(final_crops[np.where(predictions[:, 0] >= threshold)[0]]))
#%%
thresh = .95
idx_components_cnn = np.where(predictions[:, 1] >= thresh)[0]

print(' ***** ')
print((len(final_crops)))
print((len(idx_components_cnn)))
#print((len(idx_blobs)))
#%
idx_components_r = np.where((r_values >= .99))[0]
idx_components_raw = np.where(fitness_raw < -60)[0]
idx_components_delta = np.where(fitness_delta < -60)[0]
Exemplo n.º 2
0
Npeaks = 10
traces = C + YrA

idx_components, idx_components_bad, fitness_raw, fitness_delta, r_values = cm.components_evaluation.estimate_components_quality(traces, Y, A, C, b, f, final_frate=final_frate,
                                                                                                                                Npeaks=10, r_values_min=.85,
                                                                                                                                fitness_min=-30, fitness_delta_min=-30, return_all=True, N=5,
                                                                                                                                remove_baseline=True, dview=dview, robust_std=False, Athresh=0.1, thresh_C=0.3, num_traces_per_group=20)
#%%
from caiman.components_evaluation import evaluate_components_CNN
predictions, final_crops = evaluate_components_CNN(
    A, dims, gSig, model_name='model/cnn_model')
#%%
threshold = .95
from caiman.utils.visualization import matrixMontage
pl.figure()
matrixMontage(np.squeeze(
    final_crops[np.where(predictions[:, 1] >= threshold)[0]]))
pl.figure()
matrixMontage(np.squeeze(
    final_crops[np.where(predictions[:, 0] >= threshold)[0]]))
#%%
thresh = .95
idx_components_cnn = np.where(predictions[:, 1] >= thresh)[0]

print(' ***** ')
print((len(final_crops)))
print((len(idx_components_cnn)))
# print((len(idx_blobs)))
#%
idx_components_r = np.where((r_values >= .99))[0]
idx_components_raw = np.where(fitness_raw < -60)[0]
idx_components_delta = np.where(fitness_delta < -60)[0]