Skip to content

Instantly share code, notes, and snippets.

Avatar

Raaj soulslicer

  • Carnegie Mellon University Robotics Institute
View GitHub Profile
View Setup
1. Run commands
sudo apt-get update
sudo apt-get install terminator
sudo apt-get install terminator
sudo apt-get remove nvidia* && sudo apt-get autoremove
sudo apt-get install dkms fakeroot build-essential linux-headers-generic cmake git
2. Neovim
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update
View calibsonar.py
#!/usr/bin/python
import sys
sys.dont_write_bytecode = True
# Base libraries
import cv2
import time
import string
import json
View texturemapping_multicamera_speedup.cpp
// TODO handle case were no face could be projected
if (visibility.size () - cpt_invisible !=0)
{
//create kdtree
pcl::KdTreeFLANN<pcl::PointXY> kdtree;
kdtree.setInputCloud (projections);
// af first (idx_pcan < current_cam), check if some of the faces attached to previous cameras occlude the current faces
// then (idx_pcam == current_cam), check for self occlusions. At this stage, we skip faces that were already marked as occluded
@soulslicer
soulslicer / GPU-EC2.sh
Created Jul 9, 2014
OpenCL on GPU instance
View GPU-EC2.sh
# This script installs everything you need on an EC2 GPU Instance
# Create an Ubuntu 12.04 GPU Instance with at least 16GB of free space
# Base packages
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install gcc git cmake
# CUDA/Nvidia installations
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_6.0-37_amd64.deb
View samplecode.cpp
caffe::BlobProto blob_proto;
blob_proto.set_num(1);
blob_proto.set_channels(3);
blob_proto.set_height(224);
blob_proto.set_width(224);
blob_proto.clear_data();
for (int c = 0; c < 3; ++c) {
for (int h = 0; h < 224; ++h) {
for (int w = 0; w < 224; ++w) {
@soulslicer
soulslicer / libsvm_openmp_cmake.txt
Last active Feb 20, 2017
Diff that makes a CMakeLists file for LibSVM and adds OpenMP Support
View libsvm_openmp_cmake.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e69de29..4600a6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -0,0 +1,44 @@
+cmake_minimum_required(VERSION 2.8.3)
+project(libsvm)
+
+include(CheckCXXCompilerFlag)
+CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
@soulslicer
soulslicer / opencl.xml
Last active Feb 26, 2017
OpenCL QTCreator Highlighter
View opencl.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="OPENCL" version="2.06" kateversion="2.4" section="Sources" extensions="*.cl" indenter="cstyle" mimetype="" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
<highlighting>
<list name="keywords">
<item> break </item>
<item> case </item>
<item> continue </item>
@soulslicer
soulslicer / pcl_surface_openmp_patch.txt
Last active Jun 19, 2017
PCL Surface OpenMP speedup patch
View pcl_surface_openmp_patch.txt
diff --git a/surface/include/pcl/surface/impl/poisson.hpp b/surface/include/pcl/surface/impl/poisson.hpp
index 97848d3..4f824fd 100644
--- a/surface/include/pcl/surface/impl/poisson.hpp
+++ b/surface/include/pcl/surface/impl/poisson.hpp
@@ -102,6 +102,7 @@ pcl::Poisson<PointNT>::execute (poisson::CoredVectorMeshData &mesh,
/// TODO OPENMP stuff
// tree.threads = Threads.value;
+ tree.threads = 16;
center.coords[0] = center.coords[1] = center.coords[2] = 0;
View iai_kinect_opencv3_fix.txt
diff --git a/kinect2_registration/CMakeLists.txt b/kinect2_registration/CMakeLists.txt
index 14002b6..53f12f6 100644
--- a/kinect2_registration/CMakeLists.txt
+++ b/kinect2_registration/CMakeLists.txt
@@ -1,11 +1,12 @@
cmake_minimum_required(VERSION 2.8.3)
project(kinect2_registration CXX)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBT_USE_DOUBLE_PRECISION -Wall")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBT_USE_DOUBLE_PRECISION -Wall -fno-exceptions")
View py-faster-rcnn-caffe_fix.diff
diff --git a/caffe-fast-rcnn b/caffe-fast-rcnn
index 0dcd397..cdddca3 160000
--- a/caffe-fast-rcnn
+++ b/caffe-fast-rcnn
@@ -1 +1 @@
-Subproject commit 0dcd397b29507b8314e252e850518c5695efbb83
+Subproject commit cdddca3ad7967dbd80cc660b45fd4347c60e380e-dirty
diff --git a/lib/datasets/factory.py b/lib/datasets/factory.py
index 8c3fdb8..56dd3f5 100644
--- a/lib/datasets/factory.py