Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does 'route' layer work in yolov2? #545

Closed
wsyzzz opened this issue Mar 20, 2018 · 3 comments
Closed

How does 'route' layer work in yolov2? #545

wsyzzz opened this issue Mar 20, 2018 · 3 comments

Comments

@wsyzzz
Copy link

wsyzzz commented Mar 20, 2018

Hi everyone, does anyone know how 'route' layer work in yolov2? I google it and only find that "the route layer is to bring finer grained features in from earlier in the network". So how it 'bring finer grained features in'?

E.g. I provide a case to explain. I use ./darknet detector test cfg/coco.data cfg/yolo.cfg yolo.weights data/dog.jpg


layer        |          filters         |           size          |            input                   |             output           |
0 conv                    32                     3×3  /  1                   416×416×3                ->           416×416×32
……
16  conv                 512                     3×3  /  1                   26×26×256                ->           26×26×512
……
24  conv                1024                     3×3  /  1                   13×13×1024               ->           13×13×1024
25  route                16
26  conv                 64                      1×1  /  1                   26×26×512                ->           26×26×64
27  reorg                                             /  2                   26×26×64                 ->           13×13×256
28  route              27  24
29  conv                1024                     3×3  /  1                   13×13×1280               ->           13×13×1024
……

And in 'yolo.cfg', I found that

[route]                            
layers=-9
……
[route]  
layers=-1,-3 

So It's clear that the 25th route layer uses 16th layer for 'layers=-9' in .cfg file, the 28th route layer uses 27th and 24th layer for 'layers=-1, -3' in .cfg file.

Here is my question. How the route layer how the 25th route layer uses 13×13×1024 input from the 24th layer and 26×26×512 input from the 16th layer to obtain 26×26×512 output(according to the 26th input)?

I am looking for any advice. Thanks for your response!

@wsyzzz
Copy link
Author

wsyzzz commented Mar 21, 2018

This problem is solved here.
#487

@wsyzzz wsyzzz closed this as completed Mar 21, 2018
@khanh101
Copy link

Can you leave the answer or link below for others?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants