Skip to content

Instantly share code, notes, and snippets.

View markdtw's full-sized avatar

Mark markdtw

  • Carnegie Mellon University
  • Pittsburgh, PA
View GitHub Profile
/*
Mimic a browser when a user only types in the domain name in the address bar
without the scheme, e.g., https://, by sending requests to https://<domain>,
https://www.<domain>, http://<domain>, and http://www.<domain> to figure out
which one leads to the landing page.
Usage:
$> go build .
$> echo facebook.com | domain2URL
@markdtw
markdtw / flownet2_python_api.py
Created December 29, 2017 07:30
python interface to inference flownet 2.0 (CVPR'17)
from __future__ import absolute_import, division, print_function
import pdb
import tempfile
import argparse
import numpy as np
import PIL.Image as PILI
import caffe
@markdtw
markdtw / tf_detection_api_inference.py
Created December 29, 2017 07:21
Extracting detection features from tensorflow object detection API.
"""This file extracts faster-rcnn features and bounding box coordinates"""
import pdb
import argparse
import numpy as np
import tensorflow as tf
import PIL.Image as PILI
def session(sess, feat_conv, feat_avg, boxes, classes, scores, image_tensor, image):
feat_conv_out, feat_avg_out, boxes_out, classes_out, scores_out = sess.run([