Skip to content

Instantly share code, notes, and snippets.

@n1ckfg
n1ckfg / BasicController.cs
Last active November 18, 2018 00:26
Mouse, wasd, and raycasting controls for Unity
using UnityEngine;
using System.Collections;
//using UnityEngine.Networking;
//[RequireComponent(typeof(NetworkIdentity))]
public class BasicController : MonoBehaviour { //NetworkBehaviour {
private Rigidbody rb;
private Camera mainCamera;
@n1ckfg
n1ckfg / SteamVR_NewController.cs
Last active January 20, 2018 23:42
Simplified version of the stock Vive controller script.
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(SteamVR_TrackedObject))]
public class SteamVR_NewController : MonoBehaviour {
public bool triggerPressed = false;
public bool padPressed = false;
public bool gripped = false;
public bool menuPressed = false;
@n1ckfg
n1ckfg / Recorder.cs
Created December 26, 2017 17:03
Record frames to disk in Unity
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
public class Recorder : MonoBehaviour {
public string fileName = "frame";
public string filePath = "Frames";

SETUP for NEURAL-ENHANCE on Ubuntu 16.04 / 171226 https://github.com/alexjc/neural-enhance

  1. Remove old versions of Docker sudo apt-get remove docker docker-engine docker.io

  2. Docker dependencies sudo apt-get install
    apt-transport-https
    ca-certificates \

SETUP for STYLE-TRANSFER on WINDOWS 7 / 151231 https://github.com/fzliu/style-transfer

  1. Install current NVidia drivers.

  2. Install CUDA 7.0. Choose only the CUDA Toolkit; you don't need the Samples and the drivers are outdated.

  3. Install Anaconda. Defaults are fine.

  4. Install these modules for Anaconda (or use local versions):

@n1ckfg
n1ckfg / setup_posetrack.md
Last active January 24, 2018 03:05
Work in progress

SETUP for POSETRACK on Ubuntu 16.04 / 180123
https://github.com/iqbalu/PoseTrack-CVPR2017

git clone https://github.com/iqbalu/PoseTrack-CVPR2017.git --recursive

cd deepcut/external/caffe
cp Makefile.config.example Makefile.config
USE_CUDNN := 1
make -j 12 all matcaffe

SETUP for OPENPOSE and 3D-POSE-BASELINE on Ubuntu 16.04 / 180505

Note: OpenPose alone can record 3D coordinates with a multi-camera setup. However the 3d-pose-baseline method allows generating 3D coordinates for multiple subjects from a single camera.

  1. Clone OpenPose:
    https://github.com/CMU-Perceptual-Computing-Lab/openpose

  2. Install CUDA, CUDNN, and OpenCV

./ubuntu/install_cuda.sh
/*
// https://www.w3schools.com/graphics/svg_polygon.asp
<svg height="210" width="500">
<polygon points="200,10 250,190 160,210" style="fill:lime;stroke:purple;stroke-width:1" />
</svg>
*/
size(500, 210);
stroke(128, 0, 128);
strokeWeight(1);