반응형
GitHub - dohun-mat/dna_study_semina
Contribute to dohun-mat/dna_study_semina development by creating an account on GitHub.
github.com
코드는 깃허브에 자세하게있다.
파이토치 데이터셋 클래스는 init, getitem, len의 특수 메소드3개를 요구하고 이 메소드는 전부 오버라이딩되어있다.
root_path, mode(train or validation or test), transform(전처리&Augmentation) 3개의 입력을 받아 data와 label을 출력하는 클래스를 만들도록하자.
pytorch dataset 클래스
이어서 전처리와 augmentation을 적용해보겠다.
https://dohun-0714.tistory.com/28
pytorch 데이터셋 augmentation
Normalize: 픽셀 값에 대해 (X - mean)/std를 진행하며, 이때 통계 값은 ImageNet 데이터 셋의 RGB 통계값을 이용할 것이다. 텐서화: 파이토치는 tensor자료 형을 이용하므로 totensor를 해준다. augmentation: trainse
dohun-0714.tistory.com
728x90
'computer vision > dna_study' 카테고리의 다른 글
python albumentation 라이브러리 설명 (0) | 2023.03.17 |
---|---|
pytorch 데이터셋 augmentation(transformer 적용) (0) | 2023.03.17 |
python 이미지생성 (0) | 2023.03.16 |
이미지 디렉토리 관리 (0) | 2023.03.16 |
python train test vaild 폴더 생성 (0) | 2023.03.15 |
댓글