how do i change the size of the image
조회 수: 12 (최근 30일)
이전 댓글 표시
Hi.
i want to train my data set(X-ray images) using googlenet..when i m tring to do m getting this error.Could you please help me..
Error using trainNetwork (line 184)
The training images are of size 224×224×1 but the input layer expects images of size 224×224×3.
Error in training (line 44)
net = trainNetwork(Resized_Training_Dataset, New_Network, Training_Options);
댓글 수: 5
답변 (2개)
Image Analyst
2021년 10월 8일
You're passing in a gray scale image when it wants a color image. When you resized them you also needed to convert them to color, like
rgbImage = cat(3, grayImage, grayImage, grayImage);
댓글 수: 3
Murad Alr
2022년 4월 22일
Resized_Training_Image=augmentedImageDatastore(Input_Layer_Size,Training_Dataset,'ColorPreprocessing','gray2rgb');
Resized_Validation_Image=augmentedImageDatastore(Input_Layer_Size,Validation_Dataset,'ColorPreprocessing','gray2rgb');
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!