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

Yolo head (YoloBody forward 部分)代码求解释 #185

Open
S1monXuan opened this issue Jan 11, 2024 · 1 comment
Open

Yolo head (YoloBody forward 部分)代码求解释 #185

S1monXuan opened this issue Jan 11, 2024 · 1 comment

Comments

@S1monXuan
Copy link

您好,我想问一下YoloBody中Forward代码中的
out0_branch = self.last_layer0[:5](x0) out0= self.last_layer0[5:](out0_branch)
该怎么解释。其中5代表的是什么?是先验框的5个条件吗?
谢谢各位大佬

@ZHENG2049
Copy link

out0_branch = self.last_layer0[:5](x0)
表示make_last_layers的前五层,图片中红框内容
out0= self.last_layer0[5:](out0_branch)
表示make_last_layers最后两层,图片中蓝框内容
image

def make_last_layers(filters_list, in_filters, out_filter):
    m = nn.Sequential(
        conv2d(in_filters, filters_list[0], 1),
        conv2d(filters_list[0], filters_list[1], 3),
        conv2d(filters_list[1], filters_list[0], 1),
        conv2d(filters_list[0], filters_list[1], 3),
        conv2d(filters_list[1], filters_list[0], 1),

        conv2d(filters_list[0], filters_list[1], 3),
        nn.Conv2d(filters_list[1], out_filter, kernel_size=1, stride=1, padding=0, bias=True)
    )
    return m

您好,我想问一下YoloBody中Forward代码中的Hello, I would like to ask Yolobody in the Forward code out0_branch = self.last_layer0[:5](x0) out0= self.last_layer0[5:](out0_branch) 该怎么解释。其中5代表的是什么?是先验框的5个条件吗?How to explain. What does five of them stand for? Are the five conditions of a priori box? 谢谢各位大佬 Thank you

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

2 participants