Mat image1 = cv::imread(“frame0.png”); // some image
Mat input1 = cv::dnn::blobFromImage(image1, 1.0, Size(input_width, input_height), Scalar(), true); // pre-processing for a model
I need to export input1 to an npy file or pb file. I know it can be done in python, but the size of the resulting file is huge, 2 mega bytes.
Sorry for getting late to this. I need it in numpy-native or protobuf-native because it’s a test data for a model, and the testing module expects the test data to be either in numpy-native or protobuf-native format.