Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencwelch committed Jun 25, 2019
0 parents commit 87ab29b
Show file tree
Hide file tree
Showing 43 changed files with 7,986 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

![](graphics/computer_vision_cropped.png)

## Introduction to Computer Vision



1. Introduction to Computer Vision
2. The State of the Art, Applications, and Using Open Source Code - let's use slides for this.
3. (Optional/Review Session) Introduction to Jupyter + Python of Compter Vision
4. How to do things with fastai


## Lectures

| Notebook/Slides | Recommended Reading/Viewing | Additional Reading/Viewing | Key Topics |
| ------- | ------------- | --------------------------- | -------------------------- |
[A Brief History of Neural Networks](http://www.welchlabs.io/unccv/the_original_problem/notebooks/top.html) | [The Summer Vision Project](papers/summer_vision_project.pdf) | - | - |


## Programming Challenge


## Setup
The Python 3 [Anaconda Distribution](https://www.anaconda.com/download) is the easiest way to get going with the notebooks and code presented here.

(Optional) You may want to create a virtual environment for this repository:

~~~
conda create -n cv python=3
source activate cv
~~~

You'll need to install the jupyter notebook to run the notebooks:

~~~
conda install jupyter
# You may also want to install nb_conda (Enables some nice things like change virtual environments within the notebook)
conda install nb_conda
~~~

This repository requires the installation of a few extra packages, you can install them with:

~~~
conda install -c pytorch -c fastai fastai
conda install jupyter
conda install opencv
pip install jupyterthemes
~~~

(Optional) [jupyterthemes](https://github.com/dunovank/jupyter-themes) can be nice when presenting notebooks, as it offers some cleaner visual themes than the stock notebook, and makes it easy to adjust the default font size for code, markdown, etc. You can install with pip:

~~~
pip install jupyterthemes
~~~

Recommend jupyter them for **presenting** these notebook (type into terminal before launching notebook):
~~~
jt -t grade3 -cellw=90% -fs=20 -tfs=20 -ofs=20 -dfs=20
~~~

Recommend jupyter them for **viewing** these notebook (type into terminal before launching notebook):
~~~
jt -t grade3 -cellw=90% -fs=14 -tfs=14 -ofs=14 -dfs=14
~~~



101 changes: 101 additions & 0 deletions challenge/sample_student.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
## ---------------------------- ##
##
## sample_student.py
##
## Example student submission for programming challenge. Insructions:
## 1. Before submitting, change the name of this file to your firstname_lastname.py.
## 2. Be sure not to change the name of the methods below.
## 3. Complete the methods below using only python and numpy methods.
## 4. ANIT-PLAGARISM checks will be run on your submission, if your code matches another student's too closely,
## we will be required to report you to the office of academic affairs - this may results in failing the course
## or in severe cases, being expelled.
##
##
## ---------------------------- ##

import numpy as np

def convert_to_grayscale(im):
'''
Converts an (nxmx3) color image im into an (nxm) grayscale image.
'''



return grayscale_image


def crop_image(im, crop_bounds):
'''
Returns a cropped image, im_cropped.
im = numpy array representing a color or grayscale image.
crops_bounds = 4 element long list containing the top, bottom, left, and right crops respectively.
e.g. if crop_bounds = [50, 60, 70, 80], the returned image should have 50 pixels removed from the top,
60 pixels removed from the bottom, and so on.
'''


return im_cropped

def compute_range(im):
'''
Returns the difference between the largest and smallest pixel values.
'''


return image_range


def maximize_contrast(im, target_range = [0, 255]):
'''
Return an image over same size as im that has been "contrast maximized" by rescaling the input image so
that the smallest pixel value is mapped to target_range[0], and the largest pixel value is mapped to target_range[1].
'''


return image_adujusted


def flip_image(im, direction = 'vertical'):
'''
Flip image along direction indicateded by the direction flag.
direction = vertical or horizontal.
'''

return flipped_image

def count_pixels_above_threshold(im, threshold):
'''
Return the number of pixels with vaalues above threshold.
'''

return pixels_above_treshold


def normalize(im):
'''
Rescale all pixels value to make the mean pixel value equal zero and the standard deviation equal to one.
if im is of type uint8, convert to float.
'''

return noramlized_image


def resize_image(im, scale_factor):
'''
BONUS PROBLEM - worth 1 extra point.
Resize image by scale_factor using only numpy.
If you wish to sumit a solution, change the return type from None.
'''

return None






Binary file not shown.
Binary file added graphics/NAVLAB_B.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/NNQ1-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/NNQ2-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/NNQ3-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/NNQ7-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/alexnet-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/computer_vision-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/computer_vision_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/fastai-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/fei_fei_li-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/hinton_krizhevinsky-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/imagenet_over_time-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/images_are_points-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/lenet-5-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/mcculloch_and_pitts-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/mcculloch_pitts_nueron-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/mnist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/perceptron_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/perceptron_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/perceptron_hype-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/perceptron_step_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/perceptron_step_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/perceptron_step_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/perceptron_step_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/perceptron_step_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/perceptrons_3.gif
Binary file added graphics/perceptrons_4.gif
Binary file added graphics/perceptrons_5.gif
Binary file added graphics/perceptrons_book-01.png
Binary file added graphics/rosenblatt-01.png
Binary file added graphics/rosenblatts_perceptron.png
Binary file added graphics/rumerlhart_hinton-01.png
Binary file added graphics/sample_image.jpg
Binary file added graphics/training_animation_smaller.gif
Binary file added graphics/transfer_learning.png
Loading

0 comments on commit 87ab29b

Please sign in to comment.