CS663 | computer vision
  • outline
  • projects
  • syllabus
  • links

Deep Learning with CNN (convoltuional neural network)

 

STEP 1: Understanding CNN

 

STEP 2: Software implimentations of CNN - e.g. TensorFlow

  • is a low-level library for CNN that is supported by Google

  • offers distributed computing.

  • tensorflow official site

  • tutorial site

  • intall instructions

 

Programming Options - e.g. Python

History of Python as language used by some Machine Learning communities

 

  •  NumPy package = numerical analysis like Matlab

  • matplotlib package= plotting functionality from Matlab was ported to Python

  • SciPy package = Libraries for scientific computing were built around NumPy and matplotlib

  • Python's support for Matlab-like array manipulation and plotting is a major reason to prefer it over Perl and Ruby.

why not nodejs?

Node.js is very well-suited for high I/O web applications, due to it's single-threaded asynchronous design. I myself am a huge fan of Node.js, but I know that it doesn't work well for every kind of application, particularly ones that require lots of computation, such as the case of ML. 

C++ or Java ---yes you can but, lately companies like Google (TensorFlow) while having interfaces in Java are primarily supporting Python first

 

Front End Wrapper: Keras library with backend of either TensorFlow or Theano

  • example Python program using Keras

    from keras.models import Sequential
    from keras.layers import Dense, Activation
    # Simple feed-forward architecture

    model = Sequential()
    model.add(Dense(output_dim=64, input_dim=100))
    model.add(Activation("relu"))
    model.add(Dense(output_dim=10))
    model.add(Activation("softmax")) # Optimize with SGD (learning process)
    model.compile(loss='categorical_crossentropy', optimizer='sgd', metrics=['accuracy'])

    # iterate training data in batches
    model.fit(X_train, Y_train, nb_epoch=5, batch_size=32)
    # alternatively feed in training data in one batch model.train_on_batch(x_batch, y_batch) # Evaluate model
    loss_and_metrics = model.evaluate(X_test, Y_test, batch_size=32) # create predicitions on new data
    classes = model.predicts(X_test, batch_size=32



    concept of model in Keras:

    • a sequence or a graph of standalone, fully-configurable modules that can be plugged together with as little restrictions as possible.

    • neural layers, cost functions, optimizers, initialization schemes, activation functions, regularization schemes are all standalone modules that you can combine to create new models

    • Sequentialmodel = a linear stack of layers.

cs663:computer vision

  • home
  • outline
  • projects
  • syllabus
  • links