如何在对象检测 API Tensorflow 中仅检测人类 [英] How to only detect humans in object detection API Tensorflow
问题描述
我正在使用 tensorflow
对象检测 API 来检测对象.它在我的 Windows 系统中运行良好.我如何更改它以仅检测提到的物体,例如,我只想检测人类而不是所有物体.
I am using tensorflow
object detection API to detect objects. It is working fine in my windows system. How can I make changes in it to only detect mentioned objects, for example, I only want to detect humans and not all the objects.
根据此 answer,我检查了可视化文件,但没有找到与对象类别相关的任何内容.然后我查看了 category_util.py
并发现有 csv
文件,从中加载了所有类别,但没有找到这个 csv
文件在项目中.任何人都可以请指出我正确的方向.谢谢
As per the 1st comment in this answer, I have checked the visualization file but didn't find anything related to categories of objects. Then I looked into category_util.py
and found out that there is csv
file from which all the categories are being loaded but didnt found this csv
file in the project. Can anyone please point me into the right direction. Thanks
推荐答案
我从你的问题中假设,你没有自己微调你的模型,而是使用了一个来自 模型动物园!?
I assume from your question, that you did not finetune your model yourself, but just used a pretrained one from the model zoo!?
在这种情况下,我认为模型已经检测到人类和其他物体,而您希望这些其他物体消失!?为此,您只需通过删除所有不需要的类来更改您的 label_map.pbtxt
.如果您不确定在哪里可以找到此文件,请查看您的 .config
文件并搜索 label_map_path="PATH"
.
In this case, I think the model already detect humans AND other objects and you want these other objects to disappear!? For doing so, you just have to change your label_map.pbtxt
by deleting all classes which you don't need. If you are not sure where to find this file have a look into your .config
file and search for label_map_path="PATH"
.
这篇关于如何在对象检测 API Tensorflow 中仅检测人类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!