//  [python]
def compute_point(model, normed_im1, norm_info_1, normed_im2, norm_info_2):
    cuda_device = torch.device('cuda:' + str(0))
    emb1 = get_embedding(normed_im1, model)
    emb2 = get_embedding(normed_im2, model)

    shape1 = emb1[0].shape
    shape2 = emb2[0].shape
    img_1 = torch.tensor(emb1[2]).to(cuda_device)
    processed_1_img_downsample = t.upsample(img_1, size=shape1[2:], mode='trilinear')
    body_index = torch.where(processed_1_img_downsample > -25)
    z_min = body_index[2].min()
    z_max = body_index[2].max()
    y_min = body_index[3].min()
    y_max = body_index[3].max()
    x_min = body_index[4].min()
    x_max = body_index[4].max()

    x_strid = 12
    y_strid = 12
    z_strid = 8
    all_points_part1 = []  # 4 mini-batches because of  GPU memory limitation
    all_points_part2 = []
    all_points_part3 = []
    all_points_part4 = []
    for i in range(x_min, x_max, x_strid):
        for j in range(y_min, y_max, y_strid):
            for k in range(z_min+1, z_max, z_strid):
                all_points_part1.append([i, j, k])
    all_points_part1 = np.array(all_points_part1)
    for i in range(x_min + 5, x_max, x_strid):
        for j in range(y_min + 5, y_max, y_strid):
            for k in range(z_min + 4, z_max, z_strid):
                all_points_part2.append([i, j, k])
    all_points_part2 = np.array(all_points_part2)
    for i in range(x_min, x_max, x_strid):
        for j in range(y_min, y_max, y_strid):
            for k in range(z_min + 4, z_max, z_strid):
                all_points_part3.append([i, j, k])
    all_points_part3 = np.array(all_points_part3)
    for i in range(x_min + 5, x_max, x_strid):
        for j in range(y_min + 5, y_max, y_strid):
            for k in range(z_min+1, z_max, z_strid):
                all_points_part4.append([i, j, k])
    all_points_part4 = np.array(all_points_part4)

    its = 1
    for iter in range(its):
        if iter % 2 == 0:
            if iter == 0:
                q_loc_part1 = all_points_part1
            k_loc_part1, k_score_part1 = get_sim_embed_loc_multi_embedding_space(emb1, emb2, q_loc_part1, cuda_device)
            print(k_score_part1.mean())
        else:
            q_loc_part1, q_score_part1 = get_sim_embed_loc_multi_embedding_space(emb2, emb1, k_loc_part1, cuda_device)

    for iter in range(its):
        if iter % 2 == 0:
            if iter == 0:
                q_loc_part2 = all_points_part2
            k_loc_part2, k_score_part2 = get_sim_embed_loc_multi_embedding_space(emb1, emb2, q_loc_part2, cuda_device)
            print(k_score_part2.mean())
        else:
            q_loc_part2, q_score_part2 = get_sim_embed_loc_multi_embedding_space(emb2, emb1, k_loc_part2, cuda_device)

    for iter in range(its):
        if iter % 2 == 0:
            if iter == 0:
                q_loc_part3 = all_points_part3
            k_loc_part3, k_score_part3 = get_sim_embed_loc_multi_embedding_space(emb1, emb2, q_loc_part3, cuda_device)
            print(k_score_part3.mean())
        else:
            q_loc_part3, q_score_part3 = get_sim_embed_loc_multi_embedding_space(emb2, emb1, k_loc_part3, cuda_device)
    for iter in range(its):
        if iter % 2 == 0:
            if iter == 0:
                q_loc_part4 = all_points_part4
            k_loc_part4, k_score_part4 = get_sim_embed_loc_multi_embedding_space(emb1, emb2, q_loc_part4, cuda_device)
            print(k_score_part4.mean())
        else:
            q_loc_part4, q_score_part4 = get_sim_embed_loc_multi_embedding_space(emb2, emb1, k_loc_part4, cuda_device)

    q_loc = np.concatenate([q_loc_part1, q_loc_part2, q_loc_part3, q_loc_part4], axis=0)
    k_loc = np.concatenate([k_loc_part1, k_loc_part2, k_loc_part3, k_loc_part4], axis=0)
    k_score = np.concatenate([k_score_part1, k_score_part2, k_score_part3, k_score_part4], axis=0)
    print(k_score.mean(),k_score.max())
    q_loc = q_loc[k_score > s_thres, :]
    k_loc = k_loc[k_score > s_thres, :]
    q_loc = q_loc[:, ::-1].transpose(1, 0)
    k_loc = k_loc[:, ::-1].transpose(1, 0)
    q_loc = q_loc * 2 + 0.5  # zyx
    k_loc = k_loc * 2 + 0.5
    q_loc_origin = (q_loc.transpose(1, 0) / norm_info_1[::-1]).transpose(1, 0)
    k_loc_origin = (k_loc.transpose(1, 0) / norm_info_2[::-1]).transpose(1, 0)
    return q_loc, k_loc, q_loc_origin, k_loc_origin