반응형
이전의 데이터셋 포스팅을 보시면 더 이해가 잘될거같습니다.
https://dohun-0714.tistory.com/27
자세한코드는 깃허브를 참고하면됩니다.
Normalize: 픽셀 값에 대해 (X - mean)/std를 진행하며, 이때 통계 값은 ImageNet 데이터 셋의 RGB 통계값을 이용할 것이다.
텐서화: 파이토치는 tensor자료 형을 이용하므로 totensor를 해준다.
augmentation: trainset에만 적용한다.
trainset에는 train_transformers를 적용해 데이터를 augmentation을 해주고
testset에는 test_trainformers를 적용해 Normalize한뒤에 텐서로 바꾸어주었다.
albumentation라이브러리와 함수들이 궁금하다면 밑에링크에 들어가보면 된다.
https://dohun-0714.tistory.com/29
이어서 augmentation이 적용된사진을 다시 원래이미지로 되돌려보겠다.
728x90
'computer vision > dna_study' 카테고리의 다른 글
pytorch) Augmentation이 적용된 이미지를 시각화하기 (0) | 2023.03.17 |
---|---|
python albumentation 라이브러리 설명 (0) | 2023.03.17 |
pytorch 데이터셋 클래스 (0) | 2023.03.17 |
python 이미지생성 (0) | 2023.03.16 |
이미지 디렉토리 관리 (0) | 2023.03.16 |
댓글