tensorflow2.0 - TensorFlow 图像太小而无法正确显示结果
解决方案
我认为从您的问题来看,您是在问如何对图像进行上采样。有几种方法,我认为最简单的方法是使用 Pillow,请参见此处:https ://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.resize
from PIL import Image
im = Image.open("hopper.jpg")
# Provide the target width and height of the image
(width, height) = (im.width * 2, im.height * 2)
im_resized = im.resize((width, height))
推荐阅读
- java - java项目无法在IntelliJ IDEA中按顺序运行
- airflow - 无法使用 apache 气流创建 dag
- ios - 无法创建另一个分发证书,已达到可用分发证书的最大数量
- shell - 使用树莓派通过蓝牙自动读取小米身体成分秤
- regex - PCRE 引擎的 RegEx 与 Pandas 的 RegEx 不匹配
- azure - rbac 角色在 Azure 中的嵌套程度如何?特别是使用 ADLS GEN2 存储容器的存储帐户?
- r - 读取带有未使用的页眉行、页脚行和列解析问题的 CSV 文件
- python - MySQL如何使一个表中的值等于另一个表中的相同值
- reactjs - 未处理的拒绝(TypeError):无法读取未定义的属性“someProperty”
- flutter - 动态生成并返回一个xml文件