From 9f9b6a0c19e2f91c5dfec6280ce5b7b589844a53 Mon Sep 17 00:00:00 2001 From: Corneil du Plessis Date: Thu, 12 Jan 2023 11:05:43 +0200 Subject: [PATCH] Fix checkstyle errors. --- .../examples/ExampleInstanceSegmentation.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/functions/function/object-detection-function/src/test/java/org/springframework/cloud/fn/object/detection/examples/ExampleInstanceSegmentation.java b/functions/function/object-detection-function/src/test/java/org/springframework/cloud/fn/object/detection/examples/ExampleInstanceSegmentation.java index e1c6870c..c5185bd7 100644 --- a/functions/function/object-detection-function/src/test/java/org/springframework/cloud/fn/object/detection/examples/ExampleInstanceSegmentation.java +++ b/functions/function/object-detection-function/src/test/java/org/springframework/cloud/fn/object/detection/examples/ExampleInstanceSegmentation.java @@ -34,9 +34,9 @@ import org.springframework.core.io.ResourceLoader; /** * 4 of the pre-trained model in the model zoo (https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md) * can also compute the masks of the detected objects, providing instance segmentation. - * + *

* Here are the models that can be used for instance segmentation. - * + *

* mask_rcnn_inception_resnet_v2_atrous_coco 771 36 Masks * mask_rcnn_inception_v2_coco 79 25 Masks * mask_rcnn_resnet101_atrous_coco 470 33 Masks @@ -71,7 +71,7 @@ public class ExampleInstanceSegmentation { float CONFIDENCE_THRESHOLD = 0.4f; ObjectDetectionService detectionService = - new ObjectDetectionService(model, labels, CONFIDENCE_THRESHOLD, INSTANCE_SEGMENTATION, CACHE_TF_MODEL); + new ObjectDetectionService(model, labels, CONFIDENCE_THRESHOLD, INSTANCE_SEGMENTATION, CACHE_TF_MODEL); // You can use file:, http: or classpath: to provide the path to the input image. byte[] image = GraphicsUtils.loadAsByteArray("classpath:/images/object-detection.jpg"); @@ -86,8 +86,8 @@ public class ExampleInstanceSegmentation { // Draw the detected object metadata on top of the original image and store the result byte[] annotatedImage = new ObjectDetectionImageAugmenter(INSTANCE_SEGMENTATION).apply(image, detectedObjects); File projectDir = new File("functions/function/object-detection-function"); - File output = new File(projectDir,"target/object-detection-segmentation-augmented.jpg"); + File output = new File(projectDir, "target/object-detection-segmentation-augmented.jpg"); IOUtils.write(annotatedImage, new FileOutputStream(output)); - System.out.println("Created:" +output.getPath()); + System.out.println("Created:" + output.getPath()); } }