今天看啥  ›  专栏  ›  人工智能与大数据技术

只需10行Python代码,就能实现计算机视觉中目标检测

人工智能与大数据技术  · 公众号  · 大数据  · 2019-01-21 15:46
来自:集智小编       链接:https://jizhi.im/blog/post/short_and_excellent_code只需10行Python代码,我们就能实现计算机视觉中目标检测。from imageai.Detection import ObjectDetectionimport osexecution_path = os.getcwd()detector = ObjectDetection()detector.setModelTypeAsRetinaNet()detector.setModelPath( os.path.join(execution_path , "resnet50_coco_best_v2.0.1.h5"))detector.loadModel()detections = detector.detectObjectsFromImage(input_image=os.path.join(execution_path , "image.jpg"), output_image_path=os.path.join(execution_path , "imagenew.jpg"))for eachObject in detections:print(eachObject["name"] + " : " + eachObject["percentage_probability"] )没错,用这寥寥10行代码,就能实现目前AI产品中应用广泛的目标检测技术。看完了代码,下面容我们聊聊目标检测背后的技术背景,并 ………………………………

原文地址:访问原文地址
快照地址: 访问文章快照