Skip to content

Instantly share code, notes, and snippets.

View iKrishneel's full-sized avatar
🏠
Working from home

Krishneel iKrishneel

🏠
Working from home
View GitHub Profile
@iKrishneel
iKrishneel / pr2-collision-check.l
Created February 3, 2016 16:20
Euslisp code for object-pr2 collision check
#!/usr/bin/env roseus
(ros::load-ros-manifest "roseus")
(require "package://pr2eus/pr2-interface.l")
(if (not
(boundp '*pr2*))
(pr2-init))
(if (not
(boundp '*irtviewer*))
@iKrishneel
iKrishneel / opencv-3.1-install.sh
Last active August 9, 2016 13:29
OpenCV 3.0 Install Script
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install libopencv-dev
sudo apt-get install build-essential
sudo apt-get install checkinstall
sudo apt-get install cmake
sudo apt-get install pkg-config
sudo apt-get install yasm
sudo apt-get install libtiff4-dev
@iKrishneel
iKrishneel / opencv-3.1-tx1.sh
Created March 17, 2016 04:12
script to install opencv-3.1 on Nvidia-Tx1
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install libopencv-dev build-essential checkinstall cmake pkg-config yasm libtiff4-dev libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils doxygen git
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg
git clone https://github.com/Itseez/opencv
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install libopencv-dev build-essential checkinstall cmake pkg-config yasm libtiff4-dev libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils doxygen git
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg
sudo apt-get install git
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install libopencv-dev build-essential checkinstall cmake pkg-config yasm libtiff4-dev libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils doxygen git
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg
sudo apt-get install git
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install libopencv-dev build-essential checkinstall cmake pkg-config yasm libtiff4-dev libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils doxygen git
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg
sudo apt-get install git
@iKrishneel
iKrishneel / install-caffe-tx1.sh
Last active May 1, 2017 10:26
Bash script to install CAFFE on NVIDIA TX1
#!/usr/bin/env bash
# Copyright (C) 2016 by Krishneel Chaudhary @ JSK Lab, The University
# of Tokyo, Japan
function install-glog {
/bin/echo -e "\e[1;32m[LOG] Installing GLOG \e[0m"
ipwd=$PWD
cd /tmp/
name: "CaffeNet"
layer {
name: "data"
type: "Input"
top: "data"
input_param { shape: { dim: 10 dim: 3 dim: 227 dim: 227 } }
}
layer {
name: "conv1"
type: "Convolution"

How to create a custom Caffe layer in Python?

This tutorial will guide through the steps to create a simple custom layer for Caffe using python. By the end of it, there are some examples of custom layers.

###- Why would I want to do that? Usually you would create a custom layer to implement a funcionality that isn't available in Caffe, tuning it for your requirements.

###- What will I need? Probably just Python and Caffe instaled.

###- Is there any downside?

@iKrishneel
iKrishneel / nn.py
Created December 11, 2017 17:27 — forked from ottokart/nn.py
3-layer neural network example with dropout in 2nd layer
# Tiny example of 3-layer nerual network with dropout in 2nd hidden layer
# Output layer is linear with L2 cost (regression model)
# Hidden layer activation is tanh
import numpy as np
n_epochs = 100
n_samples = 100
n_in = 10
n_hidden = 5