Skip to content

Instantly share code, notes, and snippets.

View bearpaw's full-sized avatar

Wei Yang bearpaw

View GitHub Profile
@bearpaw
bearpaw / Caffe + Ubuntu 12.04 64bit + CUDA 6.5 配置说明.md
Last active March 12, 2020 01:24
Caffe + Ubuntu 12.04 / 14.04 64bit + CUDA 6.5 / 7.0 配置说明

Caffe + Ubuntu 12.04 64bit + CUDA 6.5 配置说明

本步骤能实现用Intel核芯显卡来进行显示, 用NVIDIA GPU进行计算。

1. 安装开发所需的依赖包

安装开发所需要的一些基本包

sudo apt-get install build-essential
sudo apt-get install vim cmake git
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev
@bearpaw
bearpaw / Basic.md
Last active August 29, 2015 14:18
Ubuntu Basic Scripts
  1. 创建用户

    sudo adduser username
  2. 将用户添加到管理员用户组

    sudo adduser username sudo
name: "Clafifai"
# --------------------- Data Layer --------------------------
# input dimension is 36x36x3
layers {
name: "data"
type: DATA
top: "data"
top: "label"
data_param {
source: "cache/lsp/LMDB_train"
@bearpaw
bearpaw / dt.cpp
Created July 28, 2015 06:54
distance transform
/*-------------------------------------------------------------------------------------
* dt 1-d
* -----------------------------------------------------------------------------------*/
template <typename Dtype>
void MessagePassingLayer<Dtype>::dt1d(const Dtype *src, Dtype *dst, int *ptr, int step, int len,
Dtype a_c, Dtype b_c, Dtype a_p, Dtype b_p, Dtype dshift_c, Dtype dshift_p, int dlen) {
int *v = new int[len];
float *z = new float[len+1];
int k = 0;
Mean Pixel Chanel #1: 86.81
Mean Pixel Chanel #2: 76.52
Mean Pixel Chanel #3: 72.62
Training model using gpu id: 0
I0315 04:58:38.202831 26931 caffe.cpp:99] Use GPU with device ID 0
I0315 04:58:38.342545 26931 caffe.cpp:107] Starting Optimization
I0315 04:58:38.342646 26931 solver.cpp:32] Initializing solver from parameters:
test_iter: 100
test_interval: 5000
base_lr: 0.005
@bearpaw
bearpaw / demo.m
Last active August 29, 2015 14:27
convert-matcaffe3-model-to-matcaffe
deploy_file = '/home/wyang/code/pose/chen-nips14-pose/external/my_models/lsp/lsp_deploy_conv_grabcut.prototxt';
weights_file = '/home/wyang/code/pose/chen-nips14-pose/cache/lsp/fully_conv_net_grabcut.caffemodel';
save_model_file = 'fully_conv_net_grabcut_matcaffe1.caffemodel';
% try
% % ------- Set params for old caffe model
% load('trans_params.mat');
% addpath('/home/wyang/code/caffe-xianjiec/matlab/caffe');
% set_weights(deploy_file, weights_file, trans_params, save_model_file);
@bearpaw
bearpaw / LMDB_val_patches.txt
Last active January 26, 2024 06:50
Read LMDB in python
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000001.jpg 1
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000002.jpg 1823
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000003.jpg 2903
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000004.jpg 4470
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000005.jpg 4698
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000006.jpg 4797
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000007.jpg 4917
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000008.jpg 5072
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000009.jpg 5177
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000010.jpg 5271
@bearpaw
bearpaw / demo.txt
Created February 17, 2016 07:36
Compute Receptive Field Size
conv1 5 1
pool1 2 2
conv2 5 1
pool2 2 2
conv3 5 1
conv4 9 1
conv5 1 1
conv6 1 1
conv7 9 1
conv8 13 1
@bearpaw
bearpaw / redshift.conf
Created June 3, 2016 11:59 — forked from bcomnes/redshift.conf
My configuration file for Redshift. Place it in ~/.config/ Drag redshift onto the Startup Applications menu to have it boot on start
; Global settings
[redshift]
temp-day=6500K
temp-night=5000
transition=1
;gamma=0.8:0.7:0.8
gamma=1.000:1.000:1.000
location-provider=geoclue
;location-provider=manual
adjustment-method=vidmode
@bearpaw
bearpaw / ffmpeg.sh
Last active March 29, 2019 21:36
ffmpeg
# extract 24 frames per second
ffmpeg -i Peter-Jasko-solo-M-idzomer-2013.mp4 -r 24/1 frames/solo-dance-%04d.png
# generate video from images, -q 0 is the highest quality
ffmpeg -start_number 222 -i %d.png -q 0 dance_skeleton.avi
ffmpeg -framerate 10 -start_number 0 -i %06d.png -q 0 ../h36m_triangulation.mp4