Skip to content

Instantly share code, notes, and snippets.

View yzbx's full-sized avatar
🐢
coding fast

王佳欣 yzbx

🐢
coding fast
  • China@ShengZen
View GitHub Profile
@yzbx
yzbx / pose_deploy.prototxt
Created September 25, 2018 10:29
convolutional-pose-machines pose_deploy.prototxt
#https://raw.githubusercontent.com/CMU-Perceptual-Computing-Lab/convolutional-pose-machines-release/master/model/_trained_FLIC/pose_deploy.prototxt
input: "data"
input_dim: 1
input_dim: 4
input_dim: 368
input_dim: 368
layer {
name: "image"
type: "Slice"
bottom: "data"
@yzbx
yzbx / hed.prototxt
Created September 19, 2018 09:34
edge detection
name: "FCN"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 500
input_dim: 500
layer { bottom: 'data' top: 'conv1_1' name: 'conv1_1' type: "Convolution"
param { lr_mult: 1 decay_mult: 1 } param { lr_mult: 2 decay_mult: 0}
name: "pspnet101_cityscapes_713"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 713
input_dim: 713
layer {
name: "conv1_1_3x3_s2"
type: "Convolution"
name: "ResNet-101"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 224
input_dim: 224
layer {
bottom: "data"
top: "conv1"
name: "ResNet-101"
layer {
name: "resnet_101"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
@yzbx
yzbx / pet-snippet.toml
Created May 9, 2018 03:28
description
[[snippets]]
description = "zip xxx folder"
command = "zip -zcvf xxx.zip xxx"
output = ""
@yzbx
yzbx / boost-time.cpp
Created October 7, 2016 07:18
boost count time
boost::chrono::nanoseconds start;
boost::chrono::nanoseconds end;
typedef boost::chrono::milliseconds ms;
ms d = boost::chrono::duration_cast<ms>(end - start);
// d now holds the number of milliseconds from start to end.
std::cout << ms.count() << "ms\n";
@yzbx
yzbx / dlib.cpp
Last active October 2, 2016 07:08
a fragment code for use dlib to detect face
#include <dlib/svm_threaded.h>
#include <dlib/gui_widgets.h>
#include <dlib/image_processing.h>
#include <dlib/data_io.h>
#include <dlib/opencv.h>
#include <dlib/image_processing/frontal_face_detector.h>
#include <dlib/image_processing/render_face_detections.h>
typedef dlib::scan_fhog_pyramid<dlib::pyramid_down<6> > image_scanner_type;
dlib::object_detector<image_scanner_type> detector;
@yzbx
yzbx / stdErase.cpp
Created September 30, 2016 02:41
c++ std erase
#include <set>
#include <iostream>
int main()
{
std::set<int> c = {1, 2, 3, 4, 5, 6, 7, 8, 9};
// erase all odd numbers from c
for(auto it = c.begin(); it != c.end(); )
if(*it % 2 == 1)
it = c.erase(it);
else
@yzbx
yzbx / secondToDate.cpp
Last active September 30, 2016 02:37
convert second to year, month, day, but bug remain here, I need to use 400 year, 100 year, 4 year, year, month as the loop, and count from 2000.
#include <iostream>
#include <map>
#include <vector>
#include <math.h>
using namespace std;
const int daySec=24*3600;
const int yearDay=365;
const int year400Day=400*yearDay+100-3;
const int year400Sec=year400Day*daySec;