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

[Feature] Add FBKD algorithm and torch_connectors #248

Merged
merged 4 commits into from
Aug 29, 2022

Conversation

wilxy
Copy link
Contributor

@wilxy wilxy commented Aug 25, 2022

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 FBKD algorithm and torch_connectors

Modification

  1. Add an object detection distillation algorithm FBKD, including fbkd_loss and fbkd_connector.
  2. Add connectors which call function in torch.nn.functional or nn.module in torch.nn to process input data.
  3. Add UTs for fbkdloss, fbkd_connector and torch_connectors.
  4. Revise README of ZSKT and DFAD.

BC-breaking (Optional)

Does the modification introduce changes that break the backward compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here and update the documentation.

Checklist

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects, like MMDet or MMSeg.
  • CLA has been signed and all committers have signed the CLA in this PR.

@codecov
Copy link

codecov bot commented Aug 25, 2022

Codecov Report

Merging #248 (9b84db7) into dev-1.x (f3b964c) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           dev-1.x    #248      +/-   ##
==========================================
- Coverage     0.44%   0.43%   -0.01%     
==========================================
  Files          164     167       +3     
  Lines         6564    6700     +136     
  Branches      1069    1081      +12     
==========================================
  Hits            29      29              
- Misses        6530    6666     +136     
  Partials         5       5              
Flag Coverage Δ
unittests 0.43% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...mrazor/models/architectures/connectors/__init__.py 0.00% <0.00%> (ø)
.../models/architectures/connectors/base_connector.py 0.00% <0.00%> (ø)
.../models/architectures/connectors/byot_connector.py 0.00% <0.00%> (ø)
.../models/architectures/connectors/fbkd_connector.py 0.00% <0.00%> (ø)
...models/architectures/connectors/torch_connector.py 0.00% <0.00%> (ø)
mmrazor/models/losses/__init__.py 0.00% <0.00%> (ø)
mmrazor/models/losses/fbkd_loss.py 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


## Results and models

### Classification
Copy link
Contributor

Choose a reason for hiding this comment

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

del classification

from .base_connector import BaseConnector


class NonLocalBlockND(nn.Module):
Copy link
Contributor

Choose a reason for hiding this comment

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

refactor by using conv_cfg and norm_cfg

@sunnyxiaohu sunnyxiaohu merged commit 1c0da58 into open-mmlab:dev-1.x Aug 29, 2022
humu789 pushed a commit to humu789/mmrazor that referenced this pull request Feb 13, 2023
* support yolov3 ncnn with Yolov3DetectionOutput

* update nms

* fix contiguous in ncnn wrapper

* remove padding to detectionoutput

* format cpp

* Revert "format cpp"

This reverts commit 54050b19cd80d2f8cd851d82a755fd2c8d6c779d.

* fix zero detection

* fix yapf

* onnx2ncnn.cpp

* fix ut

* fix isort

* fix clang-format

* format cpp

* resolve comments

* resolve comments

* fix ut of ncnnend2endmodel

* fix yapf

* fix return list;

Co-authored-by: hanrui1sensetime <hanrui1@sensetime.com>
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.

2 participants