Win7 64 安装theano Facial Keypoints Detection.docx_第1页
Win7 64 安装theano Facial Keypoints Detection.docx_第2页
Win7 64 安装theano Facial Keypoints Detection.docx_第3页
Win7 64 安装theano Facial Keypoints Detection.docx_第4页
Win7 64 安装theano Facial Keypoints Detection.docx_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

一、Win7 64 安装theano:1、 下载Anaconda1.9.2,自带MniGw;C:Anaconda;C:AnacondaScripts;C:AnacondaMinGWbin;C:AnacondaMinGWx86_64-w64-mingw32bin;加入到PATH安装git,并将C:gitbin;加入到PATH2、 Github下载theano然后解压,讲theano文件夹里面的theano文件夹拷贝到C:AnacondaLibsite-packages3、 下载安装CUDA,版本随意将C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Program FilesNVIDIA GPU Computing ToolkitCUDAv7.0bin;C:Program FilesNVIDIA GPU Computing ToolkitCUDAv7.0libnvvp;C:Program FilesNVIDIA GPU Computing ToolkitCUDAv7.0libx64;C:Program Files (x86)Microsoft SDKsWindowsv7.0AInclude;加入到path。测试Cuda安装成功与否,使用nvcc V看cuda版本采用VS2010,将C:Program Files (x86)Microsoft SDKsWindowsv7.0AInclude;加入到PATH,则最终PATH有:C:Program FilesNVIDIA GPU Computing ToolkitCUDAv6.0bin;C:Program FilesNVIDIA GPU Computing ToolkitCUDAv6.0libnvvp;c:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Anaconda;C:AnacondaScripts;C:AnacondaMinGWbin;C:AnacondaMinGWx86_64-w64-mingw32bin;C:gitbin;C:Program Files (x86)Microsoft SDKsWindowsv7.0AInclude;4、 在C:UsersAdministrator下建立一个文件:.theanorc.txtglobalopenmp = Falsedevice = gpu0floatX = float32allow_input_downcast=Trueblasldflags =gcccxxflags = -IC:AnacondaMinGWcudaroot=C:Program FilesNVIDIA GPU Computing ToolkitCUDAv7.0binnvccflags = -LC:Anacondalibs compiler_bindir = C:Program Files (x86)Microsoft Visual Studio 10.0VCbinfastmath = Trueflags = -arch=sm_30 注意错误:1、c:anacondaincludepyconfig.h(227) : fatal error C1083: Cannot open include file: basetsd.h: No such file or directory;ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: (nvcc return status, 2, for cmd, nvcc -shared -O3 -arch=sm_30 -use_fast_math -compiler-bin根据windows SDK查找这个文件,将这个文件对应的include加入到PATH,没有解决问题,后来compiler_bindir Vs2012更改为Vs2010解决问题。compiler_bindir = C:Program Files (x86)Microsoft Visual Studio 10.0VCbin二、安装Lasagne1、目前还只能从源代码安装。git clone /Lasagne/Lasagne.git # 会建立一个Lasagne目录cd Lasagnepip install -r requirements.txt # 比较久python setup.py install # 这一步需要root权限Daniel NouriTutorial上是这样安装的pip install -r /dnouri/kfkd-tutorial/master/requirements.txt这样需要以root用户来执行,不推荐这样做。尝试正确的安装方式:git clone /Lasagne/Lasagne.git # 会建立一个Lasagne目录cd Lasagnepip install -r /dnouri/kfkd-tutorial/master/requirements.txt问题:1. 这是Python 2 mimetypes的bug2. 需要将Python2.7/lib/mimetypes.py文件中如下片段注释或删除:try: ctype = ctype.encode(default_encoding) # omit in 3.x!except UnicodeEncodeError: pass补充其它解决办法解决办法:在报错的页面添加代码: import sys reload(sys) sys.setdefaultencoding(utf8)执行 Python ez_setup.py,报错:UnicodeDecodeError: utf8 codec cant decode byte 0xb0 in position 35: invalid start byte解决办法:在报错的页面添加代码:import sysreload(sys)sys.setdefaultencoding(utf-8)安装失败之后,重新安装,需要清理C:UsersAdministratorAppDataLocalpip里面的内容2、test on mnistcd examplespython mnist.pyEpoch 103 of 500 took 11.717s training loss: 0.045202 validation loss: 0.059163 validation accuracy: 98.16 %Epoch 104 of 500 took 11.702s training loss: 0.046228 validation loss: 0.058582 validation accuracy: 98.14 %Epoch 105 of 500 took 11.704s training loss: 0.044530 validation loss: 0.058295 validation accuracy: 98.18 %三、Facial Keypoints Detection1、从/dylansun/Kaggle-Facial-Keypoint-Detection 上下载data数据进行训练:Data Files:training.zip (60.10 mb)test.zip (15.99 mb)SampleSubmission.csv (201.08 kb)IdLookupTable.csv (842.51 kb)Each predicted keypoint is specified by an (x,y) real-valued pair in the space of pixel indices. There are 15 keypoints, which represent the following elements of the face:left_eye_center, right_eye_center, left_eye_inner_corner, left_eye_outer_corner, right_eye_inner_corner, right_eye_outer_corner, left_eyebrow_inner_end, left_eyebrow_outer_end, right_eyebrow_inner_end, right_eyebrow_outer_end, nose_tip, mouth_left_corner, mouth_right_corner, mouth_center_top_lip, mouth_center_bottom_lipLeft and right here refers to the point of view of the subject.In some examples, some of the target keypoint positions are misssing (encoded as missing entries in the csv, i.e., with nothing between two commas).The input image is given in the last field of the data files, and consists of a list of pixels (ordered by row), as integers in (0,255). The images are 96x96 pixels.Data filestraining.csv: list of training 7049 images. Each row contains the (x,y) coordinates for 15 keypoints, and image data as row-ordered list of pixels.test.csv: list of 1783 test images. Each row contains ImageId and image data as row-ordered list of pixelssubmissionFileFormat.csv: list of 27124 keypoints to predict. Each row contains a RowId, ImageId, FeatureName, Location. FeatureName are left_eye_center_x, right_eyebrow_outer_end_y, etc. Location is what you need to predict.2、采用kfkd.py进行训练:To use this script, first run this to fit your first model: python kfkd.py fitThen train a bunch of specialists that intiliaze their weights fromyour first model: python kfkd.py fit_specialists net.picklePlot their error curves: python kfkd.py plot_learning_curves net-specialists.pickle此处报错:Traceback (most recent call last): File C:Program Files (x86)JetBrainsPyCharm 4.0.4helperspydevpydevd.py, line 2222, in globals = debugger.run(setupfile, None, None) File C:Program Files (x86)JetBrainsPyCharm 4.0.4helperspydevpydevd.py, line 1648, in run pydev_imports.execfile(file, globals, locals) # execute the script File C:/Anaconda/src/lasagne/examples/Kaggle Facial Keypoints Detection/kfkd.py, line 417, in func(

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论