image-processing - ImageDatagenerator 将灰度图像转换为 rgb 的过程
问题描述
我想在预训练的 vgg16 模型上训练我的灰度图像。我正在使用带有 color_mode = 'rgb' 的 imagedatagenerator。它将灰度图像转换为 rgb,但我不知道那里使用的过程是否会导致某种信息丢失。有人可以帮助我了解转换的方法是什么。
train_generator = datagen.flow_from_directory(train_path,
target_size=(48,48),
color_mode='rgb',
batch_size=64,
class_mode='categorical',
shuffle=True)
解决方案
推荐阅读
- r - R group_by 行和每列的总和值
- python - 检查两个不同 csv 文件中的相同列值
- mysql - 优化 MySQL InnoDB 查询最大值,计数
- mongodb - 集合引用多个集合
- postman - 如何使用 avj 和 postman 验证 json 架构
- google-sheets - 谷歌电子表格的谷歌脚本,给定两个特定的工作表名称,将日期从工作表 2 更新到工作表 1
- ios - 从 Firestore 查询数组
- html - Gmail 用标签包装了随机的 html 元素
- java - 发现难以将值添加到已在 junit 中声明为全局的列表
- ffmpeg - 库未加载错误和中止陷阱:使用 ffmpeg 时出现 6