Skip to content

Commit d49682b

Browse files
lu-wang-gxunkai55
authored andcommitted
Fix Java API doc errors in Task Vision library
PiperOrigin-RevId: 373926132
1 parent 56ea533 commit d49682b

File tree

5 files changed

+44
-43
lines changed

5 files changed

+44
-43
lines changed

tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/core/vision/ImageProcessingOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
* expressed in the unrotated frame of reference coordinates system, i.e. in {@code [0,
4141
* TensorImage.getWidth()) x [0, TensorImage.getHeight())}, which are the dimensions of the
4242
* underlying image data before any orientation gets applied. If the region is out of these bounds,
43-
* the inference method, such as {@link ImageClassifier#classify}, will return error.
43+
* the inference method, such as {@link
44+
* org.tensorflow.lite.task.vision.classifier.ImageClassifier#classify}, will return error.
4445
*/
4546
@AutoValue
4647
public abstract class ImageProcessingOptions {

tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision/classifier/ImageClassifier.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,11 @@ private ImageClassifierOptions(Builder builder) {
377377
* <p>{@link ImageClassifier} supports the following {@link TensorImage} color space types:
378378
*
379379
* <ul>
380-
* <li>{@link ColorSpaceType#RGB}
381-
* <li>{@link ColorSpaceType#NV12}
382-
* <li>{@link ColorSpaceType#NV21}
383-
* <li>{@link ColorSpaceType#YV12}
384-
* <li>{@link ColorSpaceType#YV21}
380+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#RGB}
381+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#NV12}
382+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#NV21}
383+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#YV12}
384+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#YV21}
385385
* </ul>
386386
*
387387
* @param image a UINT8 {@link TensorImage} object that represents an RGB or YUV image
@@ -398,20 +398,20 @@ public List<Classifications> classify(TensorImage image) {
398398
* <p>{@link ImageClassifier} supports the following options:
399399
*
400400
* <ul>
401-
* <li>Region of interest (ROI) (through {@link ImageProcessingOptions#Builder#setRoi}). It
401+
* <li>Region of interest (ROI) (through {@link ImageProcessingOptions.Builder#setRoi}). It
402402
* defaults to the entire image.
403-
* <li>image rotation (through {@link ImageProcessingOptions#Builder#setOrientation}). It
404-
* defaults to {@link ImageProcessingOptions#Orientation#TOP_LEFT}.
403+
* <li>image rotation (through {@link ImageProcessingOptions.Builder#setOrientation}). It
404+
* defaults to {@link ImageProcessingOptions.Orientation#TOP_LEFT}.
405405
* </ul>
406406
*
407407
* <p>{@link ImageClassifier} supports the following {@link TensorImage} color space types:
408408
*
409409
* <ul>
410-
* <li>{@link ColorSpaceType#RGB}
411-
* <li>{@link ColorSpaceType#NV12}
412-
* <li>{@link ColorSpaceType#NV21}
413-
* <li>{@link ColorSpaceType#YV12}
414-
* <li>{@link ColorSpaceType#YV21}
410+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#RGB}
411+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#NV12}
412+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#NV21}
413+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#YV12}
414+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#YV21}
415415
* </ul>
416416
*
417417
* @param image a UINT8 {@link TensorImage} object that represents an RGB or YUV image

tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision/detector/ObjectDetector.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -397,11 +397,11 @@ private ObjectDetectorOptions(Builder builder) {
397397
* <p>{@link ObjectDetector} supports the following {@link TensorImage} color space types:
398398
*
399399
* <ul>
400-
* <li>{@link ColorSpaceType#RGB}
401-
* <li>{@link ColorSpaceType#NV12}
402-
* <li>{@link ColorSpaceType#NV21}
403-
* <li>{@link ColorSpaceType#YV12}
404-
* <li>{@link ColorSpaceType#YV21}
400+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#RGB}
401+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#NV12}
402+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#NV21}
403+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#YV12}
404+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#YV21}
405405
* </ul>
406406
*
407407
* @param image a UINT8 {@link TensorImage} object that represents an RGB or YUV image
@@ -418,17 +418,17 @@ public List<Detection> detect(TensorImage image) {
418418
* <p>{@link ObjectDetector} supports the following {@link TensorImage} color space types:
419419
*
420420
* <ul>
421-
* <li>{@link ColorSpaceType#RGB}
422-
* <li>{@link ColorSpaceType#NV12}
423-
* <li>{@link ColorSpaceType#NV21}
424-
* <li>{@link ColorSpaceType#YV12}
425-
* <li>{@link ColorSpaceType#YV21}
421+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#RGB}
422+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#NV12}
423+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#NV21}
424+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#YV12}
425+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#YV21}
426426
* </ul>
427427
*
428428
* @param image a UINT8 {@link TensorImage} object that represents an RGB or YUV image
429429
* @param options {@link ObjectDetector} only supports image rotation (through {@link
430-
* ImageProcessingOptions#Builder#setOrientation}) currently. The orientation of an image
431-
* defaults to {@link ImageProcessingOptions#Orientation#TOP_LEFT}.
430+
* ImageProcessingOptions.Builder#setOrientation}) currently. The orientation of an image
431+
* defaults to {@link ImageProcessingOptions.Orientation#TOP_LEFT}.
432432
* @throws AssertionError if error occurs when processing the image from the native code
433433
* @throws IllegalArgumentException if the color space type of image is unsupported
434434
*/

tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision/segmenter/ColoredLabel.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public abstract class ColoredLabel {
3232
* @param label the label string, as provided in the label map packed in the TFLite Model
3333
* Metadata.
3434
* @param displayName the display name of label, as configured through {@link
35-
* ImageSegmenter#ImageSegmenterOptions#Builder#setDisplayNamesLocale}
35+
* ImageSegmenter.ImageSegmenterOptions.Builder#setDisplayNamesLocale}
3636
* @param argb the color components for the label in ARGB. See <a
3737
* href="https://developer.android.com/reference/android/graphics/Color#color-ints">Android
3838
* Color ints.</a> for more details.
@@ -43,12 +43,12 @@ public static ColoredLabel create(String label, String displayName, int argb) {
4343
}
4444

4545
/**
46-
* Creates a {@link ColoredLabel} object with a {@link Color} instance.
46+
* Creates a {@link ColoredLabel} object with a {@link android.graphics.Color} instance.
4747
*
4848
* @param label the label string, as provided in the label map packed in the TFLite Model
4949
* Metadata.
5050
* @param displayName the display name of label, as configured through {@link
51-
* ImageSegmenter#ImageSegmenterOptions#Builder#setDisplayNamesLocale}
51+
* ImageSegmenter.ImageSegmenterOptions.Builder#setDisplayNamesLocale}
5252
* @param color the color components for the label. The Color instatnce is supported on Android
5353
* API level 26 and above. For API level lower than 26, use {@link #create(String, String,
5454
* int)}. See <a
@@ -74,7 +74,7 @@ public static ColoredLabel create(String label, String displayName, Color color)
7474
public abstract int getArgb();
7575

7676
/**
77-
* Gets the {@link Color} instance of the underlying color.
77+
* Gets the {@link android.graphics.Color} instance of the underlying color.
7878
*
7979
* <p>The Color instatnce is supported on Android API level 26 and above. For API level lower than
8080
* 26, use {@link #getArgb()}. See <a

tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision/segmenter/ImageSegmenter.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
* is the number of classes supported by the model.
6161
* <li>optional (but recommended) label map(s) can be attached as AssociatedFile-s with type
6262
* TENSOR_AXIS_LABELS, containing one label per line. The first such AssociatedFile (if
63-
* any) is used to fill the class name, i.e. {@link ColoredLabel#getClassName} of the
63+
* any) is used to fill the class name, i.e. {@link ColoredLabel#getlabel} of the
6464
* results. The display name, i.e. {@link ColoredLabel#getDisplayName}, is filled from
6565
* the AssociatedFile (if any) whose locale matches the `display_names_locale` field of
6666
* the `ImageSegmenterOptions` used at creation time ("en" by default, i.e. English). If
@@ -256,11 +256,11 @@ public abstract static class Builder {
256256
* <p>{@link ImageSegmenter} supports the following {@link TensorImage} color space types:
257257
*
258258
* <ul>
259-
* <li>{@link ColorSpaceType#RGB}
260-
* <li>{@link ColorSpaceType#NV12}
261-
* <li>{@link ColorSpaceType#NV21}
262-
* <li>{@link ColorSpaceType#YV12}
263-
* <li>{@link ColorSpaceType#YV21}
259+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#RGB}
260+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#NV12}
261+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#NV21}
262+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#YV12}
263+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#YV21}
264264
* </ul>
265265
*
266266
* @param image a UINT8 {@link TensorImage} object that represents an RGB or YUV image
@@ -281,17 +281,17 @@ public List<Segmentation> segment(TensorImage image) {
281281
* <p>{@link ImageSegmenter} supports the following {@link TensorImage} color space types:
282282
*
283283
* <ul>
284-
* <li>{@link ColorSpaceType#RGB}
285-
* <li>{@link ColorSpaceType#NV12}
286-
* <li>{@link ColorSpaceType#NV21}
287-
* <li>{@link ColorSpaceType#YV12}
288-
* <li>{@link ColorSpaceType#YV21}
284+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#RGB}
285+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#NV12}
286+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#NV21}
287+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#YV12}
288+
* <li>{@link org.tensorflow.lite.support.image.ColorSpaceType#YV21}
289289
* </ul>
290290
*
291291
* @param image a UINT8 {@link TensorImage} object that represents an RGB or YUV image
292292
* @param options {@link ImageSegmenter} only supports image rotation (through {@link
293-
* ImageProcessingOptions#Builder#setOrientation}) currently. The orientation of an image
294-
* defaults to {@link ImageProcessingOptions#Orientation#TOP_LEFT}.
293+
* ImageProcessingOptions.Builder#setOrientation}) currently. The orientation of an image
294+
* defaults to {@link ImageProcessingOptions.Orientation#TOP_LEFT}.
295295
* @return results of performing image segmentation. Note that at the time, a single {@link
296296
* Segmentation} element is expected to be returned. The result is stored in a {@link List}
297297
* for later extension to e.g. instance segmentation models, which may return one segmentation

0 commit comments

Comments
 (0)