示例#1
0
def json_tree_reconstruction(img_id):
    '''
    Retrieve the reconstruction for a particular path

    # Args
        img_id: Name of image
    '''
    path_id = request.args.get('path_id', None)
    path = get_path(path_id)
    recons = get_vis_tree(net_id, img_id).reconstruction(path)
    return send_img(recons, 'recon_{}.jpg'.format(path_id))
示例#2
0
def json_tree_reconstruction(img_id):
    '''
    Retrieve the reconstruction for a particular path

    # Args
        img_id: Name of image
    '''
    path_id = request.args.get('path_id', None)
    path = get_path(path_id)
    recons = get_vis_tree(net_id, img_id).reconstruction(path)
    return send_img(recons, 'recon_{}.jpg'.format(path_id))
示例#3
0
def json_tree_children(img_id):
    '''
    Retrieve the info of a node's children.

    # Args
        img_id: Name of image
    '''
    path_id = request.args.get('path_id', None)
    path = get_path(path_id)
    tree = get_vis_tree(net_id, img_id)
    children = tree.children_from_path(path)
    for child in children:
        child['path_id'] = get_path_id(child['path'])
    return jsonify({'children': children})
示例#4
0
def json_tree_children(img_id):
    '''
    Retrieve the info of a node's children.

    # Args
        img_id: Name of image
    '''
    path_id = request.args.get('path_id', None)
    path = get_path(path_id)
    tree = get_vis_tree(net_id, img_id)
    children = tree.children_from_path(path)
    for child in children:
        child['path_id'] = get_path_id(child['path'])
    return jsonify({'children': children})