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

New TensorFlow TFCrossConv() module #7827

Merged
merged 18 commits into from
May 16, 2022
Merged

New TensorFlow TFCrossConv() module #7827

merged 18 commits into from
May 16, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented May 15, 2022

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Introducing CrossConv: a new cross-convolutional layer and updating autopad functionality.

πŸ“Š Key Changes

  • Modified the autopad function to create lists instead of generators.
  • Added a new CrossConv class to common.py, representing a cross-convolutional downsampling layer.
  • Introduced C3x class to common.py, which is an extended version of the C3 class with cross-convolutions.
  • Moved CrossConv from experimental.py to common.py as it seems to be a more stable feature now.
  • Updated the TensorFlow model definitions in tf.py to include the new C3x and CrossConv classes, along with adjustments for padding.
  • Refactored yolo.py to recognize C3x as one of the core components of the model.

🎯 Purpose & Impact

  • πŸ› οΈ Enhances model flexibility with the addition of cross-convolutional layers which can help in capturing better features from input data.
  • 🏎️ May improve the YOLOv5 model's accuracy and efficiency by enabling more complex feature mapping.
  • βœ… Keeps TensorFlow and PyTorch implementations consistent with the addition of C3x and CrossConv in both model definitions.
  • πŸ“ Adjustments in padding logic ensure that feature maps are properly aligned and there are no discrepancies between different layers' outputs.
  • πŸ”„ Moving CrossConv to common.py suggests it has matured from an experimental feature to a more widely applicable component, potentially affecting a range of current and future models.

@glenn-jocher glenn-jocher self-assigned this May 15, 2022
@glenn-jocher glenn-jocher merged commit fb7fa5b into master May 16, 2022
@glenn-jocher glenn-jocher deleted the update/tfcrossconv branch May 16, 2022 15:02
tdhooghe pushed a commit to tdhooghe/yolov5 that referenced this pull request Jun 10, 2022
* New TensorFlow `TFCrossConv()` module

* Move from experimental to common

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add C3x

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add to C3x to yolo.py

* Add to C3x to tf.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* TFC3x bug fix

* TFC3x bug fix

* TFC3x bug fix

* Add TFDWConv g==c1==c2 check

* Add comment

* Update tf.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* New TensorFlow `TFCrossConv()` module

* Move from experimental to common

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add C3x

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add to C3x to yolo.py

* Add to C3x to tf.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* TFC3x bug fix

* TFC3x bug fix

* TFC3x bug fix

* Add TFDWConv g==c1==c2 check

* Add comment

* Update tf.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.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.

None yet

1 participant