Skip to content

Efficientnet#6464

Closed
jiangyitong wants to merge 41 commits intoopen-mmlab:masterfrom
jiangyitong:efficientnet
Closed

Efficientnet#6464
jiangyitong wants to merge 41 commits intoopen-mmlab:masterfrom
jiangyitong:efficientnet

Conversation

@jiangyitong
Copy link
Copy Markdown
Contributor

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

Add EfficientNet-b0 + FPN and EfficientNet-b3 + FPN

Modification

add EfficientNet model in the mmdet/models/backbone/efficientnet.py
add two configs for efficientNet-b0 and efficientNet-b3 training

BC-breaking (Optional)

acknowledgement

Thanks for David de la Iglesia Castro's contribution. We are grateful that he helps to implement the base efficientNet model and the corresponding tools: https://github.com/daavoo/mmdetection

Use cases (Optional)

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.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Nov 9, 2021

CLA assistant check
All committers have signed the CLA.

@RangiLyu
Copy link
Copy Markdown
Member

RangiLyu commented Nov 9, 2021

Thanks for your contribution! @jiangyitong Please sign the CLA first. And it seems that your local git email address is not added to your GitHub account, please follow this guide https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user

@Johnson-Wang Johnson-Wang self-assigned this Nov 9, 2021
@Johnson-Wang Johnson-Wang self-requested a review November 9, 2021 07:53
@Johnson-Wang Johnson-Wang removed their assignment Nov 9, 2021
]
norm_cfg = dict(type='SyncBN', requires_grad=True, eps=1e-3, momentum=0.01)
model = dict(
pretrained='open-mmlab://efficientnet_b0',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this weight been uploaded to openmmlab?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we need to convert the weight from facebookresearch to mmcv version

warmup_ratio=0.1,
warmup_by_epoch=True)
fp16 = dict(loss_scale=512.)
custom_hooks = [dict(type='EMAHook')]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is recommended to use mmdet's LinearMomentumEMAHook

custom_hooks = [dict(type='LinearMomentumEMAHook', skip_buffers=True)]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The evaluation IOU is 0 when adding 'LinearMomentumEMAHook'

Comment on lines +313 to +324
self.conv1 = build_conv_layer(
self.conv_cfg,
in_channels,
out_channels,
kernel_size=3,
stride=2,
padding=1,
bias=False)
self.norm1_name, norm1 = build_norm_layer(
self.norm_cfg, out_channels, postfix=1)
self.add_module(self.norm1_name, norm1)
self.swish = Swish()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these be replaced with a ConvModule?

efficientnet review2
@@ -0,0 +1,53 @@
import argparse
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move it to tools/model_converters/

jiangyitong1 and others added 5 commits December 21, 2021 16:17
fix model converter  and efficientnet import
register memoryefficietnswish
pull master
fix  flake8 yapf isort
same padding in tensorflow and edit drop path rate
update  mmdetection to master
@daigang896
Copy link
Copy Markdown

Hello, When can mmsegmentation use Efficientnet as the backbone network?

@ZwwWayne
Copy link
Copy Markdown
Collaborator

Hello, When can mmsegmentation use Efficientnet as the backbone network?

You should ask it in MMSegmentation.

@ZwwWayne ZwwWayne closed this Apr 20, 2022
@ZwwWayne
Copy link
Copy Markdown
Collaborator

supported in #7514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

10 participants