Skip to content

Instantly share code, notes, and snippets.

Avatar

Wei Hao WeiHao97

  • Columbia University
View GitHub Profile
@WeiHao97
WeiHao97 / detection_PC.py
Created Jul 2, 2020 — forked from iwatake2222/detection_PC.py
Object detection using MobileNet SSD with tensorflow lite (with and without Edge TPU)
View detection_PC.py
# -*- coding: utf-8 -*-
import cv2
import tensorflow as tf
import numpy as np
# https://www.tensorflow.org/lite/guide/hosted_models
# http://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip
def detect_from_camera():
@WeiHao97
WeiHao97 / distcorr.py
Created Jun 26, 2019 — forked from wladston/distcorr.py
Distance correlation with p-value
View distcorr.py
from scipy.spatial.distance import pdist, squareform
import numpy as np
import copy
def distcorr(Xval, Yval, pval=True, nruns=500):
""" Compute the distance correlation function, returning the p-value.
Based on Satra/distcorr.py (gist aa3d19a12b74e9ab7941)
>>> a = [1,2,3,4,5]