Skip to content

Instantly share code, notes, and snippets.

View soulslicer's full-sized avatar

Raaj soulslicer

  • Carnegie Mellon University Robotics Institute
View GitHub Profile
@soulslicer
soulslicer / ubuntu-nvidia-instructions
Created August 22, 2017 15:49
ubuntu-nvidia-instructions
# Disbale Nouveau driver and reboot (In safe mode if needed)
sudo sh -c "echo 'blacklist nouveau' >> /etc/modprobe.d/blacklist.conf"
sudo update-initramfs -u
sudo reboot
# Download drivers
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/375.20/NVIDIA-Linux-x86_64-375.20.run
wget https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda_8.0.44_linux-run
# Remove the xorg file
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.BACKUP
# Go to CMD and Stop lightdm
@soulslicer
soulslicer / py-faster-rcnn-caffe_fix.diff
Created August 14, 2017 04:02
Py Faster RCNN Caffe Fix
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
@soulslicer
soulslicer / iai_kinect_opencv3_fix.txt
Last active July 17, 2017 05:58
iai_kinect_opencv3_fix
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")
@soulslicer
soulslicer / pcl_surface_openmp_patch.txt
Last active June 19, 2017 05:40
PCL Surface OpenMP speedup patch
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;
@soulslicer
soulslicer / opencl.xml
Last active February 26, 2017 07:34
OpenCL QTCreator Highlighter
<?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 / libsvm_openmp_cmake.txt
Last active February 20, 2017 06:35
Diff that makes a CMakeLists file for LibSVM and adds OpenMP Support
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)
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 / GPU-EC2.sh
Created July 9, 2014 21:17
OpenCL on GPU instance
# 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
@soulslicer
soulslicer / texturemapping_multicamera_speedup.cpp
Created January 18, 2017 15:53
TextureMapping Speedup OpenMP
// 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
#!/usr/bin/python
import sys
sys.dont_write_bytecode = True
# Base libraries
import cv2
import time
import string
import json