전체 글 107

LPIPS (Learned Perceptual Image Patch Similarity)

이해하기 쉽도록 좀 극단적인 이미지를 예시로 들어 설명을 시작하도록 하겠습니다.사람은 눈과 뇌를 통해, 서로 다른 종, 다른 옷, 다른 배경의 강아지 이미지를 보더라도 모두 다 강아지이기 때문에 비슷한 이미지라고 인식함 그렇다면 딥러닝 모델은 이 두 이미지가 비슷한 이미지라는 것을 어떻게 평가할까? 픽셀 단위로 본다던지 다른 방법이 있을수도 있겠지만, 너무 low level 에서의 비교는 blur 와 같이 큰 영향을 끼치는 차이를 별 것 아닌 것처럼 인식할 수 있음 (L2 loss 의 차이가 적을 수 있음) 이때 LPIPS 라는 metric 을 사용하면 쉽게 비교가 가능한데, 이 metric 은 주로 생성모델 (GAN, ...) 에서 생성되거나, 복원, deblur 등을 진행한 이미지가 실제 이미지와 얼..

AI/Metrics 2023.04.10

SSIM (Structural Similarity Index Map)

두 이미지의 유사도를 Luminance, Contrast, Structure 를 이용하여 비교 Luminance (휘도): 빛의 밝기 Contrast (대조): 빛의 밝기 차이 Structure (구조): SSIM 은 0~1 의 값을 가지며, 값이 높을수록 두 이미지가 유사함 $SSIM(x,y)=[l(x,y)]^\alpha \cdot [c(x,y)]^\beta\cdot[s(x,y)]^\gamma$ $l(x,y)=\frac{2\mu_x\mu_y+C_1}{\mu^2_x+\mu^2_y+C_1}$ $c(x,y)=\frac{2\sigma_x\sigma_y+C_2}{\sigma^2_x+\sigma^2_y+C_2}$ $s(x,y)=\frac{\sigma_{xy}+C_3}{\sigma_x\sigma_y+C_3}$ $C..

AI/Metrics 2023.04.10

Git push

Terminal 에서 git 처음 사용하는 경우 git config --global user.name "Github USERNAME" git config --global user.email "Github USEREMAIL" 올리고자 하는 디렉토리로 cd example git init : git 초기화, 맨 처음 프로젝트 올릴 때 git add . : 모든 파일을 올리겠다 git add example git status git commit -m “first commit” “” 안에 수정한 내용, description git remote add origin https://github.com/Ethan-Lee-Sunghoon/**example** git remote -v : 연결 내용 확인 git push o..

[Slurm] sbatch srun

sbatch: 긴 job 돌릴 때, out file 로 확인 train.sh 파일을 다음과 같이 작성 #SBATCH --job-name=job 이름 #SBATCH --nodes=1 #SBATCH --gres=gpu:1 #SBATCH -p batch #SBATCH -w agi1 #SBATCH --cpus-per-gpu=4 #SBATCH --mem-per-gpu=20G #SBATCH --time=14-0 #SBATCH -o %N_%x_%j.out #SBTACH -e %N_%x_%j.err source /data/sunghoon/init.sh conda activate 가상환경이름 python -m torch.distributed.launch \ --nproc_per_node=1 \ --use_env main..

[CVPR 2023] CODA-Prompt: COntinual Decomposed Attention-based Prompting for Rehearsal-Free Continual Learning

- Introduction 기존에 널리 사용하던 rehearsal based method 의 단점 Increase memory costs Violate data privacy Pretrained ViT 의 등장으로 rehearsal based method 를 대체할 prompting method 등장 일반적인 prompting method 는 key-query 메커니즘을 이용하는데, task sequence 에 end-to-end 로 학습되지 않는 문제점이 있음 이로 인해 plasticity 의 감소가 일어나고, new task의 학습이 원활하게 이루어지지 않으며, parameter capacity 증가로 이득을 얻지 못함 저자들은 자신들의 연구가 prior work 와 달리 end-to-end 방식으로..