Skip to content

Instantly share code, notes, and snippets.

View txizzle's full-sized avatar

Ted Xiao txizzle

View GitHub Profile
@txizzle
txizzle / demo.py
Last active May 11, 2022 09:39
Demonstrating the difference between cv2 and tf.image for reading an image
import cv2
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
# %matplotlib inline # this was originally a Jupyter Notebook
filepath = '<home directory>/imagenet/ilsvrc2012-val/n02397096/ILSVRC2012_val_00046916.JPEG'
##########################
# Approach 1: Using cv2 #
########################
@txizzle
txizzle / debug_tf_vs_cv2.ipynb
Created August 4, 2017 23:45
kratzert_finetune_tf_vs_cv2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.