Code Monkey home page Code Monkey logo

Comments (6)

pkuyilong avatar pkuyilong commented on September 26, 2024

@xiongzihua 如果有空恳请交流一下。

from pytorch-yolo-v1.

abeardear avatar abeardear commented on September 26, 2024

@pkuyilong
box1[:, :2]是在0-1之间,预测的是相对该网格左上角的x1,y1,是相对于网格的0-1。
box1[:, 2:4]也在0-1,预测的是wh,是相对全图的0-1。
计算IOU时,除以14将x1,y1的坐标从网格视角转换到全图视角,不知道这样能不能理解,代码的意图就是这样的,不知道是否合理,你可以继续思考一下,希望对你有所帮助

from pytorch-yolo-v1.

HusterRC avatar HusterRC commented on September 26, 2024

@pkuyilong do you understand the idea of the author?

from pytorch-yolo-v1.

HusterRC avatar HusterRC commented on September 26, 2024

@xiongzihua 能举个例子说明这种计算的正确性吗?

from pytorch-yolo-v1.

pkuyilong avatar pkuyilong commented on September 26, 2024

@pkuyilong do you understand the idea of the author?

Training phrase:
the prediction generated from model is 14 x 14,
the ground truth is scaled by origin image size(maybe 480 x 480),
so when calculating the loss, we need to divide the prediction data by 14, which is equal to scale the prediction data by origin image size.

from pytorch-yolo-v1.

pkuyilong avatar pkuyilong commented on September 26, 2024

@pkuyilong
box1[:, :2]是在0-1之间,预测的是相对该网格左上角的x1,y1,是相对于网格的0-1。
box1[:, 2:4]也在0-1,预测的是wh,是相对全图的0-1。
计算IOU时,除以14将x1,y1的坐标从网格视角转换到全图视角,不知道这样能不能理解,代码的意图就是这样的,不知道是否合理,你可以继续思考一下,希望对你有所帮助

又看了一会代码,差不多可以理解了,谢谢🙏

from pytorch-yolo-v1.

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.