In ImageSegmentation.cpp we do:
cv::Size inputSize = input.size();
cv::resize(input, input, modelImageSize);
std::vector<float> inputVector = imageprocessing::colorMatToVector(input);
return {
executorch::extension::make_tensor_ptr(getInputShape()[0], inputVector),
inputSize};
but in other models we do:
return {imageprocessing::getTensorFromMatrix(getInputShape()[0], image),
originalSize};
From my understanding those are equivalent and using util function is great, so let's keep our implementations consistent. Btw it looks like it could be one util function and not a method - we duplicate a lot of code this way, which causes problems in cases like this
In
ImageSegmentation.cppwe do:but in other models we do:
From my understanding those are equivalent and using util function is great, so let's keep our implementations consistent. Btw it looks like it could be one util function and not a method - we duplicate a lot of code this way, which causes problems in cases like this