Skip to content

Instantly share code, notes, and snippets.

name: "NormFace-Resnet"
input: "data"
input_dim: 100
input_dim: 3
input_dim: 112
input_dim: 96
layer {
name: "flip_data"
type: "Flip"
bottom: "data"
name: "CenterFace-ResNet"
layer {
name: "data"
type: "ImageData"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
name: "CenterFace_Resnet"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 112
input_dim: 96
layer {
name: "conv1a"
type: "Convolution"
@walkoncross
walkoncross / numpy-image-bgr-to-rgb.md
Last active March 20, 2023 16:49
Numpy / OpenCV image BGR to RGB

(from https://www.scivision.co/numpy-image-bgr-to-rgb/)

Numpy / OpenCV image BGR to RGB

Conversion between any/all of BGR, RGB, and GBR may be necessary when working with Matplotlib expects M x N x 3 image, where last dimension is RGB.

OpenCV expects M x N x 3 image, where last dimension is BGR.

Scientific Cameras, some of which output an M X N x 3 image, where last dimension is GBR

@walkoncross
walkoncross / gist:28e949c8b36f9b0a639fee461a4ecc8c
Created February 13, 2017 22:49 — forked from crizCraig/gist:2816295
Download images from Google Image search using Python
import json
import os
import time
import requests
from PIL import Image
from StringIO import StringIO
from requests.exceptions import ConnectionError
def go(query, path):
"""Download full size images from Google image search.
@walkoncross
walkoncross / How to write shared libraries.md
Last active January 11, 2017 00:44
How to write shared libraries
@walkoncross
walkoncross / bits.S
Created December 29, 2016 01:31 — forked from comzyh/bits-i7-7700HQ.s
Bit Count test
.file "A.cpp"
.section .rdata,"dr"
.align 8
.LC0:
.ascii "bits1: %5lu, bits2: %5lu, builtin: %5lu\12\0"
.text
.p2align 4,,15
.def _Z6printfPKcz.constprop.0; .scl 3; .type 32; .endef
.seh_proc _Z6printfPKcz.constprop.0
_Z6printfPKcz.constprop.0:
@walkoncross
walkoncross / Experiment.py
Created November 29, 2016 22:38 — forked from k0emt/Experiment.py
Basic Hello world in Python with corresponding unittest
__author__ = 'k0emt'
class Greeter:
def __init__(self):
self.message = 'Hello world'
# print self.message