基于Python的图像分类算法,用的是的图像案例是遥感数据,适合初学者的学习使用
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-14 16:49 遥感数据分类picCategories-master
目录 0 2019-01-04 10:17 遥感数据分类picCategories-master.idea
文件 138 2019-01-03 16:51 遥感数据分类picCategories-master.ideaencodings.xml
文件 201 2019-01-03 16:51 遥感数据分类picCategories-master.ideamisc.xml
文件 299 2019-01-03 16:51 遥感数据分类picCategories-master.ideamodules.xml
文件 464 2019-01-03 16:52 遥感数据分类picCategories-master.ideapicCategories-master.iml
文件 7767 2019-01-04 10:17 遥感数据分类picCategories-master.ideaworkspace.xml
文件 2771782 2018-12-06 14:42 遥感数据分类picCategories-master 7293195.pdf
文件 534 2018-05-16 23:53 遥感数据分类picCategories-masterREADME
目录 0 2019-01-11 21:06 遥感数据分类picCategories-master\__pycache__
文件 2461 2019-01-11 21:06 遥感数据分类picCategories-master\__pycache__config.cpython-35.pyc
文件 14092 2018-05-16 23:53 遥感数据分类picCategories-mastercategoriesGUI.py
文件 1442 2018-05-16 23:53 遥感数据分类picCategories-mastercategoriesGUI.spec
目录 0 2018-12-28 13:23 遥感数据分类picCategories-masterconfig
文件 467 2018-05-16 23:53 遥感数据分类picCategories-masterconfigconfig.cfg
文件 2479 2018-05-16 23:53 遥感数据分类picCategories-masterconfig.py
目录 0 2018-12-28 13:23 遥感数据分类picCategories-masterico
文件 9662 2018-05-16 23:53 遥感数据分类picCategories-masterico48.ico
文件 12099 2018-05-16 23:53 遥感数据分类picCategories-mastermodelTrain.py
文件 3264 2018-05-16 23:53 遥感数据分类picCategories-masterpicCategories.py
#!python3
#coding=utf-8
import wx
import os
import cv2
import time
import _thread
import numpy
from modelTrain import train_saveModel
from picCategories import *
class categoriesframe(wx.frame):
#用于显示程序提示信息
promptMessageText=‘‘
#初始化
def __init__(self *args **kw):
# ensure the parent‘s __init__ is called
super(categoriesframe self).__init__(*args **kw)
self.makePanel()
self.makeMenu()
# self.makeTool()
self.makeIco()
self.Centre()
self.count=True
self.count1=True
# 初始化面板
def makePanel(self):
#创建两个面板p1、p2,p1用于训练和保存模型,p2用于创建子面板
sp=wx.SplitterWindow(selfstyle=wx.SP_LIVE_UPDATE)# 创建一个分割窗parent是frame
p1=wx.Panel(spstyle=wx.SUNKEN_BORDER) #创建子面板p1
p2=wx.Panel(spstyle=wx.SUNKEN_BORDER) # 创建子面板p2
sp.SplitHorizontally(p1 p2 150)#竖直分割面板
box1 = wx.BoxSizer(wx.VERTICAL)#创建一个垂直布局
box1_1=wx.BoxSizer(wx.HORIZONTAL)#创建一个水平布局
picSetType = wx.StaticText(p1style = wx.ALIGN_LEFT)
picSetType.SetLabel(‘选择图片集类型:‘)
box1_1.Add(picSetType 1 wx.EXPAND|wx.ALIGN_LEFT|wx.ALL5)
picTypes = [‘cifar-10‘ ‘cifar-100‘ ‘stl-10‘‘homemade‘]
self.picSetTypeChoice = wx.Choice(p1style = wx.ALIGN_CENTERchoices = picTypes)
box1_1.Add(self.picSetTypeChoice 1 wx.EXPAND|wx.ALIGN_LEFT|wx.ALL5)
trainType = wx.StaticText(p1style = wx.ALIGN_LEFT)
trainType.SetLabel(‘选择训练类型:‘)
box1_1.Add(trainType 1 wx.EXPAND|wx.ALIGN_LEFT|wx.ALL5)
trainTypes = [‘Hog‘ ‘Surf‘]
self.trainTypeChoice = wx.Choice(p1style = wx.ALIGN_CENTERchoices = trainTypes)
box1_1.Add(self.trainTypeChoice 1 wx.EXPAND|wx.ALIGN_LEFT|wx.ALL5)
box1.Add(box1_1)
box1_2=wx.BoxSizer(wx.HORIZONTAL)#创建一个水平布局
picSetDir = wx.StaticText(p1style = wx.ALIGN_LEFT)
picSetDir.SetLabel(‘图片集地址: ‘)
box1_2.Add(picSetDir 1 wx.EXPAND|wx.ALIGN_LEFT|wx.ALL5)
self.picSetDirTextCtrl = wx.TextCtrl(p1style = wx.TE_READONLY|wx.TE_LEFTsize=(25025))
box1_2.Add(self.picSetDirTextCtrl0wx.ALIGN_LEFT|wx.ALL5)
picSetDirButton=wx.Button(p1 label=‘1.打开‘ size=(5025))
picSetDirButton.Bind(wx.EVT_BUTTONself.getDir)
box1_2.Add(picSetDirButton 1 wx.ALL5)
trainButton=wx.Button(p1 label=‘开始训练‘ size=(5050))
trainButton.Bind(wx.EVT_BUTTONself.startTrain)
box1_2.Add(trainButton 1 wx.ALL5)
box1.Add(box1_2)
box1_3=wx.BoxSizer(wx.HORIZONTAL)#创建一个水平布局
modelDir = wx.StaticText(p1style = wx.ALIGN_LEFT)
modelDir.SetLabel(‘模型保存地址: ‘)
box1_3.Add(modelDir 1 wx.EXPAND|wx.ALIGN_LEFT|wx.ALL5)
self.modelDirTextCtrl = wx.TextCtrl(p1style = wx.TE_READONLY|wx.TE_LEFTsize=(25025))
box1_3.Add(self.modelDirTextCtrl0wx.ALIGN_LEFT|wx.ALL5)
modelDirButton=wx.Button(p1 label=‘2.打开‘ size
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-14 16:49 遥感数据分类picCategories-master
目录 0 2019-01-04 10:17 遥感数据分类picCategories-master.idea
文件 138 2019-01-03 16:51 遥感数据分类picCategories-master.ideaencodings.xm
文件 201 2019-01-03 16:51 遥感数据分类picCategories-master.ideamisc.xm
文件 299 2019-01-03 16:51 遥感数据分类picCategories-master.ideamodules.xm
文件 464 2019-01-03 16:52 遥感数据分类picCategories-master.ideapicCategories-master.iml
文件 7767 2019-01-04 10:17 遥感数据分类picCategories-master.ideaworkspace.xm
文件 2771782 2018-12-06 14:42 遥感数据分类picCategories-master 7293195.pdf
文件 534 2018-05-16 23:53 遥感数据分类picCategories-masterREADME
目录 0 2019-01-11 21:06 遥感数据分类picCategories-master\__pycache__
文件 2461 2019-01-11 21:06 遥感数据分类picCategories-master\__pycache__config.cpython-35.pyc
文件 14092 2018-05-16 23:53 遥感数据分类picCategories-mastercategoriesGUI.py
文件 1442 2018-05-16 23:53 遥感数据分类picCategories-mastercategoriesGUI.spec
目录 0 2018-12-28 13:23 遥感数据分类picCategories-masterconfig
文件 467 2018-05-16 23:53 遥感数据分类picCategories-masterconfigconfig.cfg
文件 2479 2018-05-16 23:53 遥感数据分类picCategories-masterconfig.py
目录 0 2018-12-28 13:23 遥感数据分类picCategories-masterico
文件 9662 2018-05-16 23:53 遥感数据分类picCategories-masterico48.ico
文件 12099 2018-05-16 23:53 遥感数据分类picCategories-mastermodelTrain.py
文件 3264 2018-05-16 23:53 遥感数据分类picCategories-masterpicCategories.py
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)