$ brew install socat
$ brew cask install xquartz <--- assuming you don't already have XQuartz installed some other way
$ open -a XQuartz <--- start an XQuartz session
$ socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"
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
/** | |
* @brief Image enchancement and Hough transform example | |
* @author Eugene Khvedchenya <ekhvedchenya@gmail.com> | |
* @copyright computer-vision-talks.com/articles/how-to-detect-circles-in-noisy-image/ | |
*/ | |
#include <opencv2/opencv.hpp> |
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
layers { | |
name: "conv1A" | |
type: CONVOLUTION | |
bottom: "data" | |
top: "conv1A" | |
blobs_lr: 1 | |
blobs_lr: 2 | |
weight_decay: 1 | |
weight_decay: 0 | |
convolution_param { |
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 torch import * | |
import torch.nn.functional as F | |
import torch.nn as nn | |
class RNNModel(nn.Module): | |
""" | |
Neural Network Module with an embedding layer, a recurent module and an output linear layer | |
Arguments: | |
rnn_type(str) -- type of rnn module to use options are ['LSTM', 'GRU', 'RNN_TANH', 'RNN_RELU'] |
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 functools | |
def my_collate(batch, use_shared_memory=False): | |
r"""Puts each data field into a tensor with outer dimension batch size""" | |
error_msg = "batch must contain tensors, numbers, dicts or lists; found {}" | |
elem_type = type(batch[0]) | |
if isinstance(batch[0], torch.Tensor): | |
out = None | |
if use_shared_memory: |
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 functools | |
def my_collate(batch, use_shared_memory=False): | |
r"""Puts each data field into a tensor with outer dimension batch size""" | |
error_msg = "batch must contain tensors, numbers, dicts or lists; found {}" | |
elem_type = type(batch[0]) | |
if isinstance(batch[0], torch.Tensor): | |
out = None | |
if use_shared_memory: |
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/bash | |
# WARNING ! THIS WAS WRITTEN A LONG TIME AGO (2018), IT MAY NOT BE RELEVANT ANYMORE | |
sudo apt-get install vnc4server ubuntu-desktop | |
sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal |
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 link_fbx_sdk() { | |
INTERPRETER=$1 | |
SITE_PACKAGES=`$INTERPRETER -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"` | |
PYTHON_LIB="${2}" | |
echo "[Installing] '$PYTHON_LIB' to '$SITE_PACKAGES'" | |
pushd $SITE_PACKAGES | |
for file in "${PYTHON_LIB}"/* | |
do |
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
VGG_ILSVRC_19_layers_train_val.prototxt | |
name: "VGG_ILSVRC_19_layers" | |
layers { | |
name: "data" | |
type: DATA | |
include { | |
phase: TRAIN | |
} | |
transform_param { | |
crop_size: 224 |
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 cv2 | |
from matplotlib import pyplot as plt | |
import numpy as np | |
cap = cv2.VideoCapture(0) #Webcam Capture | |
while(True): | |
ret, frame = cap.read() |
OlderNewer