openface을 통해 영상 프레임 별 AU을 추출.
AU값을 기반으로 감정 표정이 잘 드러난 프레임을 추출하여 감정 분석의 이미지 input 값으로 넣기 위해 진행
- docker container 내에서 실행했음
- cuda 11.8 / 기본 openface를 clone 하여 cpu 사용하긴 함
- 컨테이너 내 가상환경 없이 시스템에 설치함
openface 세팅
cd /home/je/OpenFace
mkdir build
cd build
apt update && apt install -y libopenblas-dev / OpenBLAS 설치
apt update && apt install -y libopencv-dev / OpenCV 설치
apt update && apt install -y libboost-all-dev / boost 설치
apt install -y libx11-dev libjpeg-dev libpng-dev libtiff-dev libopenblas-dev / dlib 의존성 설치
dlib 빌드
cd /home/je
git clone https://github.com/davisking/dlib.git
cd dlib
mkdir build
cd build
cmake ..
cmake --build . --config Release
openface 컴파일
cd /home/je/OpenFace/build
make -j$(nproc)
openface bash 실행 코드
cd /home/je/OpenFace/build/bin
* openface의 build에는 model, bin 폴더 모두 있어야 함
* 단일 파일 실행 시
./FeatureExtraction -f /path/to/video.mp4 -aus -out_dir /home/je/output
* 폴더 내 모든 파일 실행 시
for file in /path/to/videos/*.mp4; do
./FeatureExtraction -f "$file" -aus -out_dir /path/to/out_dir
done