I have trained a model in python tensorflow 2.5.0.
I have to load this model and make classification using opencv and c++.
How can I do it? any suggestions?
I have trained a model in python tensorflow 2.5.0.
I have to load this model and make classification using opencv and c++.
How can I do it? any suggestions?
what did you do, exactly ? please show !
try a simple:
cv::dnn::readNet("mymodel.pb")
then worry about data processing
(still, you need to find out about: image size, mean/std values, etc)
please also look at our samples
Thanks for your reply.
Regarding your question:
I have done transfer learning on MobileNetV2 pre-trained model.
I have followed the exact steps as mentioned here and saved the model: https://www.tensorflow.org/tutorials/images/transfer_learning
I have saved the model using: model.save(‘path’)
Also, I am preparing the input image in python to classify as below:
image = np.expand_dims(t_image, axis=0)
image= img.astype('float32')
image /= 255.0
imgReshaped = image.reshape(-1, img_height, img_width, color_channel)
The Model has 100x100 RGB image input.