6월, 2016의 게시물 표시

Ubuntu + Caffe + ImageNet

이미지
import numpy as np import matplotlib.pyplot as plt import sys caffe_root = '../' sys.path.insert(0, caffe_root + 'python') import caffe # Set the pathes of model definition, trained model and image file to be predicted MODEL_FILE = '../models/bvlc_reference_caffenet/deploy.prototxt' PRETRAINED = '../models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel' IMAGE_FILE = 'images/irish_terrier.jpg' # load classifier net = caffe.Classifier(MODEL_FILE, PRETRAINED, mean=np.load(caffe_root + 'python/caffe/imagenet/ilsvrc_2012_mean.npy').mean(1).mean(1), channel_swap=(2,1,0), raw_scale=255, image_dims=(256, 256)) # net.set_phase_test() # net.set_mode_cpu() # load image file to be predicted input_image = caffe.io.load_image(IMAGE_FILE) # predict prediction = net.predict([input_image]) sorted_predict = sorted(range(len(prediction[0])),key=...

딥러닝으로 채색한 6.25사진-5. 소녀

이미지

딥러닝으로 채색한 6.25 사진- 4. 흥남 부두

이미지

딥러닝으로 채색한 6.25사진-3. 포로

이미지

딥러닝으로 채색한 육이오 사진-2. 도하

이미지

딥러닝으로 채색한 육이오 사진-1. 폭발

이미지

카페의 특징

Caffe에서 특히 흥미로운 것은  학습 된 모델이 배포되어있는  것입니다.  이에 따라 자기 부담으로 학습 시키려고하면 며칠 씩 걸리는 데이터 크기 모델도 쉽게 사용할 수있게됩니다.  논문에 기존 방법으로 나란히 때라든지 편리하네요.

베스트 Caffe 학습 사이트 모음

기사 소개 앞으로 Caffe를 공부하고 싶은 사람에게 도움이 될만한 기사를 정리하고 있습니다. 공식 :  http://caffe.berkeleyvision.org/  우선 공식 페이지.  document과 ipython notebook에 따르면 PyCaffe 등의 튜토리얼이 매우 충실하고 좋은 느낌입니다. class list 등 :  http://caffe.berkeleyvision.org/doxygen/annotated.html  caffe에서 사용 가능한 layer 등에 대해 정리하고 있습니다. Caffe에서 손쉽게 이미지 분류 :  http://techblog.yahoo.co.jp/programming/caffe-intro/  reference model을 사용하여 Caffe 특징 추출기로 사용하는 방법과 데이터베이스의 준비, 미세 조정 등을 수행하는 방법 이 정중하게 설명되어 있습니다. Caffe의 wiki :  http://wiki.ruka-f.net/index.php?Caffe  에 기사를 실제로 해 보거나 여러가지하고 있습니다. Caffe과 maf을 이용한 딥 학습 개발 · 실험 방법 :  http://www.slideshare.net/KentaOono/how-to-develop  Caffe 간단한 소개와 maf 의한 실험 방법을 정리하고 있습니다. Caffe 대한 도움말 얻기や모르는 것이있을 때는  caffe users mailing list :  https://groups.google.com/forum/#!forum/caffe-users  github issue :  https://github.com/BVLC / caffe / issues  http://boardreader.com/site/Issues_BVLC_caffe_GitHub_598836690.html  을 보면...

Caffe 란?

Caffe 뭐야? Caffe는 Deep Learning 프레임 워크 중 하나입니다.  Deep Learning은 일반적으로 구현이 어렵다고되어 있지만 프레임 워크를 사용하면 아주 손쉽게 사용할 수 있습니다. 대표적인 프레임 워크는 Caffe theano / Pylearn2 Cuda-convnet2 Torch7 등이 있습니다.  이 중에서도 가장 빠른이며 또한 가장 활발하게 개발이 이루어지고있는 것이  Caffe  입니다. 우선 이번은 Caffe과 theano에서 속도 비교도 해 보려고합니다.

Sketch to Photo using DNN

이미지

CuDNN Version Check

이미지
$ cat / usr / local / cuda / include / cudnn . h | grep CUDNN_MAJOR - A 2

CUDA & CuDNN install

이미지
http://christopher5106.github.io/big/data/2015/07/16/deep-learning-install-caffe-cudnn-cuda-for-digits-python-on-ubuntu-14-04.html

Nvidia's CUDA 7.5

CUDA 7.5 Both of the above pieces of software are based on the new CUDA 7.5 toolkit. The reason why CuDNN 3 supports 16-bit floating point data is because CUDA 7.5 now supports it. Most notably, it offers support for mixed floating point data, meaning that 16-bit vector data can be used where accuracy is less essential, and 32-bit data points will be used when higher accuracy is required. Additional changes include new cuSPARSE GEMVI routines, along with instruction-level profiling, which can help you figure out which part of your code is limiting GPU performance. The Preview Release version of the DIGTS 2 software is all available for free to registered CUDA developers, with final versions coming soon.  More information is available here .

NVidia's CuDNN 3

이미지
CuDNN 3 CuDNN 3 is Nvidia's Deep Learning library, and as you may have guessed, it is CUDA based. Compared to the previous version, it can train DNNs up to 2x faster on identical hardware platforms with Maxwell GPUs. Nvidia achieved this improvement by optimizing the 2D convolution and FFT convolution processes. CuDNN 3 also has support for 16-bit floating point data storage in the GPU memory, which enables larger neural networks. In the past, all data points were 32 bits in size, but not a lot of vector data needs the full accuracy of 32-bit data. Of course, some accuracy is lost in the process for each vector point, but the result of that tradeoff is that the GPU's memory has room more vectors, which in turn can increase the accuracy of the entire model.

NVidia's DIGIT2

이미지
DIGITS 2 For that reason, DIGITS 2's biggest update is that it can now build a single neural net using up to four GPUs; in the past, you could only use one per neural net. When using four GPUs, the training process for a neural net is up to 2x faster than on a single GPU. Of course, you may then say: build four different neural nets and see which one is the best. But it's not quite that simple. A researcher may begin by building four different neural nets with different parameters, but based on the same learning data, and figure out which one is best, and then from there on out improve the parameters until the ideal setup is found, at which point only a single neural net needs to be trained. Nvidia's DIGITS is a software package with a web-based interface for Deep Learning, where scientists and researchers can start, monitor, and train DNNs. It comes with various Deep Learning libraries, making it a complete package. It allows researchers to focus on the result...

Regression vs Classification

이미지

Install Opencv 3.1.0 on Ubuntu 14.04 and example in cpp and python

이미지