OlafenwaMoses / ImageAI

A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
https://www.genxr.co/#products
MIT License
8.55k stars 2.19k forks source link

How to get the coordinates of the predicted image #178

Closed tryinggo closed 5 years ago

tryinggo commented 5 years ago

How to get the coordinates of the predicted image

FongZiSing commented 5 years ago

How to get the coordinates of the predicted image

这个是一个很棒的项目。 简单易懂,精致易用。 可是在预测物体时只返回了类别和概率,没有返回预测物体在原图像中的位置 但可以通过修改源码,让detectObjectsFromImage/detectCustomObjectsFromImage等方法返回预测物体的坐标。 打开init.py,找到detectObjectsFromImage/detectCustomObjectsFromImage的位置 imageai时依赖opencv的,并且使用opencv绘制结果图的

each_object_details["name"] = self.numbers_to_names[label]
each_object_details["detection_details"] = detection_details # add here 添加这句返回坐标
each_object_details["percentage_probability"] = str(score * 100)

希望能帮助到你

OlafenwaMoses commented 5 years ago

Please follow the tutorial linked below.

https://heartbeat.fritz.ai/analyze-and-visualize-detected-video-objects-using-keras-and-imageai-d84c99b0ae8e