This repository was archived by the owner on Nov 17, 2023. It is now read-only.
[Clojure] enhance draw bounding box#14567
Merged
Merged
Conversation
… detection example. Adjust the specs and names to make it easier to run with object detection and clojure draw bounding box example
Member
Author
|
@hellonico and @Chouffe Would you mind taking a look and reviewing? |
Contributor
|
Thank you for your contribution @gigasquid |
Chouffe
reviewed
Mar 31, 2019
| (s/def ::ymin integer?) | ||
| (s/def ::ymax integer?) | ||
| (s/def ::coordinate (s/keys :req-un [::xmin ::xmax ::ymin ::ymax])) | ||
| (s/def ::x-min number?) |
Contributor
There was a problem hiding this comment.
Thanks for improving this!
| (is (= true (ImageIO/write new-img "png" (io/file tmp-dir "out.png")))))) | ||
| (is (true? (ImageIO/write new-img "png" (io/file tmp-dir "out.png")))))) | ||
|
|
||
| (deftest test-draw-bounding-box! |
Contributor
There was a problem hiding this comment.
Thank you so much for adding this test!
| :aliases {"run-detector" ["run" "--" "-m" "models/resnet50_ssd/resnet50_ssd_model" "-i" "images/dog.jpg" "-d" "images/"]} | ||
| :dependencies [[org.clojure/clojure "1.9.0"] | ||
| [org.clojure/tools.cli "0.4.1"] | ||
| [origami "4.0.0-3"] |
| @@ -109,7 +114,7 @@ | |||
| (apply concat | |||
Contributor
There was a problem hiding this comment.
Why do we need a concat here? Cant we use a doseq instead of for to force the lazy computation?
Member
Author
There was a problem hiding this comment.
Good idea, but it's also used in the example test to verify the results.
Contributor
|
Thank you for enhancing the example @gigasquid. I left some comments. Overall LGTM! |
Member
Author
|
Thanks @Chouffe for your review and feedback :) |
larroy
pushed a commit
to larroy/mxnet
that referenced
this pull request
Apr 15, 2019
* add test for drawing bounding box * Uses the core image drawing bounding box functionality for the object detection example. Adjust the specs and names to make it easier to run with object detection and clojure draw bounding box example * feedback from @Chouffe * refactor to be 3 top predictions instead of 5 to make the images less crowded
haohuanw
pushed a commit
to haohuanw/incubator-mxnet
that referenced
this pull request
Jun 23, 2019
* add test for drawing bounding box * Uses the core image drawing bounding box functionality for the object detection example. Adjust the specs and names to make it easier to run with object detection and clojure draw bounding box example * feedback from @Chouffe * refactor to be 3 top predictions instead of 5 to make the images less crowded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related issue #14506
This builds on #14533
In particular - it uses the core MXNet draw bounding box functionality in the infer objection detection example to unify the use of it in Scala and Clojure.
It also tweaks some of the specs and input names to make the clojure draw bounding box functionality easier to use from the infer object detection.
New output from object detection example:
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.