Megvii-BaseDetection / Megvii-BaseDetection/DisAlign

Undocumented multiplication by num_classes

Open
#26 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
118
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Hi,

thank you first of all for the great paper and for publishing the code.

I was wondering why you are multiplying the class_weight by num_classes here:

https://github.com/Megvii-BaseDetection/DisAlign/blob/a2fc3500a108cb83e3942293a5675c97ab3a2c6e/semantic_seg/disalign/models/losses/grw_cross_entropy_loss.py#L35

I cannot find this multiplication in the equation of the paper:

Bildschirmfoto 2024-04-09 um 13 21 25

Maybe it is a misunderstanding on my end. Thank you in advance!

Patrick

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at semantic_seg/disalign/models/losses/grw_cross_entropy_loss.py line 35 and compare the class_weight calculation with the equation in the cited paper. Determine whether the multiplication by num_classes is intentional, then document the rationale near the implementation or in the relevant project documentation so the code and paper are unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.