Esempio n. 1
0
parser.add_argument('--batch-size',
                    type=int,
                    default=20,
                    metavar='N',
                    help='input batch size for training (default: 64)')

args = parser.parse_args()

rows = np.int(np.ceil(np.sqrt(args.batch_size)))
cols = np.int(np.ceil(args.batch_size / rows))

#SUNRGBD_dataset = read_sunrgbd_data.dataset("SUNRGBD","/data/ahanda/sunrgbd-meta-data/sunrgbd_rgb_training.txt")
#SUNRGBD_dataset = read_sunrgbd_data.dataset("SUNRGBD","/data/workspace/sunrgbd-meta-data/sunrgbd_rgb_training.txt")
SUNRGBD_dataset = read_sunrgbd_data.dataset(
    "SUNRGBD",
    # "/data/ahanda/code/baxter_data_renderer/data/multijtdata/baxter_babbling_rarm_3.5hrs_Dec14_16/postprocessmotions/motion0",
    "/se3netsproject/data/multijtdata/baxter_babbling_rarm_3.5hrs_Dec14_16/postprocessmotions/motion0",
    img_type='depth')

# SUNRGBD_dataset = read_sunrgbd_data.dataset("SUNRGBD","/Users/ankurhanda/workspace/code/sunrgbd-meta-data/sunrgbd_training.txt")

max_labels = 23

#inspired by http://jdherman.github.io/colormap/
# colour_code = [(0, 0, 0),(0,0,1),(0.9137,0.3490,0.1882), (0, 0.8549, 0),
#                (0.5843,0,0.9412),(0.8706,0.9451,0.0941),(1.0000,0.8078,0.8078),
#                (0,0.8784,0.8980),(0.4157,0.5333,0.8000),(0.4588,0.1137,0.1608),
#                (0.9412,0.1373,0.9216),(0,0.6549,0.6118),(0.9765,0.5451,0),
#                (0.8824,0.8980,0.7608)]

if headless == 'False':
Esempio n. 2
0
# Training settings
parser = argparse.ArgumentParser(description='plotting example')
parser.add_argument('--batch-size',
                    type=int,
                    default=64,
                    metavar='N',
                    help='input batch size for training (default: 64)')

args = parser.parse_args()

rows = np.int(np.ceil(np.sqrt(args.batch_size)))
cols = np.int(np.ceil(args.batch_size / rows))

print('{0}, {1}'.format(rows, cols))

SUNRGBD_dataset = read_sunrgbd_data.dataset(
    "SUNRGBD", "/media/ankur/nnseg/sunrgbd_training.txt")
img, label = SUNRGBD_dataset.get_random_shuffle(args.batch_size)

#batchImages = tile_images(img, args.batch_size, rows, cols,3)
batchImages = tile_images(label, args.batch_size, rows, cols, 1)

#inspired by http://jdherman.github.io/colormap/
colour_code = [(0, 0, 0), (0, 0, 1), (0.9137, 0.3490, 0.1882), (0, 0.8549, 0),
               (0.5843, 0, 0.9412), (0.8706, 0.9451, 0.0941),
               (1.0000, 0.8078, 0.8078), (0, 0.8784, 0.8980),
               (0.4157, 0.5333, 0.8000), (0.4588, 0.1137, 0.1608),
               (0.9412, 0.1373, 0.9216), (0, 0.6549, 0.6118),
               (0.9765, 0.5451, 0), (0.8824, 0.8980, 0.7608)]

cm = mpl.colors.ListedColormap(colour_code)
Esempio n. 3
0
args = parser.parse_args()

rows = np.int(np.ceil(np.sqrt(args.batch_size)))
cols = np.int(np.ceil(args.batch_size / rows))

hvd.init()

# SUNRGBD_dataset = read_sunrgbd_data.dataset("SUNRGBD",
#                                             "/se3netsproject/data/multijtdata/baxter_babbling_rarm_3.5hrs_Dec14_16/postprocessmotions/motion0",
#                                             img_type='depth')

img_type = 'rgb'

SUNRGBD_dataset = read_sunrgbd_data.dataset(
    "SceneNetRGBD",
    "/se3netsproject/train_img_label_gt3_scenenet_dataset.txt",
    img_type=img_type)

max_labels = 14
batch_size = 30
learning_rate = 1e-3
iter_num = 0

logs_path = '/tensorboard/tf-summary-logs/'

global_step = tf.train.get_or_create_global_step()

graph = tf.Graph()

with graph.as_default():