This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import numpy as np | |
import base64 | |
import csv | |
import os | |
from PIL import Image | |
import io | |
def int64_feature(value): | |
return tf.train.Feature(int64_list=tf.train.Int64List(value=[value])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xml.etree.cElementTree as ET | |
import os | |
from PIL import Image | |
import argparse | |
parser = argparse.ArgumentParser(description='Convert label files between datatypes.') | |
parser.add_argument('directory', metavar='d', type=str, nargs='+', | |
help='The directory of the dataset') | |
parser.add_argument('-r', action='store_true', | |
default=False, help='Replace the existing label files') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
from tf_trt_models.detection import download_detection_model, build_detection_graph | |
import tensorflow.contrib.tensorrt as trt | |
class Model: | |
def __init__(self, trt_graph, input_names): | |
self.config = tf.ConfigProto() | |
self.config.gpu_options.allow_growth = True | |
self.tf_session = tf.Session(config=self.config) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import numpy as np | |
import base64 | |
import csv | |
import os | |
from PIL import Image | |
import io | |
def int64_feature(value): | |
return tf.train.Feature(int64_list=tf.train.Int64List(value=[value])) |