Skip to content

Instantly share code, notes, and snippets.

View tomrunia's full-sized avatar

Tom Runia tomrunia

View GitHub Profile
{
"icfdetector" :
{
"boost_type" : "WaldBoost",
"detection_max_size" : 200,
"detection_min_size" : 30,
"feature_candidates" : 40000,
"weak_count" : 600,
"min_feature_size" : 25,
"model_height" : 64,
@tomrunia
tomrunia / tensorflow_log_loader.py
Created March 2, 2016 09:11
Reading out binary TensorFlow log file and plotting process using MatplotLib
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 = {
@tomrunia
tomrunia / README.md
Created March 3, 2016 15:23
Caffe model benchmarks: average classification time per image on MS-COCO (GPU Titan X)

Caffe Classification

Classification Speed Benchmark

Table lists average classification times per image (milliseconds). Averages are computed over classification of 100 images from MS-COCO validation set. For the VGG networks a very high variance in classification times was observed, some images were classified fast while most of them took more processing time that other network configurations.

AlexNet

Classification done in 79.1ms [avg = 79.1ms] Probabilities and labels: n02124075 Egyptian cat (0.31) n02123159 tiger cat (0.18) n02123045 tabby, tabby cat (0.12) n02119022 red fox, Vulpes vulpes (0.11) n02085620 Chihuahua (0.04)

#!/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
@tomrunia
tomrunia / Chrome.sublime-build
Created May 19, 2016 18:33
SublimeText build for HTML/JavaScript to start Chrome with permissions to access local files
{
"cmd": ["open", "-a", "Google Chrome", "$file", "--args", "--allow-file-access-from-files"]
}
@tomrunia
tomrunia / barchart.html
Created May 30, 2016 12:17
Information Visualisation course
<!DOCTYPE html>
<meta charset="utf-8">
<!-- The visual styling of our barchart is in this file -->
<link rel="stylesheet" href="barchart.css">
<!-- This is the main container to which we append all chart elements -->
<svg class="chart"></svg>
<!-- We include D3 from an external location so that we don't have
@tomrunia
tomrunia / test_queue.py
Created June 24, 2016 08:57
Testing the performance of the TensorFlow FIFOQueue
import time
import numpy as np
import threading
import tensorflow as tf
from tensorflow.python.client import timeline
def test_queue():
import os
import sys
import pickle
import numpy as np
import tensorflow as tf
from tensorflow.python.summary.event_accumulator import EventAccumulator
event_file = "/home/trunia1/dev/python/LSTMCounting/output/screens/" \
"summaries/004_rmsprop_0.0005_lstm_512x2_grad_10_batch_128_dropkp_0.75/" \
@tomrunia
tomrunia / tf_queue.py
Created November 2, 2016 14:48
TensorFlow queue example
# 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(