Skip to content

Commit

Permalink
Fix yolov3 Readme:change dtype from int32 to float32 on the second in…
Browse files Browse the repository at this point in the history
…put tensor for model(s)
  • Loading branch information
susumu-iino committed Aug 29, 2024
1 parent bec48b6 commit 685364c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 685364c

Please sign in to comment.