Skip to content

Instantly share code, notes, and snippets.

View gvanhorn38's full-sized avatar

Grant Van Horn gvanhorn38

View GitHub Profile
@gvanhorn38
gvanhorn38 / cuda_7_5_ubuntu_15_04.md
Last active July 15, 2016 17:34
Installing CUDA Toolkit 7.5 on Ubuntu 15.04

We had some issues when we tried to download the CUDA Toolkit .deb file and use the apt-get package manager to install CUDA Toolkit on Ubuntu 15.04. So instead we just manually installed the CUDA Toolkit .run file.

We used these resources to piece together the right steps for doing this. http://developer.download.nvidia.com/compute/cuda/7.5/Prod/docs/sidebar/CUDA_Installation_Guide_Linux.pdf http://www.allaboutlinux.eu/remove-nouveau-and-install-nvidia-driver-in-ubuntu-15-04/2/ https://askubuntu.com/questions/16371/how-do-i-disable-x-at-boot-time-so-that-the-system-boots-in-text-mode

Remove existing nvidia stuff:

sudo apt-get remove nvidia*
@gvanhorn38
gvanhorn38 / format_cub_dataset.py
Created July 1, 2016 18:40
Format a CUB style dataset for dumping into a tfrecords file
import os
import sys
def format_labels(image_labels):
"""
Convert the image labels to be integers between [0, num classes)
Returns :
condensed_image_labels = { image_id : new_label}
new_id_to_original_id_map = {new_label : original_label}
@gvanhorn38
gvanhorn38 / make_tfrecords.py
Last active January 20, 2020 01:19
Basics of generating a tfrecord file for a dataset.
import tensorflow as tf
def _float_feature(value):
return tf.train.Feature(float_list=tf.train.FloatList(value=value))
def _int64_feature(value):
return tf.train.Feature(int64_list=tf.train.Int64List(value=value))
def _bytes_feature(value):
return tf.train.Feature(bytes_list=tf.train.BytesList(value=value))
@gvanhorn38
gvanhorn38 / image_processing.md
Last active November 11, 2019 19:28
Image pre-processing.

You can install imagemagick with:

sudo apt-get install imagemagick

We first need to identify potential problems:

#!/bin/bash