keras-team / keras-cv

Industry-strength Computer Vision workflows with Keras
Other
1.01k stars 330 forks source link

Reorganize [ops] and [custom_ops] #1010

Closed LukeWood closed 1 year ago

LukeWood commented 1 year ago

Currently, we have some tech debt here: ops contains some custom layers as well as some ops. We should really fix this and put the components that are like layers under layers instead of ops. Then we can merge custom_ops into the ops directory.

Its confusing to have both.

bhack commented 1 year ago

Do you have any example?

LukeWood commented 1 year ago

custom_ops: https://github.com/keras-team/keras-cv/tree/master/keras_cv/custom_ops

should live under ops because it contains tensorflow ops.

ops on the other hand contains a ton of stuff (BoxMatcher, etc), but also IoU3D which is a custom TF op:

https://github.com/keras-team/keras-cv/tree/master/keras_cv/ops

innat commented 1 year ago

Why tensorflow ops is here in the first place? Also it looks bazel is reuqired to build custom ops. It looks weird to see these in here as well.

bhack commented 1 year ago

Why tensorflow ops is here in the first place? Also it looks bazel is reuqired to build custom ops. It looks weird to see these in here as well.

What do you mean?

innat commented 1 year ago

I mean, why do we need to write C code for some custom operations (ie. PairwiseIou3D?

bhack commented 1 year ago

@innat Probably you missed these threads: https://github.com/keras-team/keras-cv/pull/890#issuecomment-1271405782 https://github.com/openxla/xla/discussions/17

bhack commented 1 year ago

@innat And more recently new c++ custom ops with https://github.com/keras-team/keras-cv/pull/1020

LukeWood commented 1 year ago

Still a few utils to fix