-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Transformer Object Detection #2047
Transformer Object Detection #2047
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## dev_1.15.0 #2047 +/- ##
==============================================
- Coverage 75.97% 66.38% -9.59%
==============================================
Files 297 307 +10
Lines 26516 27480 +964
Branches 4867 5047 +180
==============================================
- Hits 20145 18243 -1902
- Misses 5325 8198 +2873
+ Partials 1046 1039 -7
|
ee3e4a4
to
4ae0110
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kieranfraser Thank you very much for your pull request! I have added a few review comments, please let me know what you think.
logger = logging.getLogger(__name__) | ||
|
||
|
||
def box_cxcywh_to_xyxy(x): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the license of these functions from https://github.com/facebookresearch/detr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add typing to these functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The license is Apache 2.0 which should be okay?
@@ -0,0 +1,300 @@ | |||
# MIT License | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to either add a pytest call to run_tests.sh or integrate into one existing or new dedicated testing runs for object detectors to make the tests run automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to add to run_tests.sh, but tests failing in setup with urllib.error.HTTPError: HTTP Error 500: Internal Server Error
, which could be due to needing to pull in the pre-trained weights from torch.hub
? The PyTorch Faster-RCNN test, which also pulls a pre-trained model from torch.hub
, is called from a GitHub workflow (ci-pytorch-object-detectors.yml
) - so that might be a better place to call?
# Set device | ||
self._device: torch.device | ||
if device_type == "cpu" or not torch.cuda.is_available(): | ||
self._device = torch.device("cpu") |
Check warning
Code scanning / CodeQL
Overwriting attribute in super-class or sub-class
self._device = torch.device("cpu") | ||
else: # pragma: no cover | ||
cuda_idx = torch.cuda.current_device() | ||
self._device = torch.device(f"cuda:{cuda_idx}") |
Check warning
Code scanning / CodeQL
Overwriting attribute in super-class or sub-class
Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
…utils from torchvision repo. pretrained vit output to be investigated after training. Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
…nd robust dpatch attack (for COCO image, still to check: IN images) Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Bumps [jax[cpu]](https://github.com/google/jax) from 0.4.6 to 0.4.8. - [Release notes](https://github.com/google/jax/releases) - [Changelog](https://github.com/google/jax/blob/main/CHANGELOG.md) - [Commits](jax-ml/jax@jax-v0.4.6...jax-v0.4.8) --- updated-dependencies: - dependency-name: jax[cpu] dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest@7.2.2...7.3.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.5.3 to 2.0.1. - [Release notes](https://github.com/pandas-dev/pandas/releases) - [Commits](pandas-dev/pandas@v1.5.3...v2.0.1) --- updated-dependencies: - dependency-name: pandas dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: signedqiu <10063108+signedqiu@user.noreply.gitee.com> Signed-off-by: signedqiu <chunlinqiu@whu.edu.cn> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Muhammad Zaid Hameed <Zaid.Hameed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Muhammad Zaid Hameed <Zaid.Hameed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Muhammad Zaid Hameed <Zaid.Hameed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
Signed-off-by: Muhammad Zaid Hameed <Zaid.Hameed@ibm.com> Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
…tebook: validated attack with PGD. Updates to test: correct loss computation and PGD. Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
0687aec
to
e0fe372
Compare
Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
raise NotImplementedError | ||
|
||
@abc.abstractmethod | ||
def fit_generator(self, generator: DataGenerator, nb_epochs: int = 20, **kwargs): |
Check notice
Code scanning / CodeQL
Mismatch between signature and use of an overridden method
Continuing in #2192 |
Description
Adding DEtection TRansformer (DETR) to ART to facilitate object detection using Transformers.
Paper: "End-to-End Object Detection with Transformers"
Fixes # (issue)
#1638
Type of change
Please check all relevant options.
Testing
Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.
Test Configuration:
Checklist