Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove useless bboxes&labels in CocoDataset #159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ShiquanYu
Copy link

不好意思,PR #158 测试不周,,,,valid set 返回 NoneType 时会在collate时引发类型错误,修复了下这个问题~

fixed `TypeError classes<None>` in valid dataloader
@ShiquanYu
Copy link
Author

以下是我对模型做了少量更改(为了部署)后得测试结果。

版本:commit 2021.2.22

修改内容:

  1. leaky_relu -> relu6
  2. PAN -> FPN
  3. FPN(bilinear) -> FPN(nearest)

测试结果:
BGR:

mAP: 0.27045186089989737
AP_50: 0.4214516444114105
AP_75: 0.2862484957541031
AP_small: 0.10793292324828849
AP_m: 0.2944064369754226
AP_l: 0.39395007400120235

RGB:

mAP: 0.2794905872668077
AP_50: 0.4308761059392766
AP_75: 0.2924213184092761
AP_small: 0.11358375294212335
AP_m: 0.2997194595821626
AP_l: 0.4088541954988801

@stiansel
Copy link
Contributor

Pardon, but why would you want to remove all images without bounding boxes? Isn't it beneficial for the model to learn not to produce boxes for these images? Does it cause an issue somewhere later in the training loop?

@ShiquanYu
Copy link
Author

Pardon, but why would you want to remove all images without bounding boxes? Isn't it beneficial for the model to learn not to produce boxes for these images? Does it cause an issue somewhere later in the training loop?

It will only delete images without bboxes in valid set, and will not affect train set.

@stiansel
Copy link
Contributor

Pardon, but why would you want to remove all images without bounding boxes? Isn't it beneficial for the model to learn not to produce boxes for these images? Does it cause an issue somewhere later in the training loop?

It will only delete images without bboxes in valid set, and will not affect train set.

I was thinking of these added lines in get_train_data:

        # Remove image without label&bbox
        if self.mode == 'train' and len(meta['gt_bboxes']) == 0:
            return None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants