Skip to content

Instantly share code, notes, and snippets.

View bearpaw's full-sized avatar

Wei Yang bearpaw

View GitHub Profile
@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 / 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 / mmdetection_env.sh
Created June 10, 2019 18:02 — forked from hellock/mmdetection_env.sh
Setup mmdetection with conda
conda create -n open-mmlab python=3.7 -y
source activate open-mmlab
conda install -c pytorch pytorch torchvision -y
conda install cython -y
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
./compile.sh
pip install -e . # "pip install ." for installation mode
@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
@bearpaw
bearpaw / delete_git_submodule.md
Last active February 5, 2019 00:22 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes
    git add .gitmodules
    
  • Delete the relevant section from .git/config.
  • Run
@bearpaw
bearpaw / starcounter.js
Last active June 13, 2018 09:31 — forked from yyx990803/starcounter.js
Count your total stars!
var https = require('https'),
user = process.argv[2],
opts = parseOpts(process.argv.slice(3))
request('/users/' + user, function (res) {
if (!res.public_repos) {
console.log(res.message)
return
}
var pages = Math.ceil(res.public_repos / 100),
@bearpaw
bearpaw / draw_tensorflow_log.py
Created March 11, 2018 01:51
Draw tensorflow log with matplot lib
import numpy as np
from tensorboard.backend.event_processing import event_accumulator as ea
import matplotlib as mpl
import matplotlib.pyplot as plt
def plot_tensorflow_log(path):
# Loading too much data is slow...
tf_size_guidance = {
@bearpaw
bearpaw / main.md
Last active April 3, 2017 11:26
Configuration of AWS for ELEG 5491

Configuration of AWS for ELEG 5491

AWS settings (with iPython Notebook)

FTP setting

If you want to use an FTP client to transfer data between local machine and AWS server, you may be instrested in this tutorial.

@bearpaw
bearpaw / data_preprocessing.ipynb
Last active March 10, 2017 01:47
Import numpy and matplotlib library
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.