Is it possible to implement CondInst in TensorFlow?

I would like to implement Instance segmentation in TensorFlow 2+ based on CondInst + CenterNet. CondInst is currently implemented only in PyTorch. I saw the implementation in pytorch and I’m not sure if this is possible in tensorflow …

The paper is interesting

Has anyone worked on it? Any tips?
Thank you!

You need to write your CondConv custom layer like this (not personally tested):

Centernet models are available in the Model Gardens research section:

Thanks for suggestion, really appreciate it.

Actually this implementation that you posted is more like Mixture of Experts than CondConv: see discussion github prstrive/CondConv-tensorflow/issues/1

And instead of doing the CondConv on previous convolution outputs (the number of outputs is always the same), we need to do it on instances of detected objects (the number of objects is different for every image).

You can create your CondConv custom layer from the original impl:

Or request the off the shelf model at: