Skip to content

Instantly share code, notes, and snippets.

HOW TO INSTALL pjreddie/DARKNET ON OSX

Install Opencv

  • use brew
brew install opencv
  • setup opencv.pc to pkgconfig, e.g :
@tsingjinyun
tsingjinyun / current_utc_time.c
Created July 12, 2017 10:09 — forked from jbenet/current_utc_time.c
work around lack of clock_gettime in os x
/*
author: jbenet
os x, compile with: gcc -o testo test.c
linux, compile with: gcc -o testo test.c -lrt
*/
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
@tsingjinyun
tsingjinyun / draw_net.py修改
Created June 12, 2017 07:35
caffe/python/draw_net.py
When I try to draw a model, I get this error:
AttributeError: 'google.protobuf.pyext._message.RepeatedScalarConta' object has no attribute '_values'
Just ran into this myself on deconv-deep-vis-toolbox branch
I removed the "._values" on lines 94,96,98 in python/caffe/draw.py. Looks like it wants to get the length of the array.
Worked after that
@tsingjinyun
tsingjinyun / resnet-face.prototxt
Created June 12, 2017 07:03 — forked from singlasahil14/resnet-face.prototxt
Resnet face recognition model
name: "Face-ResNet"
layer {
name: "data"
type: "ImageData"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
@tsingjinyun
tsingjinyun / gdk-gstappsrc-stream.c
Created June 7, 2017 10:09 — forked from nzjrs/gdk-gstappsrc-stream.c
GStreamer Streaming AppSrc Example
/* gcc gdk-gstappsrc-stream.c -Wall `pkg-config --cflags --libs gstreamer-app-0.10 gdk-pixbuf-2.0` -o gdkstream */
#include <gst/gst.h>
#include <gst/app/gstappsrc.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
@tsingjinyun
tsingjinyun / Multi-Part zip extraction in Ubuntu.txt
Created March 24, 2017 05:21 — forked from gauravbarthwal/Multi-Part zip extraction in Ubuntu.txt
How to extract multi-part .zip, .z01, .z02 files in ubuntu
Download/Copy all related *.zip files in one directory.
Open terminal and change to that directory which has all zip files.
Enter command zip -s- FILE_NAME.zip -O COMBINED_FILE.zip
Enter unzip COMBINED_FILE.zip
@tsingjinyun
tsingjinyun / compare_ANN.py
Created March 1, 2017 09:30 — forked from maheshakya/compare_ANN.py
Comparison of indexing, query time and accury among FLANN, ANNOY and LSH Forest
import time
import numpy as np
from sklearn.datasets.samples_generator import make_blobs
from sklearn.neighbors import LSHForest
from sklearn.neighbors import NearestNeighbors
from sklearn.preprocessing import normalize
from annoy import AnnoyIndex
from pyflann import FLANN
n_iter = 100
@tsingjinyun
tsingjinyun / MS-Celeb-1M_Extractor.py
Created January 3, 2017 07:04
extract image from MsCelebV1-ImageThumbnails.tsv
import os
import base64
import struct
fid = open("./MsCelebV1-ImageThumbnails.tsv", "r")
base_path = './MsCeleb'
if not os.path.exists(base_path):
os.mkdir(base_path)
while True:
line = fid.readline()
@tsingjinyun
tsingjinyun / installGStreamer-1.0.sh
Created December 19, 2016 10:20 — forked from jetsonhacks/installGStreamer-1.0.sh
Install Gstreamer 1.0 on the NVIDIA Jetson TK1
#!/bin/sh
# Install Gstreamer 1.0 on the NVIDIA Jetson TK1
apt-get install gstreamer1.0-tools gstreamer1.0-alsa \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad gstreamer1.0-libav -y
@tsingjinyun
tsingjinyun / install_nvidia_driver_in_ubuntu1604.md
Created December 16, 2016 09:12 — forked from terrydang/install_nvidia_driver_in_ubuntu1604.md
Ubuntu 16.04 安装英伟达(Nvidia)显卡驱动

Ubuntu 16.04 安装英伟达(Nvidia)显卡驱动

配有英伟达显卡的主机,装完 Ubuntu 16.04 后出现闪屏现象,是由于没有安装显卡驱动。

显卡型号
NVIDIA Corporation GM204 [GeForce GTX 970]