Block | Elements | Kernel Size | Filter depth | Output depth | Stride | Misc. Info |
---|---|---|---|---|---|---|
Convolution |
[5, 5] |
3 |
64 |
[1, 1] |
||
conv1 |
ReLU |
- |
- |
- |
- |
|
Max-pool |
[3, 3] |
- |
- |
[2, 2] |
||
Convolution |
[5, 5] |
64 |
64 |
[1, 1] |
||
conv2 |
ReLU |
- |
- |
- |
- |
|
Max-pool |
[3, 3] |
- |
- |
[2, 2] |
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filename_queue = tf.FIFOQueue(100000, [tf.string], shapes=[[]]) | |
# ... | |
reader = tf.WholeFileReader() | |
image_filename, image_raw = reader.read(self._filename_queue) | |
image = tf.image.decode_jpeg(image_raw, channels=3) | |
# Image preprocessing | |
image_preproc = ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'image' | |
require 'lfs' | |
require 'cunn' | |
require 'nngraph' | |
function segment(model, flow_mag_ang_file, minmax_file, output_file) | |
local file = io.open(minmax_file) | |
local minmaxes = {} | |
local ind = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def load_and_enqueue(input_dir, sess, coord, enqueue_op, queue_inputs, queue_targets, num_examples, examples_per_file=100, rewrite_targets=True): | |
# Check if we have a sufficient number of HDF5 files to load all the samples | |
filenames_queue = glob.glob(os.path.join(input_dir, "train/*.h5")) | |
filenames_queue.sort() | |
assert len(filenames_queue) > 0 | |
examples_available = len(filenames_queue)*examples_per_file | |
num_examples = min(examples_available, num_examples) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialize placeholders for feeding in to the queue | |
self.queue_inputs = tf.placeholder(tf.float32, shape=[None, self.config.seq_length, self.config.image_size, self.config.image_size], name="queue_inputs") | |
self.queue_targets = tf.placeholder(tf.uint8, shape=[None, self.config.seq_length], name="queue_targets") | |
min_after_dequeue = 10000 | |
capacity = min_after_dequeue + 3 * self.config.batch_size | |
q = tf.FIFOQueue( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialize the camera | |
camera = bpy.data.cameras.new('Camera') | |
camera_obj = bpy.data.objects.new('Camera', camera) | |
scene.objects.link(camera_obj) | |
scene.objects.active = camera_obj | |
scene.camera = camera_obj | |
camera_obj.select = True | |
camera_obj.location = (0, 0, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
# YouTube video searching API | |
from apiclient.discovery import build | |
from apiclient.errors import HttpError | |
from oauth2client.tools import argparser | |
# Downloading YouTube videos | |
import pafy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MIT License | |
# | |
# Copyright (c) 2017 Tom Runia | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to conditions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialize placeholders for feeding in to the queue | |
pl_queue_screens = tf.placeholder(tf.float32, shape=[config.seq_length, config.image_size, config.image_size, config.input_channels], name="queue_inputs") | |
pl_queue_targets = tf.placeholder(tf.uint8, shape=[config.seq_length], name="queue_targets_cnt") | |
# ... | |
capacity = config.min_after_dequeue + 10 * (config.num_gpus*config.batch_size) | |
q = tf.RandomShuffleQueue( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from tensorflow.python.summary.event_accumulator import EventAccumulator | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
def plot_tensorflow_log(path): | |
# Loading too much data is slow... | |
tf_size_guidance = { |