mmdetection icon indicating copy to clipboard operation
mmdetection copied to clipboard

fix voc07+12 training

Open Nioolek opened this issue 2 years ago • 1 comments

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Fixed an issue where VOC07 +12 dataset could not be trained. ConcatDataset in mmengine judge whether datasets metainfo is equal. VOC07 DATASET_TYPE is VOC2007, but VOC12 DATASET_TYPE is VOC2012. 580562bf8e6964e6e9435aedd1bf4f7 This resulted in an inability to train when using the VOC07+12 dataset: image

Modification

Methods:

  • add def metainfo(self) in VOCDataset to delete DATASET_TYPE.
  • Dont judge and warn in voc_metric.py

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMCls.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

Nioolek avatar Sep 20 '22 14:09 Nioolek

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 20 '22 14:09 CLAassistant

@Nioolek Thanks for your contribution, Please remember to sign the CLA first. image

BIGWangYuDong avatar Sep 21 '22 02:09 BIGWangYuDong

Kindly ping @HAOCHENYE have a look, maybe we can add ignore_key in ConcatDataset to avoid this error

BIGWangYuDong avatar Sep 28 '22 04:09 BIGWangYuDong

Hi @Nioolek ,

Thanks for your kind PR. It seems that your branch is out of date and causes much difference.

Now, we require all the PRs to be merged into the development branch, i.e., dev branch for MMDet 2.x and dev-3.x branch for MMDet 3.x.

If your modification is not checkout from these two branches, they may cause conflicts and you should add your modification based on these two branches.

If your modification is checkout from these two branches, your branch might be out of date. In such a case Please rebase your branch to the target dev or dev-3.x branch. You can simply do that by modifying your pull behavior:

git config --local --add pull.rebase true  # make rebase a default behavior in pull

Then you can git pull and rebase the dev branch by

git pull dev-3.x  # if your modification is for MMDet 3.x
git pull dev  # if your modification is for MMDet 2.x

After rebase, you might need to add --force option when pushing code, e.g.,

git push [remote name] [you branch] --force

ZwwWayne avatar Sep 28 '22 11:09 ZwwWayne

Since the issue will be resolved in MMEngine, this PR is closed.

ZwwWayne avatar Oct 09 '22 13:10 ZwwWayne