Git Product home page Git Product logo

Comments (3)

Michael3444 avatar Michael3444 commented on May 18, 2024 7

@twmht 这个公式是手动计算cross_entropy为后续ohem作准备的,交叉熵公式-pi*log(qi), 其中pi=1,qi为Softmax的结果,因此公式简化为log( exp(x0-xmax) + exp(x1-xmax) ) - log( exp(xi-xmax) ) =
log( exp(x0-xmax) + exp(x1-xmax) ) + xmax - xi = log_sum_exp(xi) - xi, xi为网络的输出值,x0代表背景,x1代表人脸

from pytorch_retinaface.

twmht avatar twmht commented on May 18, 2024

我看 retinaface 的 paper (https://arxiv.org/abs/1905.00641) 也沒有解釋它們怎麼算的...

from pytorch_retinaface.

twmht avatar twmht commented on May 18, 2024

對於整個算法我的理解

batch_conf:
a1_c1, a1_c2
a2_c1, a2_c2
...
an_cn, an_cn

log_sum_exp(batch_conf) 是把 batch_conf 弄成

a1_c1, + a1_c2
a2_c1 + a2_c2
...
an_cn + an_cn

這邊為了方便省略 log 的計算了...

然後去扣這個 anchor 對到的 bounding box (可能是背景),如果是背景的話,就盡可能讓網路學習把前景的 conf 學成 0

我這樣的理解對嗎?

from pytorch_retinaface.

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.