1 Star 2 Fork 0

九五初六/PhotoClassifySVM

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test.py 817 Bytes
一键复制 编辑 原始数据 按行查看 历史
Naiive 提交于 2018-12-03 20:55 . first commit
# -*- coding: utf-8 -*-
"""
Created on 2017/5/21
@author: Naiive
选择文件
"""
from PIL import Image
from tkinter import *
root = Tk()
root.title("基于深度学习的图像识别")
root.geometry('640x360')
Frame1 = Frame(root, height = 200,width = 400)
Frame2 = Frame(root, height = 200,width = 400)
Frame1.pack()
Frame2.pack(side = BOTTOM)
def select():
global filename
filename = filedialog.askopenfilename(filetypes = [('JPG', '.jpg'), ('PNG', '.png'), ('BMP', '.bmp')])
print (filename)
def show():
bm = PhotoImage(filename)
label = Label(Frame1, image = bm)
label.pack()
b5 = Button(Frame2, text = "选择图片", command = select,width=30, height=2, bd = 5)
b1 = Button(Frame1, text = "预测", command = show,width=30, height=2, bd = 5)
b1.pack()
b5.pack()
root.mainloop()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hj_0746/PhotoClassifySVM.git
[email protected]:hj_0746/PhotoClassifySVM.git
hj_0746
PhotoClassifySVM
PhotoClassifySVM
master

搜索帮助