Skip to content

Instantly share code, notes, and snippets.

%%
%
% This is a script for reading the labelme annotations and outputing a
% dataset that can be used for training a CNN. It is specifically designed
% to work with KittiSeg network which uses annotation images with color
% masks denoting the labels.
%
%#ok<*AGROW>
%
%% Read the images and annotations
import commentjson
import os
import sys
import collections
import numpy as np
import scipy as scp
import scipy.misc
import tensorflow as tf
import tensorflow as tf
import scipy.misc
from timeit import default_timer as timer
import cv2
import numpy as np
def load_graph(frozen_graph_filename):
# We load the protobuf file from the disk and parse it to retrieve the
# unserialized graph_def