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

L
Lukas Sohlbach · Sep 20, 2022 · 2.2K views
Question
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 PhD Expert
Answered Nov 20, 2025
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.
 
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!