Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the Segment Anything Model to KerasCV (keras-team#1987)
* Start adding components for the segment anything model * SAMLayerNormalization -> keras.layers.LayerNormalization They both behave exactly the same when moving_mean and moving_variance are None and epsilon is 1e-6 * Move the image encoder to detectron2 backbone and fix for tf.keras backend * Address review comments and address saving bug - Use `keras_cv.export_api.keras_cv_export` instead of `keras.saving.register_keras_serializable`. - Add a `SerializableSequential` class to address the saving bug with the `Sequential` model. - Push the helper functions in `keras_cv/layers/detectron2_layers.py` to the bottom of the file. - Add the detectron2 layers to the `keras_cv/layers/__init__.py` file. - Add a test for the `ViTDetPatchingAndEmbedding` layer. * Make the backbone functional; unite MLP and MLPBlock * Address David's review comments * Add SAM Task model; make MaskDecoder and PromptEncoder XLA compatible * Remove a stray file * Add docs for the Task model * Add more references [skip ci] * Remove SerializableSequential layer * detectron2 -> vit_det; add SAM presets; fix ViTDet presets * Increse test tolerence for GCB Run
- Loading branch information