bil 722 : deep learning for computer vision caffe tutorialaykut/classes/spring2016/bil722/... ·...
TRANSCRIPT
BIL 722 : Deep Learning For Computer Vision
Caffe Tutorial
Çağdaş BAK
What is, Why Caffe ?
• Open source Deep Learning Framework. – Berkeley Vision and Learning Center (BVLC)
• Expression : Models and optimizations are defined as plaintext schemas.
• Speed : for research and industry alike speed is crucial for state of the art models and massive data.
• Modularity : new tasks and settings require flexibity and extension.
• Openness : scientific and applied progress call for common code, reference models and reproducibility.
• Community
from Kai KANG
How to Get Started?
• Official website – http://caffe.berkeleyvision.org
• GitHub page – https://github.com/BVLC/caffe
• Installation instructions – http://caffe.berkeleyvision.org/installation.html
– http://web.cs.hacettepe.edu.tr/~aykut/classes/spring2016/bil722/
from Kai KANG
Caffe Structures
• Blob : Stores data and derivatives
• Layer : Transforms bottom blobs to top blobs
• Net : Many layers, computes gradients via fw/bw
• Solver : Uses gradiens to update weights
from Andrej Karpathy
Caffe Protocol Buffers
• Like strongly typed, binary JSON
• Define message types in .proto file
• Define messages in .prototxt or .binaryproto files
– Caffe also uses .caffemodels
– All caffe messages; • https://github.com/BVLC/caffe/blob/85bb397acfd383a676c125c7
5d877642d6b39ff6/src/caffe/proto/caffe.proto
from Andrej Karpathy
A Caffe Layer
from Yangqing Jia
A Caffe Network
from Kai KANG
A Caffe Network (Prototxt)
from Andrej Karpathy
Basic Steps
• Convert data
• Define net
• Define solver
• Train
BIL722 : Deep Learning For Computer Vision / Caffe Tutorial
Basic Steps
• Convert data – Lightning Memory-Mapped Database
• https://en.wikipedia.org/wiki/Lightning_Memory_mapped_Database
– Hierarchical Data Format • https://en.wikipedia.org/wiki/Hierarchical_Data_Format
– Text Based • .txt
• Define net
• Define solver
• Train
BIL722 : Deep Learning For Computer Vision / Caffe Tutorial
Basic Steps
• Convert data
• Define net
– As prototxt
• Define solver
• Train
BIL722 : Deep Learning For Computer Vision / Caffe Tutorial
Basic Steps
• Convert data
• Define net
• Define solver
– As prototxt
• Train
BIL722 : Deep Learning For Computer Vision / Caffe Tutorial
Basic Steps
• Convert data
• Define net
• Define solver
• Train & Feature Extract
– With pretrained weights (finetuning)
– Or initial weights
BIL722 : Deep Learning For Computer Vision / Caffe Tutorial
Caffe Model Zoo
• https://github.com/BVLC/caffe/wiki/Model-Zoo
• http://caffe.berkeleyvision.org/model_zoo.html
• Keep in Mind !!!
– We need large amount of data.
BIL722 : Deep Learning For Computer Vision / Caffe Tutorial
Finetuning
• Initialize your network with using pretrained weights.
• Train your network with your own data.
IF Your data <<<<< necessary amount
BIL722 : Deep Learning For Computer Vision / Caffe Tutorial
Wrappers
BIL722 : Deep Learning For Computer Vision / Caffe Tutorial
Installation
• Mac OS-X
– http://web.cs.hacettepe.edu.tr/~aykut/classes/spring2016/bil722
• UBUNTU
– http://web.cs.hacettepe.edu.tr/~aykut/classes/spring2016/bil722/
• Windows
– https://github.com/niuzhiheng/caffe
BIL722 : Deep Learning For Computer
Vision / Caffe Tutorial
Hardware Requirements (for GPU Support)
• Nvidia Tesla K40s
• Nvidia Tesla K20s
• Nvidia Titans
• Nvidia GTX 980s
BIL722 : Deep Learning For Computer Vision / Caffe Tutorial
Usefull Links
• http://caffe.berkeleyvision.org/ • https://github.com/BVLC/caffe • https://github.com/BVLC/caffe/wiki/Model-Zoo • http://caffe.berkeleyvision.org/tutorial/ • http://caffe.berkeleyvision.org/installation.html • https://github.com/niuzhiheng/caffe • http://caffe.berkeleyvision.org/doxygen/annotated.html • http://caffe.berkeleyvision.org/development.html • http://caffe.berkeleyvision.org/gathered/examples/feature_extraction.html • http://caffe.berkeleyvision.org/gathered/examples/imagenet.html • http://caffe.berkeleyvision.org/gathered/examples/mnist.html • http://www.nvidia.com.tr/page/home.html • https://developer.nvidia.com/cudnn • https://developer.nvidia.com/deep-learning • https://developer.nvidia.com/deep-learning-courses
BIL722 : Deep Learning For Computer Vision / Caffe Tutorial
BIL 722 : Deep Learning For Computer Vision
Caffe Tutorial
Çağdaş BAK