Skip to content

A custom GPU & CPU op for tensorflow to calculate the rotated/skew IOU of two lists of boxes.

License

Notifications You must be signed in to change notification settings

fellhorn/tensorflow_rotated_iou_op

Repository files navigation

TensorFlow Rotated IOU GPU & CPU op

Calculate the piecewise rotated/skew IOU of two lists of boxes.

Based on the custom op guide for TensorFlow

Quick build guide:

docker pull tensorflow/tensorflow:2.1.0-custom-op-gpu-ubuntu16 # so far there is no image for tensorflow-2.2.0

docker run -it -v ${PWD}:/working_dir -w /working_dir tensorflow/tensorflow:2.1.0-custom-op-gpu-ubuntu16

Within the docker container:

# Answer all questions with Y
./configure.sh
bazel build build_pip_pkg
bazel-bin/build_pip_pkg artifacts

You will find a python whl file in the artifacts folder.

Tests

To run the tests:

export PATH=/usr/local/cuda-10.1/bin/:/usr/local/cuda-10.1/lib64/:$PATH
make rotated_iou_test

Benchmark

There are some test to measure the performance under real world use cases:

export PATH=/usr/local/cuda-10.1/bin/:/usr/local/cuda-10.1/lib64/:$PATH
make benchmark

Help

Some FAQ answers can be found with the original repo:

the custom op guide for TensorFlow

About

A custom GPU & CPU op for tensorflow to calculate the rotated/skew IOU of two lists of boxes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published