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_detect层实现中的疑问 #27

Closed
zpye opened this issue Apr 27, 2023 · 2 comments
Closed

关于yolo_detect层实现中的疑问 #27

zpye opened this issue Apr 27, 2023 · 2 comments

Comments

@zpye
Copy link

zpye commented Apr 27, 2023

TensorCreate(stages_number * uint32_t(num_classes + 5), nx, ny);

这一行代码中创建Tensor但没有变量保存返回值,是否可以去掉?

for (uint32_t stage = 0; stage < stages; ++stage) {

for (uint32_t s = 0; s < stages; ++s) {

这里外层循环和内层循环都在遍历stages,感觉上有点不合理。
个人的一个看法是,外层的stages表示3种不同的特征图尺寸(20x20,40x40,80x80),内层的3代表anchor的3种长宽比,二者是互相独立的。不知道这种理解对不对?

@zjhellofss
Copy link
Owner

  1. 可以去掉, 如果可以的话, 大佬也可以帮忙提个pr
  2. 你理解应该是对的, 主要是由于这部分因为我从yolo.py那边生搬硬套的, 有些地方可能会有些问题, 如果大佬能帮忙改动下逻辑, 让代码看起来更加准确就好了.

@zjhellofss
Copy link
Owner

@zpye 我可能把stage的数量和锚框的尺寸数量混在一起了, 因为在yolov5下默认两个都是3.

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