파이썬 데이터과학 레벨2 - 데이터 시각화와 실전 데이터분석, 그리고 머신러닝 입문 (2020년 이태영)Tae Young Lee
파이썬 데이터과학 레벨2 - 데이터 시각화와 실전 데이터분석, 그리고 머신러닝 입문 (2020년 이태영)
- 코스피 LG유플러스 주가분석, 대한민국 부동산 분석, 강남 아파트 매매 분석, VISA 보고서 분석, 워드클라우드 등
- 국내 어떤 책에서도 다루지 않는 진짜 데이터분석 강의
- (귀차니즘에..) 소수 금융권/대기업/공기업에게만 강의된 자료
파이썬 데이터과학 레벨2 - 데이터 시각화와 실전 데이터분석, 그리고 머신러닝 입문 (2020년 이태영)Tae Young Lee
파이썬 데이터과학 레벨2 - 데이터 시각화와 실전 데이터분석, 그리고 머신러닝 입문 (2020년 이태영)
- 코스피 LG유플러스 주가분석, 대한민국 부동산 분석, 강남 아파트 매매 분석, VISA 보고서 분석, 워드클라우드 등
- 국내 어떤 책에서도 다루지 않는 진짜 데이터분석 강의
- (귀차니즘에..) 소수 금융권/대기업/공기업에게만 강의된 자료
Slides based on "Introduction to Machine Learning with Python" by Andreas Muller and Sarah Guido for Hongdae Machine Learning Study(https://www.meetup.com/Hongdae-Machine-Learning-Study/) (epoch #2)
홍대 머신 러닝 스터디(https://www.meetup.com/Hongdae-Machine-Learning-Study/) (epoch #2)의 "파이썬 라이브러리를 활용한 머신러닝"(옮긴이 박해선) 슬라이드 자료.
Slides based on "Introduction to Machine Learning with Python" by Andreas Muller and Sarah Guido for Hongdae Machine Learning Study(https://www.meetup.com/Hongdae-Machine-Learning-Study/) (epoch #2)
홍대 머신 러닝 스터디(https://www.meetup.com/Hongdae-Machine-Learning-Study/) (epoch #2)의 "파이썬 라이브러리를 활용한 머신러닝"(옮긴이 박해선) 슬라이드 자료.
"R을 이용한 데이터 처리 & 분석 실무 - 서민구 지음" 정리 자료 #1
- https://thebook.io/006723/
- 첫번째 : goo.gl/FJjOlq
- 두번째 : goo.gl/Wdb90g
- 세번째 : goo.gl/80VGcn
- 네번째 : goo.gl/lblUsR
Slides based on "Introduction to Machine Learning with Python" by Andreas Muller and Sarah Guido for Hongdae Machine Learning Study(https://www.meetup.com/Hongdae-Machine-Learning-Study/) (epoch #2)
홍대 머신 러닝 스터디(https://www.meetup.com/Hongdae-Machine-Learning-Study/) (epoch #2)의 "파이썬 라이브러리를 활용한 머신러닝"(옮긴이 박해선) 슬라이드 자료.
Slides based on "Introduction to Machine Learning with Python" by Andreas Muller and Sarah Guido for Hongdae Machine Learning Study(https://www.meetup.com/Hongdae-Machine-Learning-Study/) (epoch #2)
홍대 머신 러닝 스터디(https://www.meetup.com/Hongdae-Machine-Learning-Study/) (epoch #2)의 "파이썬 라이브러리를 활용한 머신러닝"(옮긴이 박해선) 슬라이드 자료.
"R을 이용한 데이터 처리 & 분석 실무 - 서민구 지음" 정리 자료 #1
- https://thebook.io/006723/
- 첫번째 : goo.gl/FJjOlq
- 두번째 : goo.gl/Wdb90g
- 세번째 : goo.gl/80VGcn
- 네번째 : goo.gl/lblUsR
Real time convolutional neural networks for emotion and gender classification
1. Real-time Convolutional Neural Networks for
Emotion and Gender Classification
Octavio Arriaga, Matias Valdenegro-Toro, Paul Plöger
(Submitted on 20 Oct 2017)
2. Introduction
본 논문에서는 실시간 CNN을 설계하기위한 CNN (General Convolutional Neural Network) 구
축 프레임 워크 구현을 제안한다. 우리는 우리의 제안 된 CNN 아키텍처를 사용하여 하나의
혼합 단계에서 얼굴 탐지, 성별 분류 및 감정 분류 작업을 동시에 수행하는 실시간 비전 시스
템을 작성함으로써 모델을 검증합니다. 교육 절차 설정의 세부 사항을 제시 한 후 표준 벤치
마크 세트를 평가합니다. 우리는 IMDB 성별 데이터 세트에서 96 %, FER-2013 감정 데이터
세트에서 66 %의 정확성을보고합니다. 이와 함께 우리는 또한 실시간으로 가능하도록 유도
된 역 전파 시각화 기술을 소개했습니다. 유도 된 역 전파는 체중 변화의 역 동성을 밝혀 내고
학습 된 특징을 평가합니다. 우리는 느린 퍼포먼스와 실시간 아키텍처 사이의 갭을 줄이기 위
해 최신 CNN 아키텍처의 신중한 구현, 현재의 정규화 방법의 사용 및 이전에 숨겨진 기능의
시각화가 필요하다고 주장합니다. 우리 시스템은 RoboCup @ Home 대회 기간 동안 사용 된
Care-O-bot 3 로봇에 배치하여 검증되었습니다. 모든 코드, 데모 및 사전 교육 된 아키텍처는
공개 저장소의 오픈 소스 라이선스에 따라 배포되었습니다.
3. Introduction
얼굴 감정 인식 시스템은 얼굴을 검출 및 감정 검출 2단계 프로세스로 구성된다.
1. Haar 피쳐 기반 캐스케이드 분류기 : 이미지에서 정면을 감지합니다. 다른 얼
굴 검출기와 비교하여 실시간이며 빠릅니다. 이 블로그 게시물은 Open CV의
구현을 사용합니다.
2. Xception CNN 모델 ( Mini_Xception, 2017 ) : 제한된 얼굴 (48 * 48 픽셀)을 입
력으로 사용하여 출력 레이어에서 7 가지 감정의 가능성을 예측하는 분류
CNN 모델 아키텍처를 교육합니다.
4. Dataset
Kaggle Challenge에서 FER (표정 인식) 데이터 세트를 다운. 데이터는 48 × 48 픽
셀 그레이 스케일의 얼굴 이미지로 구성. 얼굴이 어느 정도 가운데에오고 각 이미지
에서 거의 동일한 공간을 차지. 얼굴 표정에 나타난 감정을 기준으로 각 얼굴을 7 가
지 범주 (0 = 화난, 1 = 혐오감, 2 = 공포, 3 = 행복, 4 = 슬픈, 5 = 깜짝, 6 = 중립 중
하나)로 분류. ).
훈련 세트는 35,888 개의 예들로 구성. train.csv에는 "감정"과 "픽셀"이라는 두 개의
열이 있습니다. "감정"열에는 이미지에있는 감정에 대해 0에서 6까지의 숫자 코드.
"픽셀" 열에는 각 이미지의 문자열.
5. Data Load
1. def load_fer2013: csv 파일을 읽어서 48 * 48 크기의 이미지에서 각 행의 픽셀 시
퀀스를 변환(Reshape). 얼굴과 감정 레이블을 반환합니다.
2. def preprocess_input이미지를 -1에서 1 사이의 크기로 조정하여 이미지를 사전
처리하는 표준 방법입니다. 이미지의 크기를 [0,1]로 255로 나눕니다. 또한 0.5를 빼
고 2를 곱하면 범위가 [-1,1]. [-1,1]은 컴퓨터 비전 문제에서 신경 네트워크 모델에
대한 더 나은 범위로 발견되었습니다.
6. def load_fer2013():
data = pd.read_csv(dataset_path)
pixels = data['pixels'].tolist()
width, height = 48, 48
faces = []
for pixel_sequence in pixels:
face = [int(pixel) for pixel in pixel_sequence.split(' ')]
face = np.asarray(face).reshape(width, height)
face = cv2.resize(face.astype('uint8'),image_size)
faces.append(face.astype('float32'))
faces = np.asarray(faces)
faces = np.expand_dims(faces, -1)
emotions = pd.get_dummies(data['emotion']).as_matrix()
return faces, emotions
def preprocess_input(x, v2=True):
x = x.astype('float32')
x = x / 255.0
if v2:
x = x - 0.5
x = x * 2.0
return x
faces, emotions = load_fer2013()
faces = preprocess_input(faces)
8. 훈련 CNN 모델 : Mini Xception
비교적 작고 좋은 성능을 구현하는 모델이다.
One can notice that the center block is repeated
4 times in the design
Data Augmentation
Regularizer
BatchNormalization
Global Average Pooling
Depthwise Separable Convolution
9. Model
# base
img_input = Input(input_shape)
x = Conv2D(8, (3, 3), strides=(1, 1), kernel_regularizer=regularization, use_bias=False)(img_input)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(8, (3, 3), strides=(1, 1), kernel_regularizer=regularization, use_bias=False)(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
10. Model 1,2,3,4 repeat
# module
residual = Conv2D(16, (1, 1), strides=(2, 2), padding='same', use_bias=False)(x)
residual = BatchNormalization()(residual)
x = SeparableConv2D(16, (3, 3), padding='same', kernel_regularizer=regularization, use_bias=False)(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = SeparableConv2D(16, (3, 3), padding='same', kernel_regularizer=regularization, use_bias=False)(x)
x = BatchNormalization()(x)
x = MaxPooling2D((3, 3), strides=(2, 2), padding='same')(x)
x = layers.add([x, residual])
11. Model
x = Conv2D(num_classes, (3, 3), padding='same')(x)
x = GlobalAveragePooling2D()(x)
output = Activation('softmax',name='predictions')(x)
model = Model(img_input, output)
model.compile(optimizer='adam',
loss='categorical_crossentropy',metrics=['accuracy'])
model.summary()
12. Result
# parameters for loading data and images
detection_model_path = 'haarcascade_files/haarcascade_frontalface_default.xml'
emotion_model_path = 'models/_mini_XCEPTION.106-0.65.hdf5'
img_path = sys.argv[1]
# hyper-parameters for bounding boxes shape
# loading models
face_detection = cv2.CascadeClassifier(detection_model_path)
emotion_classifier = load_model(emotion_model_path, compile=False)
EMOTIONS = ["angry","disgust","scared", "happy", "sad", "surprised","neutral"]
16. Result
훈련 된 모델에 대한 테스트를 수행하는 동안 표현이 충분히 구별되지 않는 경우 모
델이 얼굴의 감정을 중립으로 감지합니다. 이 모델은 훈련 된 mini_xception CNN
모델의 출력 계층에서 각 감정 클래스의 확률을 제공. 해당 논문에서는 추가 적으로
자신들의 데이터 셋이 서양 인 위주며 안경이 감정 및 성별에 영향을 줄 수 있다고
논평 하고 있다.
https://videos.files.wordpress.com/nDlFI02B/emotion-detection-demo_dvd.mp4