tensorflow - 自定义 TF Object Detection 边界框厚度和标签字体大小

标签 tensorflow fonts object-detection label bounding-box

使用 https://github.com/tensorflow/models/blob/master/research/object_detection/object_detection_tutorial.ipynb 运行预测.

  • 操作系统平台和发行版(例如,Linux Ubuntu 16.04):

    Linux Ubuntu 16.04

想要自定义标签字体大小和边界框厚度,因为我的标签文本和 bbox 在图像检测中太厚了。

Cannot see detections!

感谢您的帮助!如果你自己做过这个,请传递你的学习! :)

最佳答案

更改字体大小:

在文件 models/research/object_detection/utils/visualization_utils.py 从第 202 行开始:

试试:

  font = ImageFont.truetype('arial.ttf', 24) 
except IOError:
  font = ImageFont.load_default()

这里我们只需要将数字 24 更改为所需的字体大小。

关于tensorflow - 自定义 TF Object Detection 边界框厚度和标签字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47242183/

相关文章:

tensorflow - 使用 Keras 从 LSTM 神经网络中提取权重

python - 我应该如何使用 Keras(和 TensorFlow)编写负二项分布的损失函数?

swift - 如何在 SwiftUI 中使用 SF Rounded 字体?

r - 在 ggplot2 图表中实现谷歌字体

python - 如何评估 Python 中的对象检测?

opencv - 检测图像opencv中的对象区域

python - 第一个纪元后的神经网络生成 NaN 值作为输出、损失

python - tf.transform : add preprocessing to Keras model?

html - Outlook 中的字体太大

opencv - 如何在运行 Tensorflow 推理 session 之前批处理多个视频帧