Coder Social home page Coder Social logo

what is the difference between your another repo?https://github.com/ayooshkathuria/pytorch-yolo-v3 about yolo_v3_tutorial_from_scratch HOT 5 CLOSED

ayooshkathuria avatar ayooshkathuria commented on May 14, 2024
what is the difference between your another repo?https://github.com/ayooshkathuria/pytorch-yolo-v3

from yolo_v3_tutorial_from_scratch.

Comments (5)

ayooshkathuria avatar ayooshkathuria commented on May 14, 2024

I wrote a tutorial on how to implement the object detector given at my other repo from scratch over at Paperspace

The other repo contains a lot of code that offers much more options for experimentation (such as variants using float16, flags allowing you to run at isolate detection scales) as code that has been written keeping the training code to be written in future in mind.

I created this repo as a accompanying repo for the tutorial, and this code is much simpler, in order to keep the tutorial easier to follow.

from yolo_v3_tutorial_from_scratch.

gittigxuy avatar gittigxuy commented on May 14, 2024

So,the complete repo is https://github.com/ayooshkathuria/pytorch-yolo-v3 ?the tutorial repo is just a simple version?

from yolo_v3_tutorial_from_scratch.

gittigxuy avatar gittigxuy commented on May 14, 2024

I have a question about route layer

according to your article:

When layers attribute has only one value, it outputs the feature maps of the layer indexed by the value. In our example, it is -4, so the layer will output feature map from the 4th layer backwards from the Route layer.

When layers has two values, it returns the concatenated feature maps of the layers indexed by it's values. In our example it is -1, 61, and the layer will output feature maps from the previous layer (-1) and the 61st layer, concatenated along the depth dimension.

==================================
So,if the layer only has one parameter,for example,layer[0]=-4,the result is the previous of the 4th of route layer;
if the layer have 2 parameters,for example,layer[0]=-1,layer[1] =36,the result is :from the prior layer of the route layer to the 36th layer?
Is it right?
but I can not understand code in darknet.py about route layer

default

could you please give an example?

from yolo_v3_tutorial_from_scratch.

ayooshkathuria avatar ayooshkathuria commented on May 14, 2024

@gittigxuy Yep, this repo is a simpler version, and it won't be updated with training and evaluation code.

Okay, onto the route layer. The thing is that the author of YOLO config file hasn't been consistent in providing indexes of the Route layer. Negative indexing means the layer previous from the current layer, whereas positive index means the normal index counting from the first layer.

In the code above, what I've done is try to be a bit uniform and convert all the indexes to relative (negative indexing).

Here's an explanation of what each line does.

if (layers[0]) > 0:
    layers[0] = layers[0] - i

You see, it means, if the first index of the layer, layer[0] is positive, then do subtract it from i which represents the number of the current layer. Suppose if layers[0] is 36, and current layer is 97, then the index is changed to 36 - 97 = -61. This brings every index in a single format, and I don't have to make cases in the forward function of darknet object.

if len(layers) == 1:
    x = outputs[i + layers[0]]

If the layers has only one value, our output is merely the feature map of the layer[0] previous of the current layer. Again, outputs is used to cache feature maps through the loop, and again, if i = -61 in our case, and i = 97 then our output x becomes output[36].

Further the code checks for if layer has two values (-1,36) types. Same thing regarding indexing followed by torch.cat function to concatenate maps.

from yolo_v3_tutorial_from_scratch.

ayooshkathuria avatar ayooshkathuria commented on May 14, 2024

@gittigxuy If your issue got resolved, please be kind as to close the issue, or write an acknowledgment comment so I can 😄

from yolo_v3_tutorial_from_scratch.

Related Issues (20)

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.