<jupyter_start><jupyter_text>Load GraphFunction to load from to memory<jupyter_code>def load_graph(graph_file):
    """Loads a frozen inference graph"""
    graph = tf.Graph()
    with graph.as_default():
        od_graph_def = tf.GraphDef()
        with tf.gfile.GFile(graph_file, 'rb') as fid:
            serialized_graph = fid.read()
            od_graph_def.ParseFromString(serialized_graph)
            tf.import_graph_def(od_graph_def, name='')
    return graph


def load_image_into_numpy_array(image):
    (im_width, im_height) = image.size
    return np.array(image.getdata()).reshape((im_height, im_width, 3)).astype(np.uint8)<jupyter_output><empty_output><jupyter_text>Paths to Dataset and Saved Models<jupyter_code>PATH_TO_GRAPH = 'output_models/frozen_inference_graph.pb' ## load SSD trained on udacity's parking lot images
PATH_TO_LABELS = '/Users/neil_panchal/Desktop/Udacity/alex-lechner-udacity-traffic-light-dataset/udacity_label_map.pbtxt'
NUM_CLASSES = 4
detection_graph = load_graph(PATH_TO_GRAPH)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10772163965681601, 'fraction_numerical': 0.002859866539561487, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '593346', 'license': 'MIT', 'n_tokens_mistral': 385, 'n_tokens_neox': 370, 'n_words': 60, 'path': '.ipynb_checkpoints/Untitled-checkpoint.ipynb', 'repo_name': 'float168/CarND-Capstone', 'size': '1049'}