본문 바로가기
카테고리 없음

intern video를 통한 feature 추출

by rnjsgmldnjs 2024. 10. 19.

(1) 코드 

git clone https://github.com/OpenGVLab/InternVideo.git

cd InternVideo/InternVideo2/single_modality

 

(2) 가상환경 설정

python= 3.8로 일단 진행

pip install -r requirements.txt

 실행 불가..

 

python == 3.10 conda 으로 다시 가상환경 생성

 

requirements.txt torch, torchvision은 삭제

 

skimage==0.0는 scikit-image로 수정

 

auto_augment==1.0.0은 augment-auto로 설정.

 

torch 설치

- 미리 설치해 두지 않으면 flash- atten이 설치가 안됨

pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116

 

Cython 설치

- 미리 설치해 두어야 오류 안남

pip install Cython

 

다시

pip install -r requirements.txt

 

(3) Feature 추출

Feature를 추출하기 위해 초기부터 학습을 진행해야 하지만 매우 오랜시간이 걸림 

 

제공된 사전학습 모델을 사용하자

 

https://huggingface.co/OpenGVLab/InternVideo2-Stage1-1B-224p-K400/tree/main

 

OpenGVLab/InternVideo2-Stage1-1B-224p-K400 at main

This repository is publicly accessible, but you have to accept the conditions to access its files and content. You agree to not use the model to conduct experiments that cause harm to human subjects. Log in or Sign Up to review the conditions and access th

huggingface.co

 

위 사이트의 사전학습 모델 다운

 

정보는 다음과 같다

K400으로 사전학습, input_frame × crop × clip = 16 x 3 x 4

 

 

 

320x100