SlideShare a Scribd company logo
Susang Kim(healess1@gamil.com)
Light Weight Model
ShuffleNet: An Extremely Efficient Convolutional Neural Network
CNN Models are computationally expensive and memory intensive
Server 처리는 최소화로 Edge 기반의 서비스 개발중(속도)
To perform model compression and acceleration in deep networks without significantly decreasing
the model performance(From ResNet to MobileNet)
얼굴인식 핸드폰 잠금해제
(속도 / 인터넷 연결 불가)
[이미지 출처] : Real-time AWS Face Recognition
다량의 CCTV의 동시 실시간 영상 처리 대량의 이미지 동시 처리
Summarize these four types of approaches
https://arxiv.org/pdf/1710.09282.pdf
Using a compact filter for convolution can directly reduce the computation cost. The key idea is to
replace the loose and over-parametric filters with compact blocks to improve the speed.
SqueezeNet reduces parameters and computation significantly while maintaining accuracy.
An extremely computation-efficient CNN architecture named ShuffleNet
베이징에 본사를 둔 메그비(Megvii)이 소유한
Face++는 바이두와 스타트업 센스타임
(SenseTime)과 같은 다른 중국 회사들의
개발자들에게도얼굴인식 기술을 제공하고 있다.
칭화대학 졸업생 3명이 2011년에 설립한 메그비
((Megvii)는 2014년 불과 30명 정도의 직원에서
출발해 현재 530명의 직원을 두고 10억달러(약
1조1455억원) 상당의 가치를 지닌 유니콘 기업으로
성장했다.
중국은 안면인식 기술 선두 국가다. 전 세계
안면인식 기술 분야 톱3는 모두 중국 기업이다.
업계 최강자인 센스타임 밑으로 2위 이투커지,3위
메그비가 포진하고 있다.
[출처] : http://news.g-enews.com/view.php?ud=201708140757403462d6eb469fd3_1&md=20170814082305_K
Calculate the number of parameters in the CNN
[출처] : http://taewan.kim/post/cnn/
파라미터의 수가 fully connected Layer가 대부분을 차지
CNN 파라미터의 수는 전체 파라미터와 비교하여
160,000/161540=99%를 차지
파라미터의 수를 비교하면
fully connected Layer가
Input크기 X Output크기를 가지는 반면
CNN 필터의 경우 가로 X 세로 X 체널수의 곱들의 값
상대적으로 적은 Weight 값을 가지게 된다
따라서 fully connected layer의 파라미터수를 줄인다면
모델을 경량화 할 수 있음
1x1 CNN
[출처] : CS231n(CNN) https://zzsza.github.io/data/2018/05/14/cs231n-cnn/
1x1 CNN의 경우 필터의 출력 채널의 수에 따라
출력의 채널수는 달라지지만 이미지 사이즈는 그대로임
따라서 Output 필터 채널의 수를 Input 체널 수 보다
적개 구성하면 차원 축소 효과가 있음
3x3 CNN이 이미지내의 공간적 관계를 고려한 반면
1x1 CNN의 경우 동일 이미지 크기의 출력으로
차원 축소만을 처리함
Depthwise Separable Convolution
https://towardsdatascience.com/review-xception-with-depthwise-separable-convolution-better-than-inception-v3-image-dc967dd42568
DSC을 통해 파라미터의 갯수를 줄일 수 있음
input channel 5개, 3*3 kernel size,
output channel 1개의 경우
CNN : Parameter
3x3x5 = 45개 필요
DSC : Parameter
3x3+5x1=14개 필요.
1x1 CNN이 여전히 많은 비율 차지(MobileNet)
CNN을 DSC를 적용하더라도 1x1
CNN의 Parameter수는
74%로 개선의 여지가 있음
[출처] : MobileNet https://arxiv.org/pdf/1704.04861.pdf
Group Convolution for ShuffleNet
ImageNet Classification with Deep Convolutional Neural Networks (paper) 32186 / https://blog.yani.io/filter-group-tutorial/
2012년 ImageNet에
SOTA를 달성한 AlexNet
(GTX 580 3GB(memory) 2GPU)
2개의 GPU처리를 위해 각각의
채널을 병렬로 처리
또한 각 그룹을 섞기도함
Group Shuffle
1x1 CNN의 Parameter을 줄이기 위해 Shuffle를 적용 1x1
CNN을 그룹만큼 나누어 섞기에 1x1 CNN의 Group수로 나눈
만큼 감소함 Stage는 셔플 Unit의 반복 횟수(Repeat)를 나타내고 그룹이
늘어남에 따라 채널수가 늘어나도 Complexity는 변화가 없음
(Group가 1개의 경우 Shuffle가 없으므로 MobileNet과 같음)
Shuffle Units
a) bottleneck unit with depthwise convolution (DWConv)
b) ShuffleNet unit with pointwise group convolution (GConv) and channel shuffle;
c) ShuffleNet unit with stride = 2 / add a 3×3 average pooling on the shortcut path
(element-wise addition -> channel concatenation)
ResNet (Element-wise)
Group Shuffle Code(Tensorflow 1.x)
http://hugrypiggykim.com/2016/08/29/tensorflow-%EA%B8%B0%EB%B3%B8%EB%AC%B8%EB%B2%95-2/
Shuffle Units Code(Tensorflow 1.x)
Shuffle Units Code(Tensorflow)
Experiment of ShuffleNet
Shuffle의 유무에 따른 비교
(셔플을 하는게 실험결과가 더 좋음)
채널 수를 줄이면 에러율이 올라가고 그룹수가
3대비 8일때 에러율이 낫음
동일 연산량에서는 ShuffleNet가 가장 좋음
(당연하겠지만 VGG가 가장 안좋음)
MobileNet과 비교해도 성능이 좋고
SE(Squeeze-and-Excitation)적용시 더 좋아짐
플롭스(FLOPS, FLoating point OPerations per Second)는 컴퓨터의 성능을 수치로 나타낼 때 주로 사용되는 단위이다.
Experiment of ShuffleNet
각 Network별로 동일 Error률로 맞췄을때
연산량이 Shuffle가 훨씬 적음
Object Dection(MS COCO Data활용)의
경우에도 ShuffleNet이 성능이 좋음
ARM기반의 CPU에서 실험한 결과 비슷한
성능에서 속도가 훨씬 적게 나옴(1s=0.001ms)
Thanks
Any Questions?
You can send mail to
Susang Kim(healess1@gmail.com)

More Related Content

PDF
딥러닝 논문읽기 efficient netv2 논문리뷰
PPTX
Encoding in Style: a Style Encoder for Image-to-Image Translation
PDF
I3D and Kinetics datasets (Action Recognition)
PDF
스마트폰 위의 딥러닝
PPTX
Survey on Monocular Depth Estimation
PPTX
CNN
PPTX
AlexNet, VGG, GoogleNet, Resnet
PDF
Deep learning super resolution
딥러닝 논문읽기 efficient netv2 논문리뷰
Encoding in Style: a Style Encoder for Image-to-Image Translation
I3D and Kinetics datasets (Action Recognition)
스마트폰 위의 딥러닝
Survey on Monocular Depth Estimation
CNN
AlexNet, VGG, GoogleNet, Resnet
Deep learning super resolution

What's hot (20)

PDF
deep encoder, shallow decoder reevaluating non-autoregressive machine transl...
PDF
Designing more efficient convolution neural network
PDF
Convolutional Neural Networks(CNN) / Stanford cs231n 2017 lecture 5 / MLAI@UO...
PDF
[PR12] image super resolution using deep convolutional networks
PDF
PR-203: Class-Balanced Loss Based on Effective Number of Samples
PDF
[Pix2 pix] image to-image translation with conditional adversarial network re...
PDF
CNN Architecture A to Z
PDF
작고 빠른 딥러닝 그리고 Edge computing
PPTX
Review EDSR
PPTX
Image net classification with deep convolutional neural networks
PDF
Deep Learning & Convolutional Neural Network
PDF
Deep neural networks cnn rnn_ae_some practical techniques
PPTX
Review SRGAN
PDF
여러 컨볼루션 레이어 테크닉과 경량화 기법들
PDF
네트워크 경량화 이모저모 @ 2020 DLD
PPTX
Convolutional neural network
PPTX
Convolutional Neural Networks
PDF
(Paper Review)Few-Shot Adversarial Learning of Realistic Neural Talking Head ...
PDF
Detecting fake jpeg images
PDF
Convoutional sequence to sequence
deep encoder, shallow decoder reevaluating non-autoregressive machine transl...
Designing more efficient convolution neural network
Convolutional Neural Networks(CNN) / Stanford cs231n 2017 lecture 5 / MLAI@UO...
[PR12] image super resolution using deep convolutional networks
PR-203: Class-Balanced Loss Based on Effective Number of Samples
[Pix2 pix] image to-image translation with conditional adversarial network re...
CNN Architecture A to Z
작고 빠른 딥러닝 그리고 Edge computing
Review EDSR
Image net classification with deep convolutional neural networks
Deep Learning & Convolutional Neural Network
Deep neural networks cnn rnn_ae_some practical techniques
Review SRGAN
여러 컨볼루션 레이어 테크닉과 경량화 기법들
네트워크 경량화 이모저모 @ 2020 DLD
Convolutional neural network
Convolutional Neural Networks
(Paper Review)Few-Shot Adversarial Learning of Realistic Neural Talking Head ...
Detecting fake jpeg images
Convoutional sequence to sequence
Ad

Similar to [Paper] shuffle net an extremely efficient convolutional neural network for mobile devices (20)

PDF
History of Vision AI
PDF
[paper review] 손규빈 - Eye in the sky & 3D human pose estimation in video with ...
PPTX
텐서플로우 2.0 튜토리얼 - CNN
PDF
밑바닥부터 시작하는딥러닝 8장
PPTX
Image Deep Learning 실무적용
PDF
HistoryOfCNN
PPTX
Image classification
PPTX
Net adapt
PDF
[Paper] eXplainable ai(xai) in computer vision
PDF
델켐매거진5호
PPTX
Kgw2015 lg엔시스 안무정_최종본
PDF
AUTOML
PDF
Automl
PDF
20200309 (FSRI) deep-family_v2-br31_rabbit
PDF
210801 hierarchical long term video frame prediction without supervision
PDF
Summary in recent advances in deep learning for object detection
PDF
Summary in recent advances in deep learning for object detection
PDF
Designing more efficient convolution neural network
PDF
유연하고, 빠른 딥러닝 프레임워크 Apache MXNet, Gluon::김무현::AWS Summit Seoul 2018
History of Vision AI
[paper review] 손규빈 - Eye in the sky & 3D human pose estimation in video with ...
텐서플로우 2.0 튜토리얼 - CNN
밑바닥부터 시작하는딥러닝 8장
Image Deep Learning 실무적용
HistoryOfCNN
Image classification
Net adapt
[Paper] eXplainable ai(xai) in computer vision
델켐매거진5호
Kgw2015 lg엔시스 안무정_최종본
AUTOML
Automl
20200309 (FSRI) deep-family_v2-br31_rabbit
210801 hierarchical long term video frame prediction without supervision
Summary in recent advances in deep learning for object detection
Summary in recent advances in deep learning for object detection
Designing more efficient convolution neural network
유연하고, 빠른 딥러닝 프레임워크 Apache MXNet, Gluon::김무현::AWS Summit Seoul 2018
Ad

More from Susang Kim (14)

PDF
[Paper] GIRAFFE: Representing Scenes as Compositional Generative Neural Featu...
PDF
[Paper] Multiscale Vision Transformers(MVit)
PDF
[Paper] dynamic routing between capsules
PDF
[Paper] anti spoofing for face recognition
PDF
[Paper] attention mechanism(luong)
PDF
[Paper] EDA : easy data augmentation techniques for boosting performance on t...
PDF
[Paper] auto ml part 1
PDF
[Paper] learning video representations from correspondence proposals
PDF
[Paper] DetectoRS for Object Detection
PDF
Long term feature banks for detailed video understanding (Action Recognition)
PPTX
GroupFace (Face Recognition)
PPTX
제11회공개sw개발자대회 금상 TensorMSA(소개)
PDF
Sk t academy lecture note
PPTX
Python과 Tensorflow를 활용한 AI Chatbot 개발 및 실무 적용
[Paper] GIRAFFE: Representing Scenes as Compositional Generative Neural Featu...
[Paper] Multiscale Vision Transformers(MVit)
[Paper] dynamic routing between capsules
[Paper] anti spoofing for face recognition
[Paper] attention mechanism(luong)
[Paper] EDA : easy data augmentation techniques for boosting performance on t...
[Paper] auto ml part 1
[Paper] learning video representations from correspondence proposals
[Paper] DetectoRS for Object Detection
Long term feature banks for detailed video understanding (Action Recognition)
GroupFace (Face Recognition)
제11회공개sw개발자대회 금상 TensorMSA(소개)
Sk t academy lecture note
Python과 Tensorflow를 활용한 AI Chatbot 개발 및 실무 적용

[Paper] shuffle net an extremely efficient convolutional neural network for mobile devices

  • 1. Susang Kim(healess1@gamil.com) Light Weight Model ShuffleNet: An Extremely Efficient Convolutional Neural Network
  • 2. CNN Models are computationally expensive and memory intensive Server 처리는 최소화로 Edge 기반의 서비스 개발중(속도) To perform model compression and acceleration in deep networks without significantly decreasing the model performance(From ResNet to MobileNet) 얼굴인식 핸드폰 잠금해제 (속도 / 인터넷 연결 불가) [이미지 출처] : Real-time AWS Face Recognition 다량의 CCTV의 동시 실시간 영상 처리 대량의 이미지 동시 처리
  • 3. Summarize these four types of approaches https://arxiv.org/pdf/1710.09282.pdf Using a compact filter for convolution can directly reduce the computation cost. The key idea is to replace the loose and over-parametric filters with compact blocks to improve the speed. SqueezeNet reduces parameters and computation significantly while maintaining accuracy.
  • 4. An extremely computation-efficient CNN architecture named ShuffleNet 베이징에 본사를 둔 메그비(Megvii)이 소유한 Face++는 바이두와 스타트업 센스타임 (SenseTime)과 같은 다른 중국 회사들의 개발자들에게도얼굴인식 기술을 제공하고 있다. 칭화대학 졸업생 3명이 2011년에 설립한 메그비 ((Megvii)는 2014년 불과 30명 정도의 직원에서 출발해 현재 530명의 직원을 두고 10억달러(약 1조1455억원) 상당의 가치를 지닌 유니콘 기업으로 성장했다. 중국은 안면인식 기술 선두 국가다. 전 세계 안면인식 기술 분야 톱3는 모두 중국 기업이다. 업계 최강자인 센스타임 밑으로 2위 이투커지,3위 메그비가 포진하고 있다. [출처] : http://news.g-enews.com/view.php?ud=201708140757403462d6eb469fd3_1&md=20170814082305_K
  • 5. Calculate the number of parameters in the CNN [출처] : http://taewan.kim/post/cnn/ 파라미터의 수가 fully connected Layer가 대부분을 차지 CNN 파라미터의 수는 전체 파라미터와 비교하여 160,000/161540=99%를 차지 파라미터의 수를 비교하면 fully connected Layer가 Input크기 X Output크기를 가지는 반면 CNN 필터의 경우 가로 X 세로 X 체널수의 곱들의 값 상대적으로 적은 Weight 값을 가지게 된다 따라서 fully connected layer의 파라미터수를 줄인다면 모델을 경량화 할 수 있음
  • 6. 1x1 CNN [출처] : CS231n(CNN) https://zzsza.github.io/data/2018/05/14/cs231n-cnn/ 1x1 CNN의 경우 필터의 출력 채널의 수에 따라 출력의 채널수는 달라지지만 이미지 사이즈는 그대로임 따라서 Output 필터 채널의 수를 Input 체널 수 보다 적개 구성하면 차원 축소 효과가 있음 3x3 CNN이 이미지내의 공간적 관계를 고려한 반면 1x1 CNN의 경우 동일 이미지 크기의 출력으로 차원 축소만을 처리함
  • 7. Depthwise Separable Convolution https://towardsdatascience.com/review-xception-with-depthwise-separable-convolution-better-than-inception-v3-image-dc967dd42568 DSC을 통해 파라미터의 갯수를 줄일 수 있음 input channel 5개, 3*3 kernel size, output channel 1개의 경우 CNN : Parameter 3x3x5 = 45개 필요 DSC : Parameter 3x3+5x1=14개 필요.
  • 8. 1x1 CNN이 여전히 많은 비율 차지(MobileNet) CNN을 DSC를 적용하더라도 1x1 CNN의 Parameter수는 74%로 개선의 여지가 있음 [출처] : MobileNet https://arxiv.org/pdf/1704.04861.pdf
  • 9. Group Convolution for ShuffleNet ImageNet Classification with Deep Convolutional Neural Networks (paper) 32186 / https://blog.yani.io/filter-group-tutorial/ 2012년 ImageNet에 SOTA를 달성한 AlexNet (GTX 580 3GB(memory) 2GPU) 2개의 GPU처리를 위해 각각의 채널을 병렬로 처리 또한 각 그룹을 섞기도함
  • 10. Group Shuffle 1x1 CNN의 Parameter을 줄이기 위해 Shuffle를 적용 1x1 CNN을 그룹만큼 나누어 섞기에 1x1 CNN의 Group수로 나눈 만큼 감소함 Stage는 셔플 Unit의 반복 횟수(Repeat)를 나타내고 그룹이 늘어남에 따라 채널수가 늘어나도 Complexity는 변화가 없음 (Group가 1개의 경우 Shuffle가 없으므로 MobileNet과 같음)
  • 11. Shuffle Units a) bottleneck unit with depthwise convolution (DWConv) b) ShuffleNet unit with pointwise group convolution (GConv) and channel shuffle; c) ShuffleNet unit with stride = 2 / add a 3×3 average pooling on the shortcut path (element-wise addition -> channel concatenation) ResNet (Element-wise)
  • 12. Group Shuffle Code(Tensorflow 1.x) http://hugrypiggykim.com/2016/08/29/tensorflow-%EA%B8%B0%EB%B3%B8%EB%AC%B8%EB%B2%95-2/
  • 15. Experiment of ShuffleNet Shuffle의 유무에 따른 비교 (셔플을 하는게 실험결과가 더 좋음) 채널 수를 줄이면 에러율이 올라가고 그룹수가 3대비 8일때 에러율이 낫음 동일 연산량에서는 ShuffleNet가 가장 좋음 (당연하겠지만 VGG가 가장 안좋음) MobileNet과 비교해도 성능이 좋고 SE(Squeeze-and-Excitation)적용시 더 좋아짐 플롭스(FLOPS, FLoating point OPerations per Second)는 컴퓨터의 성능을 수치로 나타낼 때 주로 사용되는 단위이다.
  • 16. Experiment of ShuffleNet 각 Network별로 동일 Error률로 맞췄을때 연산량이 Shuffle가 훨씬 적음 Object Dection(MS COCO Data활용)의 경우에도 ShuffleNet이 성능이 좋음 ARM기반의 CPU에서 실험한 결과 비슷한 성능에서 속도가 훨씬 적게 나옴(1s=0.001ms)
  • 17. Thanks Any Questions? You can send mail to Susang Kim(healess1@gmail.com)