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

[MXNET-1180] Java Image API #13807

Merged
merged 11 commits into from Jan 31, 2019
Merged

[MXNET-1180] Java Image API #13807

merged 11 commits into from Jan 31, 2019

Conversation

lanking520
Copy link
Member

Description

As title described, add Scala Image API to Java...
@zachgk @piyushghai @andrewfayres

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

@anirudhacharya
Copy link
Member

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

@marcoabreu marcoabreu added Java Label to identify Java API component pr-awaiting-review PR is waiting for code review labels Jan 9, 2019
@lanking520 lanking520 force-pushed the javaimage branch 2 times, most recently from 70cadec to 4936b6a Compare January 15, 2019 00:02
@lanking520 lanking520 changed the title [MXNET-1180][WIP] Java Image API [MXNET-1180] Java Image API Jan 15, 2019
"--model-path-prefix", modelPathPrefix,
"--input-image", inputImagePath
};
example.main(args);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the test to simply run the example code ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the example test is to verify the example is still working...

* @return org.apache.mxnet.NDArray
*/
def imResize(src: NDArray, w: Int, h: Int, interp: Integer): NDArray = {
val interpVal = if (interp == null) None else Some(interp.intValue())
Copy link
Contributor

Choose a reason for hiding this comment

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

You can just use Option(interp.intValue())

Copy link
Member Author

Choose a reason for hiding this comment

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

This will cause a null pointer exception, since users may send null in

@@ -15,6 +15,7 @@

<properties>
<skipTests>true</skipTests>
<skipJavaTests>${skipTests}</skipJavaTests>
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this for? I don't think it is valid in maven to set one property based on another property and it is just set to false in modules which have java tests to run

Copy link
Member Author

Choose a reason for hiding this comment

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

This keeps control of a Junit test is going to run or not, by default it is set to be false. In fact, this is working...

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.

Looks good to me.

@lanking520
Copy link
Member Author

@sandeep-krishnamurthy could you please give a review?

@lanking520 lanking520 merged commit 9a3e4a0 into apache:master Jan 31, 2019
stephenrawls pushed a commit to stephenrawls/incubator-mxnet that referenced this pull request Feb 16, 2019
* add java example

* add test and change PredictorExample

* add image change

* Add minor fixes

* add License

* add predictor Example tests

* fix the issue with JUnit test

* Satisfy Lint God ʕ •ᴥ•ʔ

* update the pom file config

* update documentation

* add simplified methods
@lanking520 lanking520 deleted the javaimage branch March 11, 2019 22:28
vdantu pushed a commit to vdantu/incubator-mxnet that referenced this pull request Mar 31, 2019
* add java example

* add test and change PredictorExample

* add image change

* Add minor fixes

* add License

* add predictor Example tests

* fix the issue with JUnit test

* Satisfy Lint God ʕ •ᴥ•ʔ

* update the pom file config

* update documentation

* add simplified methods
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
* add java example

* add test and change PredictorExample

* add image change

* Add minor fixes

* add License

* add predictor Example tests

* fix the issue with JUnit test

* Satisfy Lint God ʕ •ᴥ•ʔ

* update the pom file config

* update documentation

* add simplified methods
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-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants