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 caffe | |
import cv2 | |
import numpy as np | |
import sys | |
import re | |
import random | |
from Queue import Queue | |
from threading import Thread | |
from multiprocessing import cpu_count |
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> | |
using namespace cv; | |
using namespace std; | |
struct SelectionState { | |
Point startPt, endPt, mousePos; | |
bool started = false, done = false; | |
Rect toRect() { |
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 no.uib.cipr.matrix.DenseMatrix; | |
import no.uib.cipr.matrix.NotConvergedException; | |
import no.uib.cipr.matrix.SVD; | |
public final class MatrixUtils { | |
/** | |
* Computes the Moore-Penrose pseudo-inverse. | |
* Based on Octave's implementation: https://github.com/NexMirror/Octave/blob/6ce11cf520201c66db1135711693af29d3a39d5d/liboctave/array/dMatrix.cc#L652 | |
*/ | |
public static DenseMatrix pseudoInverse(DenseMatrix matrix) { |