Megvii-BaseDetection / Megvii-BaseDetection/YOLOX

How to seed customized backbone?

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

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

Hi,

I want to replace the CSPDarknet backbone to a customized one. But I found setting seed in tools/train.py does not work for the customized backbone. Specifically, I notice that, if a seed is set in tools/train.py, the weights of conv layers in YOLOX CSPDarknet (yolox/models/darknet.py) will always be the same as soon as they are created. But if I replace yolox/models/darknet.py to my_model.py, the conv layers in my_model .py will have different weights when they are created. I did set the seed in tools/train.py for both cases. Any suggestions on possible reasons? Thanks :)

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 by reproducing the seeded initialization from tools/train.py with yolox/models/darknet.py, then compare it with the custom my_model.py implementation. Trace where each backbone creates its convolution layers and how the seed is applied. Done means identifying the reason for the differing weights and documenting a reproducible way to seed the customized backbone.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.