mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Co-authored-by: Kwabena W Agyeman <kwagyeman@users.noreply.github.com> Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
12 lines
531 B
Python
12 lines
531 B
Python
def unittest(data_path, temp_path):
|
|
import ml
|
|
import image
|
|
from ml.postprocessing.edgeimpulse import Fomo
|
|
|
|
# Load image and run FOMO face detection model
|
|
img = image.Image(data_path + "/faces.bmp", copy_to_fb=True)
|
|
model = ml.Model("data/fomo_face_detection.tflite")
|
|
output = model.predict([img], callback=Fomo())
|
|
|
|
return output[1] == [([81, 107, 31, 31], 0.6796876), ([239, 153, 31, 31], 0.5742188), ([149, 17, 31, 31], 0.5390626), ([194, 198, 31, 31], 0.4804688), ([285, 17, 31, 31], 0.4257813)]
|