Skip to content

Instantly share code, notes, and snippets.

BigsnarfDude bigsnarfdude

Block or report user

Report or block bigsnarfdude

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bigsnarfdude
bigsnarfdude / train.py
Created Jul 9, 2019
tensorflowjs converter workflow from keras model
View train.py
from __future__ import absolute_import, division, print_function, unicode_literals
# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras
# Helper libraries
import numpy as np
import matplotlib.pyplot as plt
View gist:b9926795b039f89af10ae482db7ac083
https://github.com/bigsnarfdude/tfjs-node-example
https://github.com/tensorflow/tfjs-examples/tree/master/baseball-node
https://github.com/google/node-gles
https://medium.com/tensorflow/introducing-bodypix-real-time-person-segmentation-in-the-browser-with-tensorflow-js-f1948126c2a0
https://github.com/tensorflow/tfjs-models/tree/master/body-pix#person-segmentation
https://github.com/tensorflow/tfjs-examples/tree/master/mobilenet
https://github.com/tensorflow/tfjs-models
https://github.com/tensorflow/tfjs-node
https://github.com/tensorflow/tfjs-examples/tree/master/date-conversion-attention
https://2019.jsconf.eu/nick-kreeger/tensorflowjs-bringing-machine-learning-to-the-web-and-beyond.html
@bigsnarfdude
bigsnarfdude / ccn_chop_chop.py
Last active Jun 30, 2019
crop faces from pictures face_recognition lib and PIL
View ccn_chop_chop.py
import os
import numpy as np
import cv2
import mrcnn.config
import mrcnn.utils
from mrcnn.model import MaskRCNN
from pathlib import Path
# Configuration that will be used by the Mask-RCNN library
@bigsnarfdude
bigsnarfdude / person_detection_webcam_tensorflow.py
Last active Jun 1, 2019
person_detection_webcam_tensorflow.py
View person_detection_webcam_tensorflow.py
import os
import cv2
import time
import argparse
import multiprocessing
import numpy as np
import tensorflow as tf
from cam_utils import FPS, WebcamVideoStream
from multiprocessing import Queue, Pool
View clairevoyance.py
# coding: utf-8
# In[3]:
import sys
sys.path.append("..")
import pandas as pd
View upload_photo_azure.py
from azureCreds import *
import os, uuid, sys
from azure.storage.file import FileService
from azure.storage.file import ContentSettings
# generator = file_service.list_directories_and_files(share_name=CONTAINER_NAME,
# directory_name=DIRECTORY_NAME)
@bigsnarfdude
bigsnarfdude / two_sigma_kalman_rolling.py
Last active Feb 14, 2019
using kalman filter for rolling window instead of average for faster convergence esp 2 sigma
View two_sigma_kalman_rolling.py
# https://scipy-cookbook.readthedocs.io/items/KalmanFiltering.html
# https://github.com/pykalman/pykalman
import pandas as pd
from pykalman import KalmanFilter
import numpy as np
def rolling_window(a, step):
shape = a.shape[:-1] + (a.shape[-1] - step + 1, step)
strides = a.strides + (a.strides[-1],)
@bigsnarfdude
bigsnarfdude / moar.py
Last active Feb 14, 2019
keras two image input model
View moar.py
# coding: utf-8
# In[38]:
from keras.layers import Input, Concatenate # symbolic version
from keras.layers import Input, Conv2D, Flatten, Dense
from keras.models import Model
@bigsnarfdude
bigsnarfdude / face_counter.py
Last active Feb 5, 2019
motion_detection.py
View face_counter.py
#face_counter.py
import numpy as np
import cv2
import requests
cv2.namedWindow('frame')
cv2.namedWindow('dist')
@bigsnarfdude
bigsnarfdude / face_verification.py
Last active Feb 4, 2019
microsoft face api face_verification.py
View face_verification.py
import cv2
from os import system
import cognitive_face as CF
from utils import *
import config as CFG
CF.Key.set(CFG.KEY)
BASE_URL = 'https://canadacentral.api.cognitive.microsoft.com/face/v1.0'
You can’t perform that action at this time.