课件介绍第四周cv week4 theory_第1页
课件介绍第四周cv week4 theory_第2页
课件介绍第四周cv week4 theory_第3页
课件介绍第四周cv week4 theory_第4页
课件介绍第四周cv week4 theory_第5页
已阅读5页,还剩58页未读 继续免费阅读

下载本文档

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

文档简介

FacelandmarkdetectionusingCNN

Task

Theobjectiveofthistaskistopredictkeypointpositionsonfaceimages.

Usage

trackingfacesinimagesandvideo

analyzingfacialexpressions

detectingdysmorphicfacialsignsformedicaldiagnosis

biometrics/facerecognition

Method

DeepLearning

CNNregression

ComputerVision

FacelandmarkdetectionusingCNN

SomeDatasets

CUHK: MALF&MTLF

12995,20000images

5keypoints

Kaggle: FacialKeypointDetection

7049Images

96x96

15keypoints

ComputerVision

/notes/2014/12/17/using-

convolutional-neural-nets-to-detect-facial-keypoints-thutttop:r/ia/lm/#mthlaeb-.hk/projects/TCDCN.ht

FacelandmarkdetectionusingCNN

Method

CNN

Regression

Whatlossshouldweuse?

ComputerVision

.hk/projects/TCDCN.ht

ml

FacelandmarkdetectionusingCNN

Method

CNN

Regression

Whatlossshouldweuse?

Consider:

Whatlabelwehave?

Whattargetwewant?

Howtocomputeloss?

ComputerVision

.hk/projects/TCDCN.ht

ml

FacelandmarkdetectionusingCNN

Method

CNN

Regression

Howtocomputeloss?

Whatlossshouldweuse?

ComputerVision

Consider:

Whatlabelwehave?

Keypoints,

e.g.,{(x1,y1),(x2,y2)…

Whattargetwewant?

Locationsofkeypoints

.hk/projects/TCDC

N.html

FacelandmarkdetectionusingCNN

ComputerVision

10 E

/.hk/projects/TCDCN.html

10

GroundTruth

Loss

FacelandmarkdetectionusingCNN

ComputerVision

FacelandmarkdetectionusingCNN

ComputerVision

Schedule

FacelandmarkdetectionusingCNN

CNNregression

Faciallandmarkdetection

GenderClassificationonFaceimageusingCNN

TransferLearning

AdvancedTopics

RNN/LSTMincomputervision

Cuttingedgetechniquesindeeplearning

ClassSummary

ComputerVision

FaceGenderClassification

GenderClassificationonFaceimageusingCNN

Problem:

Estimategender(Male/Female)givenafaceimage

Data:

FaceImage

GenderInformation(2classproblem)

Database:

CUHK:MALF&MTLF

CUHK:CelebA

ComputerVision

FaceGenderClassification

GenderClassificationonFaceimageusingCNN

Method:

CNN

Whatisourtrainingdata?

Faceimage

Gender:{0,1}=>{Male,Female}

Howtoorganizethetraining?

Trainfromscratch

Usepre-trainedmodelandfine-tuning

Whatnetworkshouldweuse?

Whatlossshouldweuse?

Howtotestourmodel?

ComputerVision

FaceGenderClassification

GenderClassificationonFaceimageusingCNN

Whatisourtrainingdata?

Faceimage

Gender:{0,1}=>{Male,Female}

Howtoorganizethetraining?

Trainfromscratch

Usepre-trainedmodelandfine-tuning

Whatnetworkshouldweuse?

AlexNet,VGG,ResNet18,etc…

Whatlossshouldweuse?

Softmax

CrossEntropy

Howtotestourmodel?

ComputerVision

FaceGenderClassification

GenderClassificationonFaceimageusingCNN

Method:

Usepre-trainedmodelandfine-tuning

Idea:

FaceRecognitionmodel

+

FacewithGenderData

+

Training

=

GenderModel

ComputerVision

Fine-tuningtakesanalreadylearnedmodel,adaptsthearchitecture,andresumestrainingfromthealreadylearnedmodelweights.

FaceGenderClassification

GenderClassificationonFaceimageusingCNN

Method:

Usepre-trainedmodelandfine-tuning

Idea:

FaceRecognitionmodel

+

FacewithGenderData

+

Training

=

GenderModel

TransferLearning

ComputerVision

FaceGenderClassification

GenderClassificationonFaceimageusingCNN

Method:

Usepre-trainedmodelandfine-tuning

Pre-trainedmodel:

VGGFaceRecognitionmodel(forclassificatione.g.,1000identities)

Fine-tunethenet:

FaceGenderData

Similarnetworkarchitecture

Changelastlayer(s)tothegenderclassificationtask

Extension:

Task1

Task2

Task3

Multi-taskDCNN

ComputerVision

Schedule

FacelandmarkdetectionusingCNN

CNNregression

Faciallandmarkdetection

GenderClassificationonFaceimageusingCNN

TransferLearning

AdvancedTopics

RNN/LSTMincomputervision

Activationsfunctions

AdvancedLayers

AdvancedNetworkarchitectures

TrainingTricks

ClassSummary

ComputerVision

RNN/LSTMinComputerVision

RecurrentNeuralNetwork(RNN)

ComputerVision

Aloopallowsinformationtobepassedfromonestepofthenetworktothenext

http://colah.github.io/posts/2015-08-Understanding-

RNN/LSTMinComputerVision

RecurrentNeuralNetwork(RNN)

WhyweneedRNN?

ComputerVision

Handwave?Standup?

RNN/LSTMinComputerVision

RecurrentNeuralNetwork(RNN)

RNNProblem

LSTM

Long-ShortTermMemory

ComputerVision

StandardRNN

LSTM

RNN/LSTMinComputerVision

RecurrentNeuralNetwork(RNN)

ApplicationsinComputervision:

ObjectTracking

ActionRecognition

VideoCaptioning

Videoanalysis

Imagegeneralization

Applicationsinothermlarea:

Translation

NLP(e.g.,wordprediction)

Speechrecognition

ComputerVision

AdvancedTopics

ActivationFunction

Sigmoid,Tanh,ReLU

AdvancedActivationFunctions:

LeakyReLU

ParametricReLU

RandomizedRuLU

ELU

ComputerVision

AdvancedTopics

AdvancedLayers

DilatedConv

BNLayer

RecurrentLayer

RNN

LSTM

ComputerVision

AdvancedTopics

AdvancedLayers

DilatedConv

ComputerVision

Dilatedconvolutions“inflate”thekernelbyinsertingspacesbetweenthekernelelements.

largerreceptivefield,

efficientcomputationandlessermemoryconsumption

Poolingmakesreceptivefieldsmallerandsmaller

Up-samplingcannotrestorelostinformation

Dilatedconvhelpkeepthereceptivefiled

AdvancedTopics

BNLayer

IssuesWithTrainingDeepNeuralNetworks

InternalCovariateshift

VanishingGradient

AdvantagesofBN:

Reducesinternalcovariantshift.

t

Reducesthedependenceofgradientsonscaleoftheparametersortheirinitialvalues.

Regularizesthemodelandreducestheneedfordropout,localresponsenormalizationandotherregularizationtechniques.

Allowsuseofsaturatingnonlinearitiesandhigherlearningrates.

ComputerVision

AdvancedTopics

NetworkStructure

DenseNet

ResNext

SqueezeNet

TinyDarknet

ComputerVision

AdvancedTopics

NetworkStructure

DenseNet

ResNext

SqueezeNet

TinyDarknet

ComputerVision

AdvancedTopics

NetworkStructure

DenseNet

ResNext

SqueezeNet

TinyDarknet

ComputerVision

AdvancedTopics

NetworkStructure

DenseNet

ResNext

SqueezeNet

TinyDarknet

ComputerVision

AdvancedTopics

NetworkStructure

1x1conv

Combinemultiplechannels

Dimensionreduction

ComputerVision

1x1convWith32

56 filters 56

Eachfilter

56 hassize 56

64 1x1x64,and 32

performsa64dimdotproduct

TrainingTricks

GPU 分布式训练

Synchronous

PlacesanindividualmodelreplicaoneachGPU.SplitthebatchacrosstheGPUs.

UpdatesmodelparameterssynchronouslybywaitingforallGPUstofinishprocessingabatchofdata.

Asynchronous

ComputerVision

TrainingTricks

GPU 分布式训练

Synchronous

“lastexecutor”effect

ComputerVision

synchronoussystemshavetowaitontheslowestexecutorbeforecompletingeachiteration.

TrainingTricks

GPU 分布式训练

Asynchronous

Stalegradientproblem

ComputerVision

TrainingTricks

DataNormalization

InputData

Continuousdata:

Normalizeto[0,1]or[-1,1],ormean=0&std=1

DiscreteLabeldata: Onehotvector

E.g.,3classes[0,1,2] ➔[[1,0,0],[0,1,0],[0,0,1]]

ComputerVision

Note:Normalizationmethodintrainingantestingmustbethesame!

TrainingTricks

WeightInitialization

Principle:

Nottoolarge,Nottoosmall

Xavier

Gaussian

biasusuallysettoconstant(e.g.,0)

Etc.

ComputerVision

TrainingTricks

EpochandIteration

EpochUsually>>1

#ofIterations=#ofEpoch*data_size/batch_size

Small#ofEpoch:

Underfitting

Large#ofEpoch:

Overfitting

Howtodecide?

Earlystopping

ComputerVision

TrainingTricks

LearningRate

Oneofthemostimportantparamintraining

Toosmall:

Slow,sometimesnotconverge

Toolarge:

Noconvergence

Usuallyrange:

0.1---1e-6

Howtodecide?

Visualizetraining

TrainingfromscratchandFinetuning

ComputerVision

TrainingTricks

Activationfunction

Hiddenlayers:

ReLUandLeakyRelu

LSTM:

SigmoidandTanh

ComputerVision

OutputLayers:

Classification:Softmax

Regression:Identity

no-opactivation,usefultoimplementlinearbottleneck,returnsf(x)=x

TrainingTricks

Lossfunction:

Yournet’spurposedeterminethelossfunctionyouuse.

Forexample,

inclassificationproblem:usemulticlasscrossentropyloss.

inregressionproblem:useEuclideanloss.

ComputerVision

TrainingTricks

Regularization:

Helppreventoverfitting

L1andL2regularization

UsuallyL2,decay1e-3to1e-6

Dropout

Usually0.3or0.5

EarlyStopping

ComputerVision

TrainingTricks

BatchSize:

Toosmall:

Slowtraining

DonotutilizeGPU

Toolarge:

Overfitting(ICLR2017paper)

Usually:

16,32,128…

ComputerVision

TrainingTricks

Solver/Optimizer:

SGD

Momentum

Adam/RMSProp

ComputerVision

Schedule

FacelandmarkdetectionusingCNN

CNNregression

Faciallandmarkdetection

GenderClassificationonFaceimageusingCNN

TransferLearning

AdvancedTopics

RNN/LSTMincomputervision

Activationsfunctions

AdvancedLayers

AdvancedNetworkarchitectures

TrainingTricks

ClassSummary

ComputerVision

ComputerVision

ClassSummary

Week 1

机器的力量:将数据转化为知识

机器学习的整体概念

监督学习,非监督学习,增强学习

机器学习系统的Roadmap

Machinelearning经典算法:机器学习≠深度学习

K-meansclustering

K-NN,SVM

Regression Task

Experience

LearnedProgram

Tas

温馨提示

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

评论

0/150

提交评论