question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Can we set the random seed in the mmdetection?

See original GitHub issue

What’s the feature?

I know the random seed can be set in the distributed training by setting the argument seed to any fix number you want. However, there is little information to set the random seed in single GPU training, which may have impact on the model performance (±0.6 AP in my experiments), making hard to compare models in a fair way. I wonder whether to set the random seed in the single GPU training now ? If not, I think it is necessary to implement this to compare models in a fair way.

Any other context?

No response

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
cpwancommented, Nov 30, 2022

I found it in mmengine’s code

python ./tools/train.py /path/to/config.py --cfg-options randomness.seed=0 

The results for the same seed differ by a little.

When I add also randomness.deterministic=True, it gives me a cuda internal error 😦

0reactions
Agito555commented, Nov 28, 2022

how about the 3.x version?

I haven’t used the 3.x version mmdetection yet, and I don’t see the argument seed in the train.py of 3.x mmdetection. I will reopen the issue, hope somebody else will offer some help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable again setting random seed and Deterministic=True ...
Currently, it's not possible to set the random seed and the option Deterministic=True from the config file, but only from args (see #6322)....
Read more >
mmdet.apis — MMDetection 2.26.0 documentation
Anchors in a single-level feature maps. Generate grid anchors in multiple feature levels. featmap_sizes (list[tuple]) – List of feature map sizes in multiple...
Read more >
arcgis.learn module | ArcGIS API for Python
startIndex - Allows you to set the start index for the sequence of image chips. ... Random seed for reproducible train-validation split. dataset_type....
Read more >
How to Set Random Seeds in PyTorch and Tensorflow - Wandb
Learn how to set the random seed for everything in PyTorch and Tensorflow in this short tutorial complete with code and interactive ...
Read more >
mmdetection Mask-RCNN for segmentation [Inference] - Kaggle
mask_colors = [] if labels.shape[0] > 0: if mask_color is None: # Get random state before set seed, and restore random state later....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found