From 685364cbf12a95d19380ace96c71098826cb6351 Mon Sep 17 00:00:00 2001 From: Susumu IINO Date: Thu, 29 Aug 2024 11:43:22 +0900 Subject: [PATCH] Fix yolov3 Readme:change dtype from int32 to float32 on the second input tensor for model(s) --- .../vision/object_detection_segmentation/yolov3/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/validated/vision/object_detection_segmentation/yolov3/README.md b/validated/vision/object_detection_segmentation/yolov3/README.md index 94cce0852..4d966ee59 100644 --- a/validated/vision/object_detection_segmentation/yolov3/README.md +++ b/validated/vision/object_detection_segmentation/yolov3/README.md @@ -24,8 +24,7 @@ This model is a neural network for real-time object detection that detects 80 di ## Inference ### Input to model -Resized image `(1x3x416x416)` -Original image size `(1x2)` which is `[image.size[1], image.size[0]]` +Resized image `(1x3x416x416)` and Original image size `(1x2)`, which is `[image.size[1], image.size[0]]`, are both of type `float32`. ### Preprocessing steps The images have to be loaded in to a range of [0, 1]. The transformation should preferrably happen at preprocessing. @@ -62,7 +61,7 @@ def preprocess(img): image = Image.open(img_path) # input image_data = preprocess(image) -image_size = np.array([image.size[1], image.size[0]], dtype=np.int32).reshape(1, 2) +image_size = np.array([image.size[1], image.size[0]], dtype='float32').reshape(1, 2) ``` ### Output of model