본문 바로가기
Deep learning/Computer Vision

[pytorch]transform.Compose와albumentation.Compose 차이

by min0114 2022. 7. 21.

pytorch 데이터셋 코드를 짜다보면 transform을 하게되면서 augmentaion을 사용하게되는데

transform.Compose 와 albumentation.Compose의 차이를 알아볼까 한다. 

 

import albumentation as A

import albumentation.pytorch import ToTensorV2

 

transform.Compose

transform.Resize

transform.ToTensor

위의 기능들은 albumentation에서도 존재하는데 

transform과 albumentation의 차이는 transform은 텐서를 변환 후 normalize를 하지만 

albumentation은 normalize 을 먼저하고 텐서를 변경을 해줘야 한다.

 

 

순서의 차이가 있으니 유의해야한다. 

 

반응형

'Deep learning > Computer Vision' 카테고리의 다른 글

코너검출,직렬형 분류기,ORB  (0) 2022.01.17

댓글