Adding Differential Binarization model from PaddleOCR to Keras3
This adds the Differntial Binarization model for text detection.
Implemented the architecture based on ResNet50_vd from PaddleOCR and ported the weights.
Let's split this up. Start with ResNetVD backbone?
Some notes...
- Remove the aliases. One
ResNetVDBackbonecan handle all of these with different presets. - Conversion scripts as scripts not colabs.
- Follow the local style for backbones as closely as possible. See some comments here https://github.com/keras-team/keras-nlp/pull/1737
- Keep models a flat directory. No
backbones/xxetc. - Add some tests.
@gowthamkpr is the PR ready for review?
Hi @gowthamkpr! can you please refactor the code to KerasHub style?
- [ ] Add a preprocessor flow
- [ ] subclass image segementer model for the task class
- [ ] add preset class
- [ ] add standard test routines
Hi @gowthamkpr! can you please refactor the code to KerasHub style?
I've refactored using SAM as example.
* [ ] Add a preprocessor flow
I've added DifferentialBinarizationPreprocessor and DifferentialBinarizationImageConverter.
* [ ] subclass image segementer model for the task class
I've subclassed ImageSegmenter, but I left the custom compile() method, since we need a different loss than the one used in ImageSegmenter's compile().
* [ ] add preset class
Done. The model is not yet in Kaggle, so I've disabled the presets test for now.
* [ ] add standard test routines
Done. Not sure if there are additional standard test routines other than the ones used in SAM that should be run.
Closing this since the continuation PR is in progress here https://github.com/keras-team/keras-hub/pull/2095