TensorFlow Object Detection API 只训练一个类

     2023-03-27     16

关键词:

【中文标题】TensorFlow Object Detection API 只训练一个类【英文标题】:TensorFlow Object Detection API trains only one class from several 【发布时间】:2018-01-14 13:20:28 【问题描述】:

我正在使用 TF 对象检测 API 在我自己的数据集上运行几个类的训练过程,但是经过相当多的步骤(大约 20k)后,我可以在 TensorBoard 的 PerformanceByCategory 菜单中看到 mAP 仅针对一个类别增加,其他是甚至还没有开始。

我的数据集是 PascalVOC 格式,我正在关注 this answer 来创建它。数据准备好后,我生成了 Pascal 记录,编辑了标签映射和管道配置,将所有带有 ssd 模型检查点的员工下载到 Google Cloud Platform,并根据Object Detection API Documentation 开始了培训和评估工作。

但从 TensorBoard 看来,数据或其他方面有问题,因为我的其他课程没有任何反应。

在使用多个类训练 Object Detection API 时是否有任何提示或功能?

提前感谢您的帮助!

[已编辑]:

因此,在尝试使用教程中默认提供的 PascalVOC 数据集训练模型后,我注意到他们的 Pascal 记录比我的大得多。我在文本编辑器中打开它们,ImageSets 中的每个类都有引用,但是我的记录只包含我在 create_pascal_tf_records.py 中指向的那个类的引用。

我想念什么?请帮忙!

【问题讨论】:

num_steps 表示您的程序将运行的迭代总数。您的数据似乎有问题,请检查您的数据是否已被阅读器正确检索 我该如何检查,身体?在我创建了 pascal tf 记录并更改了标签映射之后,我正在关注 this answer 以生成 voc pascal 格式的数据。一切看起来都很好,在这种情况下会产生什么影响? 【参考方案1】:

好的,我想我已经弄清楚出了什么问题。

主要问题是我不正确地制作了 ImageSets。对于每个班级,我都添加了相应的图像列表,因此在我的情况下,每个 train 和 val 文件都不同。

由于this answer:

关键是我们目前只查看第一列 aeroplane_train.txt 文件(与其他文件相同) xxx_train.txt 文件)并让我们找出每个图像的路径 训练集。

由于每个文件都不同,create_pascal_tf_records.py 只选择了我的第一堂课的路径。

希望这对其他人有帮助。

【讨论】:

我也遇到了同样的问题,能否请您详细说明如何解决这个问题? .我有 3 个类,我使用 labelImg 对它们进行了标记,然后创建了 xml 的 csv,然后创建了我的 tfrecord,总共用于所有 3 个类。所以,在这种情况下,我只有 1 个 train tfrecords 和 1 个 val tfrecords。帮帮我!! @saikishor 在我的情况下,故障出在 train 和 val 文件中。我对每个文件都有不同的图像列表,但发现所有这些文件都应该有相同的图像列表。因此,例如 aeroplane_train.txt、dog_train.txt、cat_train.txt 等应该具有相同的第一列,只有第二列不同。 很高兴知道这一点!我昨晚发现了我的问题,因为我不小心在配置文件中提到了类数为1,所以我看不到它。就我而言,我从这些 xml 创建的 csv 文件创建了我的数据集。我发现这很容易。感谢您的回复。 @saikishor 很高兴听到您解决了问题!祝你好运

javascriptjavascript_type_detection(代码片段)

查看详情

如何安装 TensorFlow 2 和 object_detection 模块?

】如何安装TensorFlow2和object_detection模块?【英文标题】:HowdoIinstallTensorFlow2&theobject_detectionmodule?【发布时间】:2021-10-2507:38:49【问题描述】:背景我一直在努力学习this视频中的教程。目标是尝试安装TensorFlow和TensorFlow的object_d... 查看详情

tensorflow_object_dectection

之前一直在win10_64系统装环境,但是老是出现问题,索性直接放弃!第二天,用朋友11年的macos10.13.3很顺利搞定!在这里参考:https://blog.csdn.net/chenmaolin88/article/details/79370258https://blog.csdn.net/chenmaolin88/article/details/79371891这两个帖子写的很详... 查看详情

Tensorflow Object Detection API - 可视化区域建议

】TensorflowObjectDetectionAPI-可视化区域建议【英文标题】:TensorflowObjectDetectionAPI-Visualizeregionproposals【发布时间】:2018-12-1608:46:14【问题描述】:我希望能够使用Tensorflow对象检测API(最好是在Tensorboard中)可视化由Faster-RCNN(如Resnet... 查看详情

Tensorflow Object Detection API 中的 mAP(平均精度)

】TensorflowObjectDetectionAPI中的mAP(平均精度)【英文标题】:mAP(MeanAveragePrecision)inTensorflowObjectDetectionAPI【发布时间】:2018-01-3104:00:50【问题描述】:我在某处读到tensorflow对象检测API中显示的mAP指标与模型动物园中给出的mAP不同(... 查看详情

可视化增强的火车图像 [tensorflow object detection api]

】可视化增强的火车图像[tensorflowobjectdetectionapi]【英文标题】:Visualizingaugmentedtrainimages[tensorflowobjectdetectionapi]【发布时间】:2019-07-2722:53:34【问题描述】:可以在tensorflow对象检测api配置文件中增加图像,例如:data_augmentation_opti... 查看详情

将 TensorFlow 模型从 Object Detection API 转换为 uff

】将TensorFlow模型从ObjectDetectionAPI转换为uff【英文标题】:ConvertTensorflowmodelsfromObjectDetectionAPItouff【发布时间】:2017-11-0708:35:50【问题描述】:似乎没有办法从盒子Mobilenet(以及来自TFODAPI的其他模型)转换为uff格式,然后再转换... 查看详情

具有 tensorflow/models/object_detection 的特征金字塔网络

】具有tensorflow/models/object_detection的特征金字塔网络【英文标题】:FeaturePyramidNetworkwithtensorflow/models/object_detection【发布时间】:2017-12-1900:58:54【问题描述】:如果我想在用于对象检测的特征金字塔网络中实现k=k0+log2(√(w*h)/224),... 查看详情

TensorFlow Object Detection API 只训练一个类

】TensorFlowObjectDetectionAPI只训练一个类【英文标题】:TensorFlowObjectDetectionAPItrainsonlyoneclassfromseveral【发布时间】:2018-01-1413:20:28【问题描述】:我正在使用TF对象检测API在我自己的数据集上运行几个类的训练过程,但是经过相当多... 查看详情

TensorFlow Object Detection API 多类错误

】TensorFlowObjectDetectionAPI多类错误【英文标题】:TensorflowObjectDetectionAPImulti-classerror【发布时间】:2018-01-2820:20:20【问题描述】:我正在使用fast-RCNN模型创建一个11类对象检测器,该模型在image-resizer标签中设置为300x400的最大尺寸... 查看详情

TensorFlow 对象检测限制

】TensorFlow对象检测限制【英文标题】:TensorflowObjectDetectionLimit【发布时间】:2018-06-2806:40:07【问题描述】:按照这里的代码:https://github.com/tensorflow/models/blob/master/research/object_detection/object_detection_tutorial.ipynb无论输入什么图像,... 查看详情

Tensorflow Object Detection API Untrained Faster-RCNN 模型

】TensorflowObjectDetectionAPIUntrainedFaster-RCNN模型【英文标题】:TensorflowObjectDetectionAPIUntrainedFaster-RCNNModel【发布时间】:2019-12-0823:07:48【问题描述】:我目前正在尝试使用带有python的Tensorflow对象检测API构建对象检测器。我已经按照her... 查看详情

Tensorflow Object Detection - mAP 稳定,但 Total Loss 正在下降。继续训练?

】TensorflowObjectDetection-mAP稳定,但TotalLoss正在下降。继续训练?【英文标题】:TensorflowObjectDetection-mAPsteady,butTotalLossisdropping.Keeptraining?【发布时间】:2019-11-0519:42:00【问题描述】:使用Tensorflow1.12.2和Python3.6训练ObjectDetection分类器... 查看详情

tensorflow object detection api 和 bboxes by image frame

】tensorflowobjectdetectionapi和bboxesbyimageframe【英文标题】:tensorflowobjectdetectionapiandbboxesbyimageframe【发布时间】:2018-07-3023:40:19【问题描述】:通过标签[python]阅读其他人的问题\\答案我遇到了BanachTarskiTensorFlowObjectDetectionAPIWeirdBehavior... 查看详情

TensorFlow Object Detection API 中用于平衡数据的类权重

】TensorFlowObjectDetectionAPI中用于平衡数据的类权重【英文标题】:ClassweightsforbalancingdatainTensorFlowObjectDetectionAPI【发布时间】:2019-01-2214:01:33【问题描述】:我正在使用OpenImagesDataset上的TensorFlowobjectdetectionAPI微调SSD对象检测器。我... 查看详情

在使用 TensorFlow Object Detection API 训练 Mask RCNN 时,“损失”是啥?

】在使用TensorFlowObjectDetectionAPI训练MaskRCNN时,“损失”是啥?【英文标题】:WhiletrainingMaskRCNNusingTensorFlowObjectDetectionAPI,whatisthe\'loss\'?在使用TensorFlowObjectDetectionAPI训练MaskRCNN时,“损失”是什么?【发布时间】:2019-06-1721:15:29【... 查看详情

TensorFlow Object Detection API:指定多个 data_augmentation_options

】TensorFlowObjectDetectionAPI:指定多个data_augmentation_options【英文标题】:TensorFlowObjectDetectionAPI:specifyingmultipledata_augmentation_options【发布时间】:2019-04-2207:34:38【问题描述】:我想知道这样指定数据增强之间是否有任何区别:data_augme... 查看详情

Tensorflow Object-API:将 ssd 模型转换为 tflite 并在 python 中使用

】TensorflowObject-API:将ssd模型转换为tflite并在python中使用【英文标题】:TensorflowObject-API:convertssdmodeltotfliteanduseitinpython【发布时间】:2021-11-1723:07:00【问题描述】:我很难将给定的tensorflow模型转换为tflite模型然后使用它。我已经... 查看详情