Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[MXNET-1285] Draw bounding box with Scala/Java Image API #14474

Merged
merged 5 commits into from
Mar 26, 2019

Conversation

lanking520
Copy link
Member

@lanking520 lanking520 commented Mar 20, 2019

Description

As title mentioned above, now you can draw bounding boxes with Scala/Java Image API.
@andrewfayres @frankfliu @zachgk @gigasquid

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@pinaraws
Copy link

@mxnet-label-bot add[pr-awaiting-review]

@marcoabreu marcoabreu added the pr-awaiting-review PR is waiting for code review label Mar 20, 2019
@pinaraws
Copy link

@mxnet-label-bot add[Scala, Java]

@marcoabreu marcoabreu added Java Label to identify Java API component Scala labels Mar 20, 2019
Copy link
Contributor

@marcoabreu marcoabreu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests added don't really verify the action that has been taken. Would it be possible to add a really simple script that reads the image and asserts that the requested rectangle exists? A simple iterator that goes along the edges of the rectangle and verifies the colour should be sufficient

@lanking520
Copy link
Member Author

@marcoabreu add some pointwise checking on the bounding box in Scala. So the test will check the color of the four corners to make sure if they have the same color.

@lanking520
Copy link
Member Author

lanking520 commented Mar 20, 2019

The recent commit cancelled the check on top-left corn because of overlapping text

@lanking520 lanking520 self-assigned this Mar 20, 2019
Copy link
Contributor

@piyushghai piyushghai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments, otherwise LGTM

val downRight = buf.getRGB(coord("xmax"), coord("ymax"))
require(downLeft == downRight)
require(topRight == downRight)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also clean up the file we created in the unit test here ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it is created under the temp folder, system will clean it up in a certain period

@lanking520
Copy link
Member Author

Find a Java bug during adding this into Object Detector. This commit include that fix

@gigasquid
Copy link
Member

Tested and it works with the Clojure package through interop 😸

out

I'll open an issue for the Clojure package to pick up the new feature in the core package.

Copy link
Member

@gigasquid gigasquid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@pinaraws
Copy link

@mxnet-label-bot update[pr-awaiting-merge]

@marcoabreu marcoabreu added pr-awaiting-merge Review and CI is complete. Ready to Merge and removed Java Label to identify Java API component Scala pr-awaiting-review PR is waiting for code review labels Mar 25, 2019
@pinaraws
Copy link

@mxnet-label-bot add[Java, Scala]

@marcoabreu marcoabreu added Java Label to identify Java API component Scala labels Mar 25, 2019
@lanking520 lanking520 merged commit 092af36 into apache:master Mar 26, 2019
vdantu pushed a commit to vdantu/incubator-mxnet that referenced this pull request Mar 31, 2019
* new feature to draw bounding box

* add Java support

* add point wise verification

* cancel the check on top-left corner

* add this example to Java world and fixing bugs
ZhennanQin pushed a commit to ZhennanQin/incubator-mxnet that referenced this pull request Apr 3, 2019
* new feature to draw bounding box

* add Java support

* add point wise verification

* cancel the check on top-left corner

* add this example to Java world and fixing bugs
nswamy pushed a commit that referenced this pull request Apr 5, 2019
* new feature to draw bounding box

* add Java support

* add point wise verification

* cancel the check on top-left corner

* add this example to Java world and fixing bugs
@lanking520 lanking520 deleted the boundingbox branch April 8, 2019 18:29
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
* new feature to draw bounding box

* add Java support

* add point wise verification

* cancel the check on top-left corner

* add this example to Java world and fixing bugs
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Java Label to identify Java API component pr-awaiting-merge Review and CI is complete. Ready to Merge Scala
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants