Git Product home page Git Product logo

vehicle-cnn's Introduction

vehicle-cnn

Vehicle Classification CNN using Keras. This is my first actual implemented network where I was still experimenting and learning the ropes, while trying to grasp the basic of neural networks while I was working. I've tried experimenting with defining a model, fine tuning, and also self-implementing a pre-trained network, while also trying to gather various methods for data loading and model prediction. Some of the functions implemented here are still useful for me till this very day, so I decided to keep this as a repository.

There is nothing confidential here, so I decided to make it public after some code cleaning up. Sorry for the storytelling, as I don't think it's common to do so in Git.

1) Preprocess Data and Extract Data

  • prepare_data.py - Load data from data into arrays of label and features, then creating training and testing datasets. The training and testing datasets are saved into NumPy arrays.

2) Build Model and Run Training

  • alexnet.py - Self-implemented AlexNet model building and training.
  • finetune.py - Fine tuning with Keras' prebuilt VGG-19 model, then adding convolution layers after the VGG-19 model output. The dataset are loaded using Keras' flow_from_directory method, instead of the one as in prepare_data.py.
  • model.py - Self defined shallow model for training. A basic function to plot the training and testing accuracy and loss is defined here.

3) Making Prediction

  • prediction.py - Making predictions using saved model and calculating the accuracy. There are 2 methods to perform the prediction: predicting the test image array and then comparing it with the test labels, and loading the images from a directory and compare the prediction of the images with the image directory as ground truth.

*) Miscellaneous

  • tester.py - Testing if Tensorflow is running on GPU.

vehicle-cnn's People

Contributors

tiongsikng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.