text stringlengths 1 93.6k |
|---|
feed_dict={
|
J_in: X_input_J,
|
P_in: X_input_P,
|
B_in: X_input_B,
|
})
|
gal_features_all_int.extend(Seq_features_int.tolist())
|
gal_features_all.extend(Seq_features.tolist())
|
gal_features_all_P.extend(Seq_features_P.tolist())
|
gal_features_all_B.extend(Seq_features_B.tolist())
|
# gal_features_tea.extend(rep_tea_.tolist())
|
gal_labels_all.extend(labels.tolist())
|
tr_step += 1
|
return gal_features_all_int, gal_features_all, gal_features_all_P, gal_features_all_B, gal_labels_all
|
def evaluation():
|
vl_step = 0
|
vl_size = X_test_J.shape[0]
|
pro_labels_all = []
|
pro_features_all = []
|
pro_features_tea = []
|
pro_features_tea_2 = []
|
vl_step = 0
|
vl_size = X_test_J.shape[0]
|
pro_labels_all = []
|
pro_features_all_int = []
|
pro_features_all = []
|
pro_features_all_P = []
|
pro_features_all_B = []
|
while vl_step * batch_size < vl_size:
|
if (vl_step + 1) * batch_size > vl_size:
|
break
|
X_input_J = X_test_J[vl_step * batch_size:(vl_step + 1) * batch_size]
|
X_input_P = X_test_P[vl_step * batch_size:(vl_step + 1) * batch_size]
|
X_input_B = X_test_B[vl_step * batch_size:(vl_step + 1) * batch_size]
|
X_input_J = X_input_J.reshape([-1, joint_num, 3])
|
X_input_P = X_input_P.reshape([-1, 10, 3])
|
X_input_B = X_input_B.reshape([-1, 5, 3])
|
labels = y_test[vl_step * batch_size:(vl_step + 1) * batch_size]
|
[Seq_features_int, Seq_features, Seq_features_P, Seq_features_B] = sess.run(
|
[seq_ftr_int, seq_ftr, seq_ftr_P, seq_ftr_B],
|
feed_dict={
|
J_in: X_input_J,
|
P_in: X_input_P,
|
B_in: X_input_B,
|
})
|
pro_labels_all.extend(labels.tolist())
|
pro_features_all_int.extend(Seq_features_int.tolist())
|
pro_features_all.extend(Seq_features.tolist())
|
pro_features_all_P.extend(Seq_features_P.tolist())
|
pro_features_all_B.extend(Seq_features_B.tolist())
|
vl_step += 1
|
X = np.array(gal_features_all)
|
X_int = np.array(gal_features_all_int)
|
X_P = np.array(gal_features_all_P)
|
X_B = np.array(gal_features_all_B)
|
y = np.array(gal_labels_all)
|
t_X = np.array(pro_features_all)
|
t_X_int = np.array(pro_features_all_int)
|
t_X_P = np.array(pro_features_all_P)
|
t_X_B = np.array(pro_features_all_B)
|
t_y = np.array(pro_labels_all)
|
t_y = np.argmax(t_y, axis=-1)
|
y = np.argmax(y, axis=-1)
|
def mean_ap(distmat, query_ids=None, gallery_ids=None,
|
query_cams=None, gallery_cams=None):
|
# distmat = to_numpy(distmat)
|
m, n = distmat.shape
|
# Fill up default values
|
if query_ids is None:
|
query_ids = np.arange(m)
|
if gallery_ids is None:
|
gallery_ids = np.arange(n)
|
if query_cams is None:
|
query_cams = np.zeros(m).astype(np.int32)
|
if gallery_cams is None:
|
gallery_cams = np.ones(n).astype(np.int32)
|
# Ensure numpy array
|
query_ids = np.asarray(query_ids)
|
gallery_ids = np.asarray(gallery_ids)
|
query_cams = np.asarray(query_cams)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.