외부활동/매카톤(인공지능 동아리) - 1기

[2022 매카톤] Video Abnormal Detection Tutorial

dohyeon2 2022. 7. 5. 18:33

1. 데이터셋 수집(동영상 촬영)

AI Hub의 이상행동 탐지 데이터셋 활용예정

https://aihub.or.kr/aidata/139

 

이상행동 CCTV 영상

12가지의 이상행동(폭행, 싸움, 절도, 기물파손, 실신, 배회, 침입, 투기, 강도, 데이트 폭력 및 추행, 납치, 주취행동), 총 700시간(8400컷) 비디오 데이터셋 촬영 및 구축한 영상 데이터 제공

aihub.or.kr

 

2. video file 프레임 분할

https://n2infotech.co.kr/193

위 블로그에 나와있는대로 VLC Media Player 프로그램을 이용하여 프레임을 분할한다.

 

3. 데이터 라벨링

https://github.com/tzutalin/labelImg

 

GitHub - tzutalin/labelImg: 🖍️ LabelImg is a graphical image annotation tool and label object bounding boxes in images

🖍️ LabelImg is a graphical image annotation tool and label object bounding boxes in images - GitHub - tzutalin/labelImg: 🖍️ LabelImg is a graphical image annotation tool and label object bounding b...

github.com

anaconda에 새로운 가상환경을 만든 뒤, 가상환경을 활성화하고 

pip install labelimg
labelimg

위 명령어를 순서대로 입력하여 labelimg를 실행한다. 

그 뒤 저장형식을 yolo로 지정한 뒤 목표한 지점을 bounding box를 그려 annotation data를 저장한다. 

 

4. yolov5 custom dataset 학습 

https://dohyeon.tistory.com/38?category=1006878 

 

[Detection] Yolov5 custom dataset 학습 및 추론방법

2022년 5월 24일 기준 작성된 글입니다. 수정사항이 있으면 댓글로 말씀 부탁드립니다. 실행환경 os: window10 python: 3.8 pytorch: 1.10.0 cuda: 11.3 cudnn: 8.2.1 for cuda 11.x 1. 가상환경 생성 #가상환경..

dohyeon.tistory.com

위 블로그에 나온 글을 토대로 앞서 라벨링된 face dataset을 가지고 yolov5 네트워크를 학습시킨다.

결과적으로 weight file 하나를 얻을 수 있다.

 

5. SlowFast 모델 training

https://deep-eye.tistory.com/59

 

[Pytorch] SlowFast Network 구현하기 (FAIR 소스 코드)

Concept 이번 포스트는 CVPR2019 AVA Challenge 행동 인식 분야에서 혁신적이고 뛰어난 성능으로 1등을 차지한 SlowFast Network의 오픈소스 코드 구현입니다. 비즈니스에서 페이스북이 최고다를 논하지는 않

deep-eye.tistory.com

 

6. 끝

 

참고
https://github.com/kookmin-sw/capstone-2021-23/blob/master/docs/23%EC%A1%B0_%EC%B5%9C%EC%A2%85%EB%B0%9C%ED%91%9C%EC%9E%90%EB%A3%8C.pdf

 

GitHub - kookmin-sw/capstone-2021-23: 범죄, 멈춰! 폭행 상황을 감지하는 지능형 cctv 시스템

범죄, 멈춰! 폭행 상황을 감지하는 지능형 cctv 시스템. Contribute to kookmin-sw/capstone-2021-23 development by creating an account on GitHub.

github.com

https://deep-eye.tistory.com/59 

 

[Pytorch] SlowFast Network 구현하기 (FAIR 소스 코드)

Concept 이번 포스트는 CVPR2019 AVA Challenge 행동 인식 분야에서 혁신적이고 뛰어난 성능으로 1등을 차지한 SlowFast Network의 오픈소스 코드 구현입니다. 비즈니스에서 페이스북이 최고다를 논하지는 않

deep-eye.tistory.com