简体   繁体   English

tensorflow API检测框和评估

[英]tensorflow API detection boxes and evaluation

I am trying to use the API detection on tensorflow following this tutorial https://towardsdatascience.com/how-to-train-your-own-object-detector-with-tensorflows-object-detector-api-bec72ecfe1d9 . 我正在按照本教程https://towardsdatascience.com/how-to-train-your-own-object-detector-with-tensorflows-object-detector-api-bec72ecfe1d9尝试在Tensorflow上使用API​​检测。 But there are some details I am not understanding. 但是有一些我不了解的细节。

First, I do not understand some parameters for the evaluation in the config file. 首先,我不了解配置文件中用于评估的一些参数。 "num readers" and "max_evals" parameters. “ num readers”和“ max_evals”参数。 "Max evals" seems to be the number of evaluation on the dataset but why it is not 1 by default ? “最大评估次数”似乎是数据集中的评估次数,但为什么默认情况下它不是1? Because we need to test only one time the checkpoint (or I am wrong ?). 因为我们只需要测试一次检查点(或者我错了?)。 Regarding the training, are the data shuffle automatically ? 关于训练,数据是否会自动随机播放?

Second, I am wondering if we can use tensorboard so as to display the box in an image during the training WITH the API detection. 其次,我想知道我们是否可以在使用API​​检测的训练过程中使用张量板在图像中显示框。 If yes, what are the steps to obtain it ? 是的话,有什么步骤获得它?

  • num_readers : I' not entirely sure, but it probably has something to do with how many processes you'll need to read the eval input. num_readers :我不确定,但是它可能与读取eval输入需要多少个进程有关。 You could try and change it if you see that reading the data is really where you're losing time (it's usually not the case though, inference takes more time). 如果您看到读取数据确实是在浪费时间,则可以尝试更改它(尽管通常情况并非如此,推理需要更多时间)。

  • max_evals : says how many checkpoints you want to evaluate. max_evals :表示要评估的检查点数。 While training, the trianing job will save checkpoints regularly (so that if you stop the training, you don't lose all the previous work, for instance; or so that you can choose between the networks created respectively by n and m iterations). 在训练过程中,trianing作业将定期保存检查点(例如,如果停止训练,则不会丢失以前的所有工作;或者使您可以在分别由nm迭代创建的网络之间进行选择)。 You'll usually start an evaluation job at the same time, which will regularly evaluate the last created checkpoint, up to max_evals checkpoints. 通常,您将同时启动评估作业,该作业将定期评估最后创建的检查点,最多max_evals检查点。 If you don't fill this value, it will evaluate all created checkpoints, thus providing you an evaluation performance regularly during training. 如果您不填写此值,它将评估所有创建的检查点,从而在训练期间定期为您提供评估性能。

  • about shuffling the training data: you need to add shuffle: True to the train input reader (in the config file) for that, but apparently it may not work on the first epoch, so you should probably also make sure your dataset is not sorted beforehand. 关于改组训练数据:您需要添加改组:对此shuffle: True适用于培训输入阅读器(在配置文件中),但显然在第一个时期可能不起作用,因此您可能还应确保未对数据集进行排序预先。

  • to dispay images with boxes during training: yes you can. 在训练过程中用盒子支付图像:是的,可以。 You'll need to run the evaluation job for that. 您需要为此运行评估工作。 You can set how many images will be saved in the config file. 您可以设置将在配置文件中保存多少图像。 To see the evolution of the detections for these images, you'll need shuffle: False in your eval input reader. 要查看这些图像检测的演变,您需要shuffle: False在eval输入阅读器中为shuffle: False Otherwise it will show you different images at every step, so you won't really see the progress. 否则,它将在每个步骤中为您显示不同的图像,因此您不会真正看到进度。 Then you just run Tensorboard, the images will be in the "images" tab. 然后,您只需运行Tensorboard,图像将在“图像”选项卡中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM