How can i give a trained model some images as an input ?

Illustration
Lukas Sohlbach - 2022-09-20T13:58:25+00:00
Question: How can i give a trained model some images as an input ?

I trained a model with classification learner to classify fruits. Now i want to test my model. How can i give the model some images as an input ?  

Expert Answer

Profile picture of Kshitij Singh Kshitij Singh answered . 2025-11-20

Hello,
in order to use the trained model to predict new data, you will first have to export the trained model to the workspace. You can click on the "Export Model" drop-down in the Classification Learner App, and select the first option. Once you have the trained model in the MATLAB workspace, you can call its "predict" method and supply new image data to make predictions.
 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!