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

Commit

Permalink
comments added
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagmote committed Mar 21, 2018
1 parent 03e67b0 commit 22fcac1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ set -e

MXNET_ROOT=$(cd "$(dirname $0)/../../.."; pwd)

data_path=$MXNET_ROOT/examples/scripts/inferexample/imageclassifier/data
data_path=$MXNET_ROOT/scripts/inferexample/imageclassifier/resnet

image_path=$MXNET_ROOT/examples/scripts/inferexample/imageclassifier/image
image_path=$MXNET_ROOT/scripts/inferexample/imageclassifier/images

if [ ! -d "$data_path" ]; then
mkdir -p "$data_path"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ import ml.dmlc.mxnet.infer._
import scala.collection.JavaConverters._
import java.io.File

/**
* Example showing usage of Infer package to do inference on resnet-152 model
* Follow instructions in README.md to run this example.
*/
object ImageClassifierExample {
private val logger = LoggerFactory.getLogger(classOf[ImageClassifierExample])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ provided by MXNet Scala package.
For this tutorial, you can get the model and sample input image by running following bash file.

```bash
cd incubator-mxnet/scala-package/examples/scripts/inferexample/imageclassifier/
bash get_resnet_data.sh
```

## How to run

```bash
bash scala-package/examples/scripts/inferexample/run_predictor_example.sh /resnet/resnet-152 /images/Cat-hd-wallpapers.jpg /images/
cd incubator-mxnet/scala-package/examples/scripts/inferexample/imageclassifier/
bash run_classifier_example.sh resnet/resnet-152 images/Cat-hd-wallpapers.jpg images/
```

There are few options which you can provide to run the example, one can list them by passing `--help`.
Expand All @@ -42,7 +44,7 @@ They are also listed as following:

We provide multiple pre-trained models on various datasets. Use
[Python modelzoo.py](https://github.com/dmlc/mxnet/blob/master/example/image-classification/common/modelzoo.py)
to download these models. These models can be also be downloaded from [here](http://data.mxnet.io/models/imagenet/)
to download these models. These models can be also be downloaded from [here](http://data.mxnet.io/models/imagenet/).

## Infer APIs used

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ import ml.dmlc.mxnet.{DType}
import org.scalatest.{BeforeAndAfterAll, FunSuite}
import sys.process._

/**
* Integration test for imageClassifier example.
* This will run as a part of "make scalatest"
*/
class ImageClassifierExampleSuite extends FunSuite with BeforeAndAfterAll {

test("testImageClassifierExample"){
Expand Down

0 comments on commit 22fcac1

Please sign in to comment.