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
I0218 00:09:37.517771 18287 caffe.cpp:99] Use GPU with device ID 0 | |
I0218 00:09:37.842236 18287 caffe.cpp:107] Starting Optimization | |
I0218 00:09:37.842380 18287 solver.cpp:32] Initializing solver from parameters: | |
test_iter: 100 | |
test_interval: 500 | |
base_lr: 0.01 | |
display: 100 | |
max_iter: 10000 | |
lr_policy: "inv" | |
gamma: 0.0001 |
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 <stdio.h> // for snprintf | |
#include <string> | |
#include <vector> | |
#include <iostream> | |
#include <fstream> | |
#include "boost/algorithm/string.hpp" | |
#include "boost/filesystem.hpp" | |
#include "boost/regex.hpp" | |
#include "google/protobuf/text_format.h" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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<opencv2/imgproc.hpp> | |
#include<opencv2/imgcodecs/imgcodecs.hpp> | |
#include<opencv2/videoio.hpp> | |
#include<iostream> | |
#include<vector> | |
int main(int argc, char *argv[]) | |
{ | |
cv::Mat frame; |
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
git init | |
git status | |
git add file.ext | |
Add file.ext to tracking of GIT | |
git commit -m "Comment" | |
Say changes are commited | |
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 __future__ import division | |
import cv2 | |
import cv2.cv as cv | |
import sys | |
import pdb | |
def detect(img, cascade): | |
rects = cascade.detectMultiScale(img, scaleFactor=1.1, minNeighbors=3, minSize=(10, 10), flags = cv.CV_HAAR_SCALE_IMAGE) | |
if len(rects) == 0: | |
return [] |
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 [images, images_RGB] = readDataFromPath(DataPath, image_size) | |
% Reads the image content of the given rootpath. Assumes that we have a | |
% root folder includes sub folder for each class of images | |
images = {}; | |
images_RGB = {}; | |
root_dir = dir(DataPath); | |
root_dir = root_dir([root_dir.isdir]); | |
folder_names = {root_dir.name}; | |
root_dir = root_dir(~ismember(folder_names,{'.','..'})) |
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 im_array=gridsplit(im,grid_x,grid_y,width_fact,height_fact,left_extra,right_extra,top_extra,bottom_extra) | |
%Crops a grid of images out of one image | |
% im_array=gridsplit(im,...) returns an image array im_array that has | |
% size (MxNxPxR) in which M the width, N the height, P the channel and R | |
% the amount of images destilled from the grid. So it puts all the | |
% gridparts in R which has size (grid_x*grid_y) | |
% You get the idea. Otherwise more info on: www.timzaman.nl | |
% | |
% grid_x = Amount of horizontal patches | |
% grid_y = Amount of vertical patches |
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[ROOT_DIR] = read_dir(PATH) | |
ROOT_DIR = dir(PATH); | |
% video_names = ls(fullfile(PATH,'*.mp4')); | |
file_names = {ROOT_DIR.name}; | |
ROOT_DIR = ROOT_DIR(~ismember(file_names,{'.','..'})); |
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
% | |
% Normalize data columnwise to reduce different unit's effect | |
% | |
function[X_norm, val] = normalize_data(X,val) | |
% if ~exist('va','var') | |
% [val,ind] = max(X,[],1); | |
% end | |
% X_norm = bsxfun(@rdivide, X, val); |