如何在张量流对象检测中仅检测特定类别的对象 [英] How to detect only objects of a specific category in tensorflow object detection
问题描述
对象检测笔记本演示了如何模型 在 COCO 数据集 可用于检测测试图像上的对象.但是,笔记本中的模型返回 COCO 集中所有类别的检测对象的框.如何使用代码返回只有一类对象的框?IE.如何获取模型确定的对象的框,例如人?
The object detection notebook demonstrates, how models pretrained on the COCO dataset can be used to detect objects on test images. However, the models in the notebook return boxes for detected objects of all categories in the COCO set. How can I use the code to return boxes for objects of only one category? I.e. How can I get boxes for objects of which the model is sure that they are e.g. persons?
推荐答案
我刚刚自己实施了解决方案.
I have just implemented the solution myself.
检查笔记本中的 def filter_boxes
函数 https://github.com/fera0013/TrafficLightDetection/blob/master/Traffic-Light-Detection.ipynb,查看如何按类别过滤框.
check the def filter_boxes
function in the notebook https://github.com/fera0013/TrafficLightDetection/blob/master/Traffic-Light-Detection.ipynb, to see how the boxes can be filtered by category.
这篇关于如何在张量流对象检测中仅检测特定类别的对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!