Giter Site home page Giter Site logo

keras-cv's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keras-cv's Issues

End to end model.fit() performance testing w/ COCO metrics

Some comments on this:

  • we can use a Keras callback to track the runtimes of each step
  • we must omit the first batch, as this will include the Keras compilation step
  • we can test the model runtime with/without each metric, this will give us a reference as to how expensive the metrics are. No metric should increase runtime by more than a factor of 2x

Channel/Spatial/Element wise Attention Modules

In the timm package, it provides some soft attention modules to building network blocks and I think it's a good fit here, for example:

and many others.

Document "Auxiliary Tasks"

These are not the focus of KerasCV, but are in scope of creating state of the art models for one of the focus tasks.

A great example of this is model visualization

Standardized / preferred way to implement blocks and models.

Given the models requirements are being gathered in the discussion, is there a preferred way to implement them?

There are multiple ways, to implement blocks and models:

  1. keras.applications way -> Models and blocks are functional Example.
  2. Model Garden way -> Model is functional, but blocks are layer subclasses. (even though the model is a direct subclass, it does not override call method).
  3. Blocks are layer subclasses, and models are model subclasses of keras.layers.Layer and keras.Model respectively. Both implement call method.

Each way has it's own benefits and drawbacks. Is one of the above preferred? Or maybe something entirely different?

Reorder channel layer for smooth native RGB - BGR

This is a commonly performed operation in image processing making it a good fit for keras-cv. While this is not a super complicated operation (it's really just a lambda into a tf.gather) the resulting code is more readable. Let's include this in keras-cv.

Originally discussed here: keras-team/keras#15705

Re the design of the layer signature...

The current proposal is to implement a layer that looks like this:

rgb2bgr_layer = tf.keras.layers.ReorderChannel(order=[2, 1, 0], axis=-1)

Perhaps we actually may want to use a einsum inspired syntax, such as:

rgb2bgr_layer = tf.keras.layers.ReorderChannel('rgb->bgr', axis=-1)

This would be really readable to anyone stumbling upon a new codebase, and generalizes quite well to any number of channels.

Please feel free to comment below with any additional thoughts

Vectorize/Optimize the COCORecall metric

Lots of the for loops in the COCORecall update_state method could be reduced to tf.einsum() calls. Additionally, we should be able to vectorize area computation in the iou function, along with some other operations in the overall computation of the metric. tf.TensorArrays are quite slow, so we should look to remove those if possible.

RandomCutMix, RandomMixUp augmentation

These two well-known and very effective augmentation methods are widely used among ML practitioners. In keras, we can find some general augmentation . And these two augmentation methods can be included as advanced augmentation layers.

CutMix - Paper - Cited by ~ 865
MixUp - Paper - Cited by ~ 2675

Let's add these to
keras_cv.layers.RandomCutMix and keras_cv.layers.RandomMixUp.

Add `ResNeXt [50, 101]` to keras.applications

System information.

TensorFlow version (you are using): 2.5
Are you willing to contribute it (Yes/No) : Yes

Describe the feature and the current behavior/state.

ResNeXt is a well-known classification model that is weirdly missing from the keras.applications. The idea that is presented here is great and I think it's fit for the model member in the keras package.

Will this change the current api? How?
Yes.

from tensorflow.keras.applications.resnext50 import ResNeXt50
from tensorflow.keras.applications.resnext101 import ResNeXt101

Who will benefit from this feature?
ML engineers and researcher who uses tf.keras.

Others
Others implementation: https://github.com/qubvel/classification_models

fill_utils tests

This module came about due to some shared functionality that was originally tested within the layers. As long as this is shared, it would be good to unit test it.

CutMix augmentation for Object Detection task.

[Reposting from here as a future reference for potential contributor].

CutMix - Paper - Cited by ~ 865
MixUp - Paper - Cited by ~ 2675


Currently, this aug can be applied to classification tasks but as the kerascv sets the target to general vision task, that's why to support vision tasks like object detection, we may need to add utility to accept the bbox_params argument too.

example of mixup-object-detection - region=full-images
image

example of mixup-object-detection - region=random
image

example of cutmix-object-detection
Screenshot 2022-01-08 214414

ref: https://www.kaggle.com/ankursingh12/data-augmentation-for-object-detection
ref: https://www.kaggle.com/shonenkov/oof-evaluation-mixup-efficientdet

Add Swin-Transformer to keras.applications

If you open a GitHub issue, here is our policy:

It must be a bug, a feature request, or a significant problem with the documentation (for small docs fixes please send a PR instead).
The form below must be filled out.

Here's why we have that policy:.

Keras developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.

System information.

TensorFlow version (you are using): 2.6
Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state.

Describe the feature clearly here. Be sure to convey here why the requested feature is needed. Any brief description of the use-case would help.

Paper: Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
Original Code: https://github.com/microsoft/Swin-Transformer?utm_source=catalyzex.com

It's a variant of the transformer model and achieves state-of-the-art performance or comparable performance with the best CNN-based models. It also contains enough citations (~250 at this moment) for addition to the package.

On ImageNet-1K and 22K, below is the comparable results with EfficientNet (CNN) models.

- Img Size Top 1K acc - Img Size Top 1K acc Top 22K acc
E3 300 81.6 EfficientNetV2-S - 83.9 84.9
E5 456 83.6 EfficientNetV2-M - 85.1 86.2
E7 600 84.3 EfficientNetV2-L - 85.7 86.8
- - - EfficientNetV2-XL - - 87.3
Swin-T 224 81.3 Swin-B 224 - 85.2
Swin-S 224 83.0 Swin-B 384 - 86.4
Swin-B 224 83.5 Swin-L 384 - 87.3
Swin-B 384 84.5 - - - -

Will this change the current api? How?
Yes. It will change as follows

tensorflow.keras.applications.SwinT
tensorflow.keras.applications.SwinS
tensorflow.keras.applications.SwinB
tensorflow.keras.applications.SwinL

Who will benefit from this feature?
Keras users.

Contributing

  • Do you want to contribute a PR? (yes/no): yes.
  • If yes, please read this page for instructions
  • Briefly describe your candidate solution(if contributing):

Create a CONTRIBUTING.MD guide

From a PR review:

Do we want to have a paper citation treshold or any other evalustion metric?

We want an adoption metric of some kind, and a citation threshold (~50) is a convenient metric.

What about the component maintainership policiy? Can we scale over the community maintainership/ownership of the components?

We'll try. Someone who contributes a component will be called to fix issues with it if any arise.

I think also that we could not go to only accumulate components over time how we are going to evaluate and handle deprecations?

Deprecation decisions are always the result of cost/benefits analysis. The picture varies from component to component and over the lifetime of the repo. It's a case by case basis.

I suppose that we could partially use the README.MD for this and partially CONTRIBUTING.MD

Yes, this is mostly information that should go in the contributors' guide.

COCORecall should support XLA compilation

Current error when running in mirrored mode:

ValueError: SyncOnReadVariable does not support assign_add in cross-replica context when aggregation is set to tf.VariableAggregation.SUM.

If we can compile to XLA we can also run on TPUs.

ResNet18

Note: Owen is already working on this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.