INNER CODE UNIT · Python
image
minivision-ai/Silent-Face-Anti-Spoofing · test.py:37
image = cv2.imread(SAMPLE_IMAGE_PATH + image_name)
result = check_image(image)
if result is False:
return
image_bbox = model_test.get_bbox(image)
prediction = np.zeros((1, 3))
test_speed = 0
# sum the prediction from single model's result
for model_name in os.listdir(model_dir):
h_input, w_input, model_type, scale = parse_model_name(model_name)
param = {
"org_img": image,
"bbox": image_bbox,
"scale": scale,
"out_w": w_input,
"out_h": h_input,
"crop": True,
}