YoloKerasFaceDetection icon indicating copy to clipboard operation
YoloKerasFaceDetection copied to clipboard

how can I get boxes when run yolov2_tiny-face.h5

Open KienPM opened this issue 5 years ago • 1 comments

Hello, I'm a newbie I want to gets boxes from yolov2_tiny-face.h5. Here is my code

from keras.models import load_model
from PIL import Image, ImageDraw
import numpy as np

input_image = Image.open('test.jpg')
image = input_image.resize((416, 416))
image = np.array(image)
image = image / 255.
image = np.expand_dims(image, 0)

model = load_model('yolov2_tiny-face.h5')
model.summary()
outputs = model.predict(image)

I got outputs.shape = (1, 13, 13, 30), same as last layer's shape, seem not correct Could you help me please!

KienPM avatar Dec 12 '19 10:12 KienPM

Hey, could you solve this? I have the same issue.

Javcm avatar Mar 21 '21 16:03 Javcm