Giter VIP home page Giter VIP logo

object-localization-and-tracking's Introduction

Object-Localization-and-Tracking

Compare different methods of tracking

Disclaimer

This software is published for academic and non-commerical use only.

Dependencies

Opencv 3.0+, Tensorflow 1.0+ Python 3.5

Setup

This code has been tested on Windows 8.1, Windows 10, macOS Sierra

Methods used

  1. Meanshift and Camshift Algorithms
  2. Histograms
  3. Grabcut Algorithm
  4. Convolutional Neural network to predict four corners for the rectangle (CNN based Bounding Box regressor model)
  5. Linear regression loss function to train the network.

Program

box_find.py

  1. It is used to create a dataset on your own in a small scale to test your model.
  2. The training images must be present in same directory where all the training images are kept.
  3. Then in that directory run
  • python box_find.py.
  1. Then you will get images one by one, where you should use your mouse to draw boxes on the image.
  2. Then press 'm' to go to next image.
  3. The image name , along with the coordinates of the box is written in the text file dataset.txt

bounding_box_regression.py

  1. The dataset created in the above process is used in training the model.

Model Details

  • Input image is resized to 256x256x3
Type Dimensions Comments
Convolutional Layer 1 3 filters, each 5x5x3 Layer output dimension is 128x128x3
Convolutional Layer 2 3 filters, each 5x5x3 Layer output dimension is 64x64x3
Feed Forward layer 1 12288 Neurons
Feed Forward layer 2 4 Neurons Output layer
  • Then run python bounding_box_regression.py

bboxreg.py

  1. The dataset created is trained along with a pre-trained vgg16 model.
  2. Weights for the model can be found here

grabcut.py

  • This algorithm is used in a hope to classify each pixel to each object.
  • To run this code firstly you must change the image you want to read, by changing this line of code.
cv2.imread("abc.jpg")
  • The run python grabcut.py
  • Then draw a box around the object and wait for the program to highlight the object separately, drawing a contour around it.

object-localization-and-tracking's People

Contributors

atulapra avatar rishi307 avatar rohithsrinivaas avatar tlokeshkumar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

object-localization-and-tracking's Issues

What should be the dataset size to run the regresion?

I'm getting this error every time -

 raise ValueError(err.message)
ValueError: Cannot reshape a tensor with 270000 elements to shape [196608] (196608 elements) for 'Reshape_3' (op: 'Reshape') with input shapes: [300,300,3], [1] and with input tensors computed as partial shapes: input[1] = [196608].

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.