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 sys | |
import numpy as np | |
import cv2 | |
from perlin_noise import PerlinNoise | |
import glob | |
def vector_field(x, y, noise, scale=0.01, w=100): | |
noise_x = w * noise([scale*x, scale*y]) | |
noise_y = w * noise([100+scale*x, scale*y]) | |
return noise_x, noise_y |
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
FROM ros:indigo | |
RUN apt-get update | |
RUN apt-get install -y | |
RUN apt-get install -y wget nano build-essential vim curl | |
RUN apt-get install -y ros-indigo-geodesy ros-indigo-pcl-ros ros-indigo-nmea-msgs | |
RUN apt-get install build-essential | |
RUN wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz | |
RUN tar xf cmake-3.2.2.tar.gz |
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 | |
import matplotlib.pyplot as plt | |
import mpl_toolkits.mplot3d.axes3d as p3 | |
import matplotlib.animation as animation | |
import pandas as pd | |
from sys import exit | |
def update_lines(num, data, line): | |
# NOTE: there is no .set_data() for 3 dim data... | |
line.set_data(data[0:2, :num]) | |
line.set_3d_properties(data[2, :num]) |
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 re | |
import csv | |
def get_n(string): | |
return re.findall(r"[-+]?\d*\.\d+|\d+", string) | |
lines = [] | |
with open('coordsOut.txt', 'r') as f: |
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 | |
import cv2, os, sys, getopt | |
from glob import glob | |
import natsort | |
# Global Variables | |
helpMessage = 'Usage:\n\tcrop.py <command> [argument]\n\nCommands:\n\t-h --help\t\tDisplay this help message\n\t-i --image [path]\tInput image\n\t-f --folder [path]\tImage Folder\n\t-r --regex [regex]\tNaming of output files [WIP]\n\t-s --save [path]\tPath to Save' | |
# Arguments |
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 foolbox | |
import keras | |
import numpy | |
from keras.applications.resnet50 import ResNet50 | |
import matplotlib.pyplot as plt | |
import scipy.misc | |
# instantiate model | |
keras.backend.set_learning_phase(0) | |
kmodel = ResNet50(weights='imagenet') |
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
name: "CNN" | |
input: "data" | |
input_shape { | |
dim: 1 | |
dim: 3 | |
dim: 224 | |
dim: 224 | |
} | |
layer { |
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
class A4C(torch.nn.Module): | |
def __init__(self, input, n_actions): | |
""" Standard recurrent A3C """ | |
self.conv1 = nn.Conv2d(input, 32, 3, stride=2, padding=1) | |
self.conv2 = nn.Conv2d(32, 32, 3, stride=2, padding=1) | |
self.conv3 = nn.Conv2d(32, 32, 3, stride=2, padding=1) | |
self.conv4 = nn.Conv2d(32, 32, 3, stride=2, padding=1) | |
self.lstm = StackedLSTM(2, 256, 256, dropout=.5) |
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
name: "ResNet-152" | |
input: "data" | |
input_shape { | |
dim: 1 | |
dim: 3 | |
dim: 224 | |
dim: 224 | |
} | |
layer { | |
bottom: "data" |
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
net: "models/darkvgg/train_test.prototxt" | |
test_iter: 1000 | |
test_interval: 5000 | |
base_lr: 0.0005 | |
lr_policy: "inv" | |
gamma: 0.0001 | |
power: 0.75 | |
display: 200 | |
max_iter: 450000 | |
momentum: 0.0 |
NewerOlder