Notice
Recent Posts
Link
- Today
- Total
hye-log
[Python]TypeError: image must be numpy array type(Resnet) 본문
⚠️ 에러 상황
✅ 해결 방법
image를 불러올 때 np.array로 불러오기
np.array(Image.open(image_path))
resnet 모델을 사용하여 transform을 적용한 경우 아래와 같이 reutrn
if self.transform:
image = self.transform(image=image)
return image['image']
728x90
'Error > Python' 카테고리의 다른 글
Comments