Skip to content

Instantly share code, notes, and snippets.

@arasharchor
arasharchor / knn.py
Created June 28, 2015 11:47
k nearest neighbor classifier
import numpy as np
class KNearestNeighbor:
""" a kNN classifier with L2 distance """
def __init__(self):
pass
def train(self, X, y):
"""
@arasharchor
arasharchor / min-char-rnn.py
Created April 21, 2016 21:40 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@arasharchor
arasharchor / readme.md
Created May 11, 2016 17:01 — forked from baraldilorenzo/readme.md
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

@arasharchor
arasharchor / storeImgInMongoWithMongoose.js
Created June 29, 2016 08:37 — forked from aheckmann/storeImgInMongoWithMongoose.js
store/display an image in mongodb using mongoose/express
/**
* Module dependencies
*/
var express = require('express');
var fs = require('fs');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// img path
@arasharchor
arasharchor / Face2Face-jp.md
Created August 21, 2016 22:02 — forked from iwanao731/Face2Face-jp.md
Face2Face: Real-time Face Capture and Reenactment of RGB Videosの要約

1. Introduction

我々の手法は最新の手法と似たアプローチを取るが、単眼からの顔の復元をリアルタイムに行えるという点にコントリビューションがある。 [5,11,13]はリアルタイムではない。我々はリアルタイムにRGBだけで表情転写するのが目的。

[5] C. Bregler, M. Covell, and M. Slaney. Video rewrite: Driving visual speech with audio. In Proc. SIGGRAPH, pages 353–360. ACM Press/Addison-Wesley Publishing Co., 1997.

[11] K. Dale, K. Sunkavalli, M. K. Johnson, D. Vlasic, W. Matusik, and H. Pfister. Video face replacement. ACM TOG, 30(6):130, 2011. Proceeding Series, pages 281–288. ACM, 2006.

[13] P. Garrido, L. Valgaerts, O. Rehmsen, T. Thormaehlen, P. Perez, and C. Theobalt. Automatic face reenactment. In Proc. CVPR, 2014.

@arasharchor
arasharchor / DetectFire.cpp
Created August 21, 2016 22:22 — forked from andrew-smith/DetectFire.cpp
Fire detection algorithm
#include "stdafx.h"
/*
// configs
//image to load (will not load if USING_VIDEO = true)
#define IMAGE_NAME "fire2.jpg"
//video to load
#define VIDEO_NAME "flamethrower.mp4"
# "Colorizing B/W Movies with Neural Nets",
# Network/Code Created by Ryan Dahl, hacked by samim.io to work with movies
# BACKGROUND: http://tinyclouds.org/colorize/
# DEMO: https://www.youtube.com/watch?v=_MJU8VK2PI4
# USAGE:
# 1. Download TensorFlow model from: http://tinyclouds.org/colorize/
# 2. Use FFMPEG or such to extract frames from video.
# 3. Make sure your images are 224x224 pixels dimension. You can use imagemagicks "mogrify", here some useful commands:
# mogrify -resize 224x224 *.jpg
# mogrify -gravity center -background black -extent 224x224 *.jpg

Storytelling from Space: Tools/Resources

This list of resources is all about acquring and processing aerial imagery. It's generally broken up in three ways: how to go about this in Photoshop/GIMP, using command-line tools, or in GIS software, depending what's most comfortable to you. Often these tools can be used in conjunction with each other.

Acquiring Landsat & MODIS

Web Interface

  • Landsat archive
@arasharchor
arasharchor / balltrack.py
Created August 22, 2016 02:20 — forked from xamox/balltrack.py
Object Tracking with SimpleCV (White Ball)
'''
This is how to track a white ball example using SimpleCV
The parameters may need to be adjusted to match the RGB color
of your object.
The demo video can be found at:
http://www.youtube.com/watch?v=jihxqg3kr-g
'''
print __doc__
@arasharchor
arasharchor / maproulette-tutorial.md
Created August 22, 2016 02:21 — forked from mvexel/maproulette-tutorial.md
maproulette-tutorial.md

MapRoulette Challenge Tutorial (ßeta)

You have played MapRoulette. You have seen some of the fun challenges. If you are reading this, you are probably thinking: 'I have a great idea for the next MapRoulette challenge!'

maproulette

Great! That is exactly what I am here to explain step by step. So let's get started!

Step 1 - The Idea