From e35201108853353dbc30e8d0240e290708705894 Mon Sep 17 00:00:00 2001 From: KexinFeng Date: Thu, 9 Mar 2023 01:55:57 +0800 Subject: [PATCH] ObjectDetectionWOnnx --- .../main/java/ai/djl/examples/inference/ObjectDetection.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/src/main/java/ai/djl/examples/inference/ObjectDetection.java b/examples/src/main/java/ai/djl/examples/inference/ObjectDetection.java index 08643cb3b96..207ea7b1859 100644 --- a/examples/src/main/java/ai/djl/examples/inference/ObjectDetection.java +++ b/examples/src/main/java/ai/djl/examples/inference/ObjectDetection.java @@ -66,7 +66,6 @@ public static DetectedObjects predict() throws IOException, ModelException, Tran .optApplication(Application.CV.OBJECT_DETECTION) .setTypes(Image.class, DetectedObjects.class) .optFilter("backbone", backbone) - .optEngine(Engine.getDefaultEngineName()) .optProgress(new ProgressBar()) .build(); @@ -86,7 +85,7 @@ private static void saveBoundingBoxImage(Image img, DetectedObjects detection) img.drawBoundingBoxes(detection); - Path imagePath = outputDir.resolve("detected-dog_bike_car.png"); + Path imagePath = outputDir.resolve("dog_bike_car.png"); // OpenJDK can't save jpg with alpha channel img.save(Files.newOutputStream(imagePath), "png"); logger.info("Detected objects image has been saved in: {}", imagePath);