How to apply a trained CNN model on a test image set for prediction of its classes and obtaining test accuracy
조회 수: 11 (최근 30일)
이전 댓글 표시
I have trained a CNN model using a set of 8000 data having 5 classes. I have split the dataset as 80% for training and 20% for validation. After training I have saved the trained model using 'save(filename)' function. Now in a another script I want to load this trained model and use it on a different set of 1000 test image data. I have stored the test dataset of 5 classes in a folder. Now how can I apply the trained CNN model on this test image dataset and obtain the confusion plot and accuracy on test dataset? Someone please help with a sample code for this. I will be thankful to you.
댓글 수: 0
답변 (1개)
Muhammad
2023년 7월 19일
You can simply load the model and then apply prediction.
[predictions, ~] = classify(model, imdsTest);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Pattern Recognition and Classification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!