Skip to content

Commit

Permalink
ObjectDetectionWOnnx
Browse files Browse the repository at this point in the history
  • Loading branch information
KexinFeng committed Mar 15, 2023
1 parent ec79e87 commit e352011
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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);
Expand Down

0 comments on commit e352011

Please sign in to comment.