GithubHelp home page GithubHelp logo

yolov2's Introduction

YoloV2

Tiny-YoloV2 implementation on Julia by Knet framework.

The program uses pre-trained weigths and currently does not train the model.

first download pre-trained weights by:

$ wget https://pjreddie.com/media/files/yolov2-tiny-voc.weights

If you want to see accuracy on Voc Dataset 2007, download the dataset by:

$ wget https://pjreddie.com/media/files/VOCtrainval_06-Nov-2007.tar
  tar xf VOCtrainval_06-Nov-2007.tar

and run

julia YoloGit.jl accuracy 

if you want to save Voc dataset output run

julia YoloGit.jl accuracy --record true

If you want to use Voc Dataset 2012

$ wget https://pjreddie.com/media/files/VOCtrainval_11-May-2012.tar
tar xf VOCtrainval_11-May-2012.tar

And change following constants as :

ACC_INPUT = "VOCdevkit/VOC2012/JPEGImages"
ACC_OUT =   "VOCdevkit/VOC2012/Annotations"

Fill the Input folder with jpg images. The program prepares output and put them into output folder. If you want you can save output into another folder.

run the code by

julia YoloGit.jl saveout --record true

If you want to display one image and save it, you can run

julia YoloGit.jl display --record true

To change thresholds, look at the guide by

julia YoloGit.jl --help

Example Input and Output

Here is an example of input and output:

INPUT:

OUTPUT:

Asymmetric Padding

An alternative solution for asymmetric padding on pooling. We solved the asymmetric padding process in the following 4 steps: Let's assume we have a matrix as (d1,d2,depth,minibatch_size)

1- Apply symmetric padding = 1 with the pooling function

2- reshape it into => (d1,d2,1,minibatch_size*depth)

3- apply the following convolutional layer => 1 0  with stride = 1, padding = 0
                                              0 0
                                              
4- Lastly, reshape again into => (d1,d2,depth,minibatch_size)

Now, we made pooling with asymmetric padding on the right and bottom side. If you want to 
make it on left and top side, apply this conv layer =>  0 0 
                                                        0 1

The last 3 steps are implemented in YoloPad(x) function
The symmetric padding part is implemented in the pooling function just before Yolopad(x) 

yolov2's People

Contributors

ybakman avatar

Watchers

 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.