In [1]:
%load_ext autoreload
%autoreload 2
import cPickle as pickle
import os; import sys; sys.path.append('..')
import gp
import gp.nets as nets
from nolearn.lasagne.visualize import plot_loss
from nolearn.lasagne.visualize import plot_conv_weights
from nolearn.lasagne.visualize import plot_conv_activity
from nolearn.lasagne.visualize import plot_occlusion
from sklearn.metrics import classification_report, accuracy_score, roc_curve, auc, precision_recall_fscore_support, f1_score, precision_recall_curve, average_precision_score, zero_one_loss
from matplotlib.pyplot import imshow
import matplotlib.pyplot as plt
%matplotlib inline
In [2]:
NETS = []
NETS.append('../nets/IP_FULL.p') # image + prob
NETS.append('../nets/IPLB_FULL.p') # image + large border
NETS.append('../nets/IPM_FULL.p') # image + prob + binary
NETS.append('../nets/IPMB_FULL.p') # image + prob + binary + border
NETS.append('../nets/IPMLB_FULL.p') # image + prob + binary + large border
network_path = NETS[-1]
with open(network_path, 'rb') as f:
net = pickle.load(f)
In [4]:
input_image, input_prob, input_gold, input_rhoana, dojo_bbox = gp.Legacy.read_dojo_data()
original_mean_VI, original_median_VI, original_VI_s = gp.Legacy.VI(input_gold, input_rhoana)
In [5]:
net.uuid = 'IPMLB'
In [ ]:
In [41]:
bigM_dojo = gp.Legacy.create_bigM_without_mask(net, input_image[2:3], input_prob[2:3], input_rhoana[2:3], verbose=False, oversampling=True)
In [ ]:
In [ ]:
In [43]:
bigM_dojo[0][5,6]
Out[43]:
In [46]:
bigM_dojo_after, out_dojo_volume_after_sim_user, dojo_sim_user_fixes, dojo_sim_user_vi_s, vi_s_per_step2 = gp.Legacy.splits_global_from_M(
net, bigM_dojo, input_image[2:3], input_prob[2:3], input_rhoana[2:3], input_gold[2:3], hours=.5)
In [47]:
vi_s_per_step2
Out[47]:
In [ ]: