首页 > 解决方案 > 我应该使用哪一个来预处理图像?

问题描述

我应该使用哪一个来预处理图像。使用 keras 的 ImageDataGenerator 还是使用 tensorflow 的 tf.data?哪个性能更好?

标签: tensorflowkerasdeep-learningcomputer-vision

解决方案


根据我的经验,应该使用 tf.data,因为在使用map数据集进行预处理时,通过调整并行调用的数量来优化有很大的空间。

例如: https ://www.tensorflow.org/guide/data#decoding_image_data_and_resizing_it

并行化数据转换:https ://www.tensorflow.org/guide/data_performance#parallelizing_data_transformation


推荐阅读