Skip to content

Instantly share code, notes, and snippets.

@shicai
shicai / InstallCaffe.sh
Created January 25, 2015 05:41
Install Caffe on NVIDIA Jetson TK1 LT4 21.2 - CUDA 6.5
#!/bin/sh
# Install and compile Caffe on NVIDIA Jetson TK1 Development Kit
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install libprotobuf-dev protobuf-compiler gfortran \
libboost-dev cmake libleveldb-dev libsnappy-dev \
libboost-thread-dev libboost-system-dev \
libatlas-base-dev libhdf5-serial-dev libgflags-dev \
libgoogle-glog-dev liblmdb-dev -y
@shicai
shicai / MaxGPU.sh
Created January 25, 2015 07:28
Set CPU to full performance on NVIDIA Jetson TK1 Development Kit
#!/bin/sh
# Set CPU to full performance on NVIDIA Jetson TK1 Development Kit
if [ $(id -u) != 0 ]; then
echo "This script requires root permissions"
echo "$ sudo "$0""
exit
fi
# To obtain full performance on the CPU (eg: for performance measurements or benchmarking or when you don't care about power draw), you can disable CPU scaling and force the 4 main CPU cores to always run at max performance until reboot:
@shicai
shicai / Install_OpenCV.sh
Created October 15, 2015 08:59
Install OpenCV
# Dan Walkes
# 2014-01-29
# Call this script after configuring variables:
# version - the version of OpenCV to be installed
# downloadfile - the name of the OpenCV download file
# dldir - the download directory (optional, if not specified creates an OpenCV directory in the working dir)
if [[ -z "$version" ]]; then
echo "Please define version before calling `basename $0` or use a wrapper like opencv_latest.sh"
exit 1
fi
@shicai
shicai / iccv2015.md
Created November 26, 2015 05:55 — forked from myungsub/iccv2015.md
upload candidates to awesome-deep-vision

Vision & Language

  • Ask Your Neurons: A Neural-Based Approach to Answering Questions About Images

    • Mateusz Malinowski, Marcus Rohrbach, Mario Fritz
  • Aligning Books and Movies: Towards Story-Like Visual Explanations by Watching Movies and Reading Books

    • Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, Sanja Fidler
  • Learning Query and Image Similarities With Ranking Canonical Correlation Analysis

  • Wah Ngo

@shicai
shicai / springer-free-maths-books.md
Created December 29, 2015 10:49 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@shicai
shicai / forward.py
Created January 9, 2016 14:37 — forked from samim23/forward.py
# "Colorizing B/W Movies with Neural Nets",
# Network/Code Created by Ryan Dahl, hacked by samim.io to work with movies
# BACKGROUND: http://tinyclouds.org/colorize/
# DEMO: https://www.youtube.com/watch?v=_MJU8VK2PI4
# USAGE:
# 1. Download TensorFlow model from: http://tinyclouds.org/colorize/
# 2. Use FFMPEG or such to extract frames from video.
# 3. Make sure your images are 224x224 pixels dimension. You can use imagemagicks "mogrify", here some useful commands:
# mogrify -resize 224x224 *.jpg
# mogrify -gravity center -background black -extent 224x224 *.jpg
  1. 对机器学习有基本的理解,最好的材料是Andrew Ng在coursera上的公开课程,看过教程能让你对机器学习有基本的认识,完成课程中的任务会让你对机器学习有更深入的理解
  2. 接下来需要培养对神经网络的感觉,实现一个神经网络,并利用它做点事情
  3. 理解神经网络的原理很重要,但简单的神经网络并不足以解决最有趣的问题。神经网络的变体-卷积神经网络(CNN)非常适合于图像识别类的任务,斯坦福大学的有关资料如下:CS231n 用于图像识别的卷积神经网络(笔记)课件。另外两个参考资料如下CNN 参考资料1CNN 参考资料1
  4. 接下来需要在自己的电脑上运行CNN
    • 买一块GPU,安装CUDA开发工具包
    • 安装Caffe和GUI包Digit
    • 安装Boinc,这个工具对你理解深度学习并没有帮助,但能够让其他研究人员在闲暇时间利用你的GPU做科研
  5. Digit提供了少量算法,比如用于字符识别的lenet算法和用于图像分类的Googlenet算法。要想运行这些算法,需要下载相应的数据集lenet数据集和[Googlenet数据集
@shicai
shicai / CaffeBatchPrediction.cpp
Created March 4, 2016 15:27 — forked from erogol/CaffeBatchPrediction.cpp
Caffe c++ batch based prediction
#include "caffeclassifier.h"
CaffeClassifier::CaffeClassifier(const string& model_file,
const string& trained_file,
const string& mean_file,
const string& label_file,
const bool use_GPU,
const int batch_size) {
if (use_GPU)
Caffe::set_mode(Caffe::GPU);
@shicai
shicai / preprocessor_fun.h
Created April 21, 2016 15:36 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@shicai
shicai / vae_simple.py
Created June 12, 2016 03:01 — forked from tencia/vae_simple.py
Variational Auto-Encoder using Lasagne
import sys
import os
import numpy as np
import theano
import theano.tensor as T
import lasagne as nn
import time
from PIL import Image
from scipy.stats import norm
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams