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
#!/bin/sh | |
# Takes a directory of jpg images and produces an animate.gif | |
# Requires imagemagick's convert tool (Try apt-get install imagemagick) | |
# | |
# Tomasz Malisiewicz ([email protected]) | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 DIRECTORY" >&2 | |
echo "This will produce animate.gif in the current directory" | |
exit 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
#!/bin/sh | |
# Needs VMX with an "eyes" model, jq, and the vmx_detect.sh script | |
# This will open up the rick astley video when a face is detected from the webcam. | |
# vision.ai 2015 | |
./Contents/Macos/VMXwebcam 2 :0 > url 2> log& | |
./Contents/Macos/VMXwebcam 2 :0 > url & | |
sleep 1 | |
URL=http://`cat url` | |
echo URL IS $URL |
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
// Here is a GO VMX driver which wraps the VMX process with an HTTP handler | |
// This file is part of VMX | |
// Author: Tomasz Malisiewicz | |
// Copyright vision.ai, LLC 2014-2015 | |
package main | |
import "os/exec" | |
import "fmt" | |
import "io/ioutil" | |
import "log" |
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
#include "opencv2/opencv.hpp" | |
#include <string> | |
using namespace cv; | |
using namespace std; | |
int main(int argc, char** argv) | |
{ | |
if (argc !=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
#!/bin/sh | |
# | |
# A simple command line utility to send an image to VMX For this | |
# example to work, make sure the VMX variable points to the location | |
# of your server. | |
# | |
# Tom Malisiewicz [email protected] | |
# vision.ai 2015 | |
#The location of the VMX server |
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
#!/bin/sh | |
#Simple script to watch directory, and when something changes copy all of contents of directory A into directory B | |
#Requires: md5 | |
#Tomasz Malisiewicz | |
#the directory to watch | |
SOURCE_DIR=/tmp/input/ | |
#the directory we copy files into | |
TARGET_DIR=/tmp/output/ |
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
%Create an empty directory and run this function inside Matlab | |
%Tomasz Malisiewicz ([email protected] | |
%Clone my repository with Matlab-graphviz wrappers | |
fprintf(1,'Cloning git repositories\n'); | |
unix(['git clone [email protected]:quantombone/' ... | |
'graphviz_matlab_magic.git']) | |
addpath(genpath(pwd)) | |
%Download a matrix which will be rendered via Graphviz |
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
function top = nms(boxes, overlap) | |
% top = nms_fast(boxes, overlap) | |
% Non-maximum suppression. (FAST VERSION) | |
% Greedily select high-scoring detections and skip detections | |
% that are significantly covered by a previously selected | |
% detection. | |
% NOTE: This is adapted from Pedro Felzenszwalb's version (nms.m), | |
% but an inner loop has been eliminated to significantly speed it | |
% up in the case of a large number of boxes | |
% Tomasz Malisiewicz ([email protected]) |
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
function count_with_sparse | |
%Find item co-occurences using sparse | |
%Tomasz Malisiewicz | |
item1 = [1 3 1 4 3]; | |
item2 = [2 2 2 1 2]; | |
N = 4; | |
counts = sparse(item1,item2,1,N,N) | |
imagesc(full(counts)) |