Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 685364c

Browse files
committedAug 29, 2024·
Fix yolov3 Readme:change dtype from int32 to float32 on the second input tensor for model(s)
1 parent bec48b6 commit 685364c

File tree

1 file changed

+2
-3
lines changed
  • validated/vision/object_detection_segmentation/yolov3

1 file changed

+2
-3
lines changed
 

‎validated/vision/object_detection_segmentation/yolov3/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ This model is a neural network for real-time object detection that detects 80 di
2424
## Inference
2525

2626
### Input to model
27-
Resized image `(1x3x416x416)`
28-
Original image size `(1x2)` which is `[image.size[1], image.size[0]]`
27+
Resized image `(1x3x416x416)` and Original image size `(1x2)`, which is `[image.size[1], image.size[0]]`, are both of type `float32`.
2928

3029
### Preprocessing steps
3130
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):
6261
image = Image.open(img_path)
6362
# input
6463
image_data = preprocess(image)
65-
image_size = np.array([image.size[1], image.size[0]], dtype=np.int32).reshape(1, 2)
64+
image_size = np.array([image.size[1], image.size[0]], dtype='float32').reshape(1, 2)
6665
```
6766

6867
### Output of model

0 commit comments

Comments
 (0)
Please sign in to comment.