1 Star 0 Fork 0

AlimTech/yolov4-tf2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
predict.py 492 Bytes
一键复制 编辑 原始数据 按行查看 历史
Bubbliiiing 提交于 2020-11-02 12:08 . Add files via upload
from yolo import YOLO
from PIL import Image
import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices(device_type='GPU')
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
yolo = YOLO()
while True:
img = input('Input image filename:')
try:
image = Image.open(img)
except:
print('Open Error! Try again!')
continue
else:
r_image = yolo.detect_image(image)
r_image.show()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/alimtech/yolov4-tf2.git
git@gitee.com:alimtech/yolov4-tf2.git
alimtech
yolov4-tf2
yolov4-tf2
master

搜索帮助