如何使用“忽略"带有 tensorflow 对象检测 API 的类? [英] How to use "ignore" class with tensorflow object detection API?

查看:50
本文介绍了如何使用“忽略"带有 tensorflow 对象检测 API 的类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在自定义数据集上使用 SSD (mobilenet-v1) 训练了 tensorflow 对象检测模型(对于 num_steps:50000).我得到了 mAP@.50IOU ~0.98 和 loss ~1.17.数据集由 uno 扑克牌图像(跳过、反转和抽四张)组成.在所有这些卡片上,模型表现都非常好,因为我只在这 3 张卡片上训练了模型(使用手机收集的大约 278 张图像和 829 个边界框(25% 的边界框用于测试,即验证)).

I have trained tensorflow object detection model (for num_steps:50000) using SSD (mobilenet-v1) on custom dataset. I got mAP@.50IOU ~0.98 and loss ~1.17. The dataset consist of uno playing card images (skip, reverse, and draw four). On all these cards, model performs pretty well as I have trained model only on these 3 card (around 278 images with 829 bounding boxes (25% bounding box used for testing i.e. validation) collected using mobile phone).

然而,我没有在任何其他卡上训练模型,但它仍然可以检测到其他卡(使用网络摄像头推断).

However, I haven’t trained model on any other card but still it detects other cards (inference using webcam).

我该如何解决这个问题?我是否也应该收集其他类的图像(除了跳过、反转和抽四张牌之外的任何图像)并在操作中忽略这个类?所以该模型在训练期间看到这个类,即标签:其他图像,并且在推理期间不放置任何标签.

How can I fix this? Should I also collect other class images (anything other than skip, reverse and draw four cards) and ignore this class in operation? So that model sees this class i.e. Label: Other images during training and doesn’t put any label during inference.

我不确定如何通知 tensorflow 对象检测 API 它应该忽略来自 Other 类的图像.

I am not sure how to inform tensorflow object detection API that it should ignore images from Other class.

谁能指点一下?

请分享您的观点!

推荐答案

,您需要有另一个类,它是您不想检测的对象.

Yes, you need to have another Class which is the object you don't want to detect.

如果您没有这个其他类,其中包括所有不被检测到的内容.该模型会将其与与感兴趣的卡片几乎相同的现有类进行比较.

If you don't have this Other Class which includes everything that is not to be detected. The model will compare it to the existing class which is almost identical to the cards of interest.

其中一些因素是:

  1. 形状
  2. 的相似性
  3. 颜色的相似性
  4. 符号
  5. 的相似之处
  1. Similarity of Shape
  2. Similarity of Color
  3. Similarity of Symbols

这就是为什么即使它不是感兴趣的卡片(Skip、Reverse 和 Draw 4),它也会以某种方式对这三个类具有很高的归属感".

This is why even though it is not the card of interest (Skip, Reverse, and Draw 4), it would somehow have high "belongingness" to these three classes.

让另一个班级转储所有这些可以显着减少对三个感兴趣的班级的归属感",并尽可能在训练期间提供大量数据.

Having another Class to dump all of these can significantly lessen the "belongingness" to the three classes of interest and as much as possible provide A LOT of Data during Training.

如果你不想再上课.

您可以过拟合跳过、反转和抽 4 张卡片(接近 100%),然后将检测阈值提高到(70-90%).

You could overfit Skip, Reverse, and Draw 4 cards (close to 100%), then increase your threshold value of detection to (70-90%).

希望对你有帮助.

这篇关于如何使用“忽略"带有 tensorflow 对象检测 API 的类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆