1 Star 0 Fork 1

ken679/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
resizer.py 726 Bytes
一键复制 编辑 原始数据 按行查看 历史
## Bulk image resizer
# This script simply resizes all the images in a folder to one-eigth their
# original size. It's useful for shrinking large cell phone pictures down
# to a size that's more manageable for model training.
# Usage: place this script in a folder of images you want to shrink,
# and then run it.
import numpy as np
import cv2
import os
dir_path = os.getcwd()
for filename in os.listdir(dir_path):
# If the images are not .JPG images, change the line below to match the image type.
if filename.endswith(".JPG"):
image = cv2.imread(filename)
resized = cv2.resize(image,None,fx=0.25, fy=0.25, interpolation=cv2.INTER_AREA)
cv2.imwrite(filename,resized)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ken679/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10.git
git@gitee.com:ken679/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10.git
ken679
TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
master

搜索帮助