addons
addons copied to clipboard
Deformable Convolutional Op Support
System information
- TensorFlow version (you are using):2.0 alpha
- TensorFlow Addons version:0,21
- Is it in the tf.contrib (if so, where):no
- Are you willing to contribute it (yes/no):yes,if i know how to do that
- Are you willing to maintain it going forward? (yes/no):yes
Describe the feature and the current behavior/state. Deformable Convolutional Network(https://arxiv.org/pdf/1703.06211.pdf,https://arxiv.org/pdf/1703.06211.pdf) has achieved good results in the du detection task.But the current version of Tensorflow does not seem to implement deformable convolution operations.The efficiency of some third-party implementations of deformable convolution operations is lower than that of the mxnet version(https://github.com/msracver/Deformable-ConvNets).I hope that Tensorflow can add native deformable convolution operations in future versions. Thanks. Will this change the current api? How? Yes,Add a new op Who will benefit with this feature? Any one want to use tensorflow for object detection. Any Other info.
Here's a python only implementation of v1 for Keras which can be ported to TF-Keras. This repository is the official implementation with CUDA code; it's written using MXNet but it can be ported over to TensorFlow.
Here are the papers:
I can start working on this if needed. I'll get the python implementation for v2 up and running first, followed by the proper CUDA/C++ implementation.
Here's a python only implementation of v1 for Keras which can be ported to TF-Keras. This repository is the official implementation with CUDA code; it's written using MXNet but it can be ported over to TensorFlow. Here are the papers:
Deformable Convolutional Networks Deformable ConvNets v2
I can start working on this if needed. I'll get the python implementation for v2 up and running first, followed by the proper CUDA/C++ implementation.
Thanks for reply.And here is a Mask RCNN implemented by Tensorflow that may help test.
@rootkitchao Welcome, William. I think you can go first because you seems willing to contribute the codes, right?
Are you willing to contribute it (yes/no):yes,if i know how to do that
Sorry for the delay, and thank @Squadrick for the reference paper and implementation :-)
@rootkitchao Any update? I can work on this if you aren't.
Using native CUDA for deform conv is dependant on #118 .
I tried to look into it, but it is too hard for me to do as I don't have experience in CUDA.
I wonder how hard would it be to port this implementation (tf1.4) to tf2.0 : https://github.com/Zardinality/TF-deformable-conv
This is the first version of the paper, but ideally it would be nice to have deformable-conv V2 : https://arxiv.org/abs/1811.11168 For which there is an implementation for pytorch, as cited by @Squadrick
Thank you
@Squadrick you mentioned you'd implement DCN v2 in TF 2 : is this something you're having progress with ?
@vlordier Nope, haven't found the time to get around to this. Feel free to open a PR if you decide to work on this.
/cc @smallsunsun1
/cc @smallsunsun1
I implemented a Deformable Conv2D V2 And DeformablePsROIAlign operation In both cpu and gpu according to mmdetection https://github.com/open-mmlab/mmdetection. My implenmentation is https://github.com/smallsunsun1/custom_ops/tree/master/deformable_conv2d_ops_new , which support tf2.0 and built by CMake.
@smallsunsun1 Do you want to officially PR your impl on TF addons?
@bhack Maybe I can have a try, but I haven't PR before, it may task some time==
@bhack Maybe I can have a try, but I haven't PR before, it may task some time==
Please let us know if there is anyway we can help. We have some documentation to get you started.
TFA pull requests: https://github.com/tensorflow/addons/blob/master/CONTRIBUTING.md#pull-requests Getting started with contributions: https://github.com/gabrieldemarmiesse/getting_started_open_source
@seanpmorgan I clone the addons repo, tested my deformable_conv2d impl in local, building passed in tensorflow2.0 and cuda10.0, noticed the lastest branch is target in tensorflow2.1 and cuda10.1. But I can't have a cuda10.1 environment to test the code. Is there any problem if I push a request
@seanpmorgan I clone the addons repo, tested my deformable_conv2d impl in local, building passed in tensorflow2.0 and cuda10.0, noticed the lastest branch is target in tensorflow2.1 and cuda10.1. But I can't have a cuda10.1 environment to test the code. Is there any problem if I push a request
Not at all. We have CI testing that will run it on GPU for you (So even if you didn't have a GPU you could still test it.) We welcome WIP PRs so feel free to start the PR and we can go from there.
already open a PR https://github.com/tensorflow/addons/pull/1129, support DeformableConv2d ,DeformablepsROIalign and EquiConv
Do you have any news about the progress of this PR and deformable convolutions in TensorFlow?
I've created new PR since the previous PR is stale and contains the unknown license code. I'd like to make my PR reviewed before it gets stale ;-). https://github.com/tensorflow/addons/pull/2196
Hello. I hope you are good. There is no implementation of deformable convolution in tensorflow2. Could someone please help me? There is a deform conv class where you can use it in tensorflow2 but you can not use it in tensorflow model? How can I make this class to be usable in models?
@aAmohammadrezaaA The state of deformable convolution in tensorflow 2 is tearful. There were several different merge requests with different implementations. I tried in the past some of them and all were quite good and working. However both tensorflow team and tf-addons team have little time to do good PR and integration it to the framework. The best advice right now is to try different framework if you want to have a good support of deformable convolutions.
TensorFlow Addons is transitioning to a minimal maintenance and release mode. New features will not be added to this repository. For more information, please see our public messaging on this decision: TensorFlow Addons Wind Down
Please consider sending feature requests / contributions to other repositories in the TF community with a similar charters to TFA: Keras Keras-CV Keras-NLP