-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-1285] Draw bounding box with Scala/Java Image API #14474
Conversation
@mxnet-label-bot add[pr-awaiting-review] |
@mxnet-label-bot add[Scala, Java] |
scala-package/core/src/main/scala/org/apache/mxnet/javaapi/Image.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
@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. |
The recent commit cancelled the check on top-left corn because of overlapping text |
There was a problem hiding this 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) | ||
} |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
Find a Java bug during adding this into Object Detector. This commit include that fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
@mxnet-label-bot update[pr-awaiting-merge] |
@mxnet-label-bot add[Java, Scala] |
* 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
* 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
* 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
* 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
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.