Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IoU3D as a custom c++ op (CPU) #890

Merged
merged 36 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6bcac82
Initial custom ops testing
ianstenbit Oct 6, 2022
87bcb8e
Switch to cpp14
ianstenbit Oct 7, 2022
2c87da0
Add include_package_data flag
ianstenbit Oct 7, 2022
3112a03
cpp17
ianstenbit Oct 7, 2022
3b92be3
Configure CI tests
ianstenbit Oct 7, 2022
b26f9d7
Formatting
ianstenbit Oct 7, 2022
99b3b92
Call configure before running bazel build for CI
ianstenbit Oct 7, 2022
da958cf
Verbose failures for CI/Bazel
ianstenbit Oct 7, 2022
734f74d
Switch to tf-cpu for test flow
ianstenbit Oct 7, 2022
a25796d
Use build dep impls from TFA
ianstenbit Oct 7, 2022
2143176
Update cloudbuild workflow to build binaries from source
ianstenbit Oct 7, 2022
3b10e4a
Update cloudbuild docks (updated docker image)
ianstenbit Oct 7, 2022
3b707b1
Update GPU tests to TF 2.10
ianstenbit Oct 7, 2022
6085f7a
Update copyright and docstrings
ianstenbit Oct 7, 2022
4d62a16
Move loss to internal, update README and CONTRIBUTING.md
ianstenbit Oct 7, 2022
b91ba90
Update to IoU op ported from Lingvo
ianstenbit Oct 18, 2022
72a4f11
Merge branch 'master' into bin
ianstenbit Oct 18, 2022
0157c4e
Remove cuda config
ianstenbit Oct 18, 2022
9d74837
Merge branch 'bin' of github.com:ianstenbit/keras-cv into bin
ianstenbit Oct 18, 2022
2b1fa02
Make iou3d a real keras loss
ianstenbit Oct 18, 2022
6468eb7
Skip custom-ops tests in devcontainer
ianstenbit Oct 18, 2022
8ac5bfe
Review comments
ianstenbit Oct 18, 2022
46f8200
Merge branch 'master' into bin
ianstenbit Oct 18, 2022
081fa29
Remove skipping of IoU test from devcontainer (it is now opt-in)
ianstenbit Oct 18, 2022
da49210
Merge branch 'bin' of github.com:ianstenbit/keras-cv into bin
ianstenbit Oct 18, 2022
3b9aa15
Fix environment variable for windows
ianstenbit Oct 18, 2022
146a959
Update environment variable setting
ianstenbit Oct 18, 2022
870e795
Use env in yaml for environment variable
ianstenbit Oct 18, 2022
982d3ba
Review comments
ianstenbit Oct 18, 2022
eb585bc
Make IoU a metric, not a loss. Also update Cpp implementation to comp…
ianstenbit Oct 18, 2022
c4a7fa6
typo
ianstenbit Oct 18, 2022
f7f6b73
Make test case more demonstrative
ianstenbit Oct 18, 2022
b0b4263
Switch to a single binary, remove binary from git
ianstenbit Oct 18, 2022
131872a
Move IoU3D from metrics to ops
ianstenbit Oct 21, 2022
2b138d9
Switch to full matrix computation of iou
ianstenbit Oct 21, 2022
8a54df4
Formatting
ianstenbit Oct 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Formatting
  • Loading branch information
ianstenbit committed Oct 7, 2022
commit b26f9d7014b51fcbce2cffe925f36d990f1a0cfc
3 changes: 1 addition & 2 deletions build_deps/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
#


import logging
import os
import pathlib
import platform
import logging

import tensorflow as tf

from packaging.version import Version

_TFA_BAZELRC = ".bazelrc"
Expand Down
1 change: 0 additions & 1 deletion keras_cv/losses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@
from keras_cv.losses.iou_loss import IoULoss
from keras_cv.losses.simclr_loss import SimCLRLoss
from keras_cv.losses.smooth_l1 import SmoothL1Loss
from keras_cv.losses.smooth_l1 import SmoothL1Loss
3 changes: 2 additions & 1 deletion keras_cv/losses/iou_3d_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
from tensorflow.python.platform import resource_loader

iou_3d_ops = load_library.load_op_library(
resource_loader.get_path_to_datafile('../custom_ops/_zero_out_ops.so'))
resource_loader.get_path_to_datafile("../custom_ops/_zero_out_ops.so")
)
iou_3d = iou_3d_ops.zero_out
10 changes: 4 additions & 6 deletions keras_cv/losses/iou_3d_loss_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@


class IoU3DTest(tf.test.TestCase):
def testOpCall(self):
self.assertAllClose(IoU3DLoss([[1, 2], [3, 4]]), [[1, 0], [0, 0]])

def testOpCall(self):
self.assertAllClose(
IoU3DLoss([[1, 2], [3, 4]]), [[1, 0], [0, 0]])


if __name__ == '__main__':
test.main()
if __name__ == "__main__":
tf.test.main()
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@


class BinaryDistribution(Distribution):
"""This class is needed in order to create OS specific wheels."""
"""This class is needed in order to create OS specific wheels."""

def has_ext_modules(self):
return True
def has_ext_modules(self):
return True

def is_pure(self):
return False
def is_pure(self):
return False


setup(
Expand Down