Skip to content

Instantly share code, notes, and snippets.

View rpratesh's full-sized avatar
💭
"...you never understand things. You just get used to them" -- Von Neumann

pratesh kumar reddy rpratesh

💭
"...you never understand things. You just get used to them" -- Von Neumann
View GitHub Profile
@jkjung-avt
jkjung-avt / tegra-cam.py
Last active October 11, 2023 08:20
Capture and display video from either IP CAM, USB webcam, or the Tegra X2/X1 onboard camera.
# --------------------------------------------------------
# Camera sample code for Tegra X2/X1
#
# This program could capture and display video from
# IP CAM, USB webcam, or the Tegra onboard camera.
# Refer to the following blog post for how to set up
# and run the code:
# https://jkjung-avt.github.io/tx2-camera-with-python/
#
# Written by JK Jung <jkjung13@gmail.com>
# This file is useful for reading the contents of the ops generated by ruby.
# You can read any graph defination in pb/pbtxt format generated by ruby
# or by python and then convert it back and forth from human readable to binary format.
import tensorflow as tf
from google.protobuf import text_format
from tensorflow.python.platform import gfile
def pbtxt_to_graphdef(filename):
with open(filename, 'r') as f: