def get_scene_graph_of_image(id=2001): """ Get Scene Graph of an image. """ image = get_image_data(id=id) data = utils.retrieve_data('/api/v0/images/' + str(id) + '/graph') if 'detail' in data and data['detail'] == 'Not found.': return None return utils.parse_graph(data, image)
def get_scene_graph_of_image(id=61512): """ Get Scene Graph of an image. """ image = get_image_data(id=id) data = utils.retrieve_data("/api/v0/images/" + str(id) + "/graph") if "detail" in data and data["detail"] == "Not found.": return None return utils.parse_graph(data, image)
def get_scene_graph_of_image(id=61512): """ Get Scene Graph of an image. """ image = get_image_data(id=id) data = utils.retrieve_data('/api/v0/images/' + str(id) + '/graph') if 'detail' in data and data['detail'] == 'Not found.': return None return utils.parse_graph(data, image)
def get_region_graph_of_region(image_id=61512, region_id=1): """ Get Region Graph of a particular Region in an image. """ image = get_image_data(id=image_id) data = utils.retrieve_data("/api/v0/images/" + str(image_id) + "/regions/" + str(region_id)) if "detail" in data and data["detail"] == "Not found.": return None return utils.parse_graph(data[0], image)
def get_region_graph_of_region(image_id=61512, region_id=1): """ Get Region Graph of a particular Region in an image. """ image = get_image_data(id=image_id) data = utils.retrieve_data('/api/v0/images/' + str(image_id) + '/regions/' + str(region_id)) if 'detail' in data and data['detail'] == 'Not found.': return None return utils.parse_graph(data[0], image)
def get_region_graph_of_region(image_id=61512, region_id=1): """ Get Region Graph of a particular Region in an image. """ image = get_image_data(id=image_id) data = utils.retrieve_data( '/api/v0/images/' + str(image_id) + '/regions/' + str(region_id)) if 'detail' in data and data['detail'] == 'Not found.': return None return utils.parse_graph(data[0], image)