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

Commit

Permalink
minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmarkham committed Apr 4, 2018
1 parent 91ac8a6 commit 43b5e00
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ trait ClassifierBase {
* Takes an array of floats and returns corresponding (Label, Score) tuples
* @param input Indexed sequence one-dimensional array of floats
* @param topK (Optional) How many result (sorting based on the last axis)
* elements to return. Default returns unsorted output
* elements to return. Default returns unsorted output.
* @return Indexed sequence of (Label, Score) tuples
*/
def classify(input: IndexedSeq[Array[Float]],
Expand All @@ -41,7 +41,7 @@ trait ClassifierBase {
* Takes a sequence of NDArrays and returns (Label, Score) tuples
* @param input Indexed sequence of NDArrays
* @param topK (Optional) How many result (sorting based on the last axis)
* elements to return. Default returns unsorted output
* elements to return. Default returns unsorted output.
* @return Traversable sequence of (Label, Score) tuple
*/
def classifyWithNDArray(input: IndexedSeq[NDArray],
Expand Down Expand Up @@ -78,8 +78,8 @@ class Classifier(modelPathPrefix: String,
/**
* Takes flat arrays as input and returns (Label, Score) tuples.
* @param input Indexed sequence one-dimensional array of floats
* @param topK: (Optional) How many result (sorting based on the last axis)
* elements to return. Default returns unsorted output
* @param topK (Optional) How many result (sorting based on the last axis)
* elements to return. Default returns unsorted output.
* @return Indexed sequence of (Label, Score) tuples
*/
override def classify(input: IndexedSeq[Array[Float]],
Expand All @@ -103,7 +103,7 @@ class Classifier(modelPathPrefix: String,
* Also works with batched input.
* @param input Indexed sequence of NDArrays
* @param topK (Optional) How many result (sorting based on the last axis)
* elements to return. Default returns unsorted output
* elements to return. Default returns unsorted output.
* @return Traversable sequence of (Label, Score) tuples
*/
override def classifyWithNDArray(input: IndexedSeq[NDArray], topK: Option[Int] = None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import javax.imageio.ImageIO
* Contains helper methods.
*
* @param modelPathPrefix Path prefix from where to load the model artifacts.
* These include the symbol, parameters, and synset.txt
* These include the symbol, parameters, and synset.txt.
* Example: file://model-dir/resnet-152 (containing
* resnet-152-symbol.json, resnet-152-0000.params, and synset.txt).
* @param inputDescriptors Descriptors defining the input node names, shape,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ class ObjectDetector(modelPathPrefix: String,
protected[infer] val width = imgClassifier.width

/**
* Detects objects and returns bounding boxes with corresponding labels
* Detects objects and returns bounding boxes with corresponding class/label
*
* @param inputImage PathPrefix of the input image
* @param topK Get top k elements with maximum probability
* @return List of List of tuples of
* @param inputImage Path prefix of the input image
* @param topK Number of result elements to return, sorted by probability
* @return List of list of tuples of
* (class, [probability, xmin, ymin, xmax, ymax])
*/
def imageObjectDetect(inputImage: BufferedImage,
Expand All @@ -77,7 +77,7 @@ class ObjectDetector(modelPathPrefix: String,

/**
* Takes input images as NDArrays. Useful when you want to perform multiple operations on
* the input Array, or when you want to pass a batch of input images.
* the input array, or when you want to pass a batch of input images.
*
* @param input Indexed Sequence of NDArrays
* @param topK (Optional) How many top_k (sorting will be based on the last axis)
Expand Down Expand Up @@ -139,7 +139,7 @@ class ObjectDetector(modelPathPrefix: String,
*
* @param inputBatch Input array of buffered images
* @param topK Number of result elements to return, sorted by probability
* @return List of list of tuples of (Label, Probability)
* @return List of list of tuples of (class, probability)
*/
def imageBatchObjectDetect(inputBatch: Traversable[BufferedImage], topK: Option[Int] = None):
IndexedSeq[IndexedSeq[(String, Array[Float])]] = {
Expand Down

0 comments on commit 43b5e00

Please sign in to comment.