課件介紹第四周cv week4 theory_第1頁
課件介紹第四周cv week4 theory_第2頁
課件介紹第四周cv week4 theory_第3頁
課件介紹第四周cv week4 theory_第4頁
課件介紹第四周cv week4 theory_第5頁
已閱讀5頁,還剩58頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

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 分布式訓(xùn)練

Synchronous

PlacesanindividualmodelreplicaoneachGPU.SplitthebatchacrosstheGPUs.

UpdatesmodelparameterssynchronouslybywaitingforallGPUstofinishprocessingabatchofdata.

Asynchronous

ComputerVision

TrainingTricks

GPU 分布式訓(xùn)練

Synchronous

“l(fā)astexecutor”effect

ComputerVision

synchronoussystemshavetowaitontheslowestexecutorbeforecompletingeachiteration.

TrainingTricks

GPU 分布式訓(xùn)練

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

機(jī)器的力量:將數(shù)據(jù)轉(zhuǎn)化為知識(shí)

機(jī)器學(xué)習(xí)的整體概念

監(jiān)督學(xué)習(xí),非監(jiān)督學(xué)習(xí),增強(qiáng)學(xué)習(xí)

機(jī)器學(xué)習(xí)系統(tǒng)的Roadmap

Machinelearning經(jīng)典算法:機(jī)器學(xué)習(xí)≠深度學(xué)習(xí)

K-meansclustering

K-NN,SVM

Regression Task

Experience

LearnedProgram

Tas

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論