机器学习python的imageal包进行物体检测提取时总是显卡内存不足

提取出如下图片人脸

from imageai.Detection import ObjectDetection

import os

execution_path = os.getcwd()
detector = ObjectDetection()
detector.setModelTypeAsTinyYOLOv3()
detector.setModelPath( os.path.join(execution_path , "yolo-tiny.h5"))
detector.loadModel()
detections = detector.detectObjectsFromImage(input_image=os.path.join(execution_path , "image2.jpg"), output_image_path=os.path.join(execution_path , "image2new.jpg"), minimum_percentage_probability=30)

for eachObject in detections:
    print(eachObject["name"] , " : ", eachObject["percentage_probability"], " : ", eachObject["box_points"] )
    print("--------------------------------")

 

错误如下

这个只是warnings吧,我的机器没有AVX指令集,安装github上无GPU的tensorflow版本,运行你的代码正常啊,不过我用的模型是yolo.h5

记住要把路径指向到h5文件。

求大佬