Internal change

PiperOrigin-RevId: 486805777
This commit is contained in:
MediaPipe Team 2022-11-07 17:21:51 -08:00 committed by Copybara-Service
parent c3bb4bb5da
commit 716c7e3b8a
7 changed files with 5 additions and 5 deletions

View File

@ -1324,6 +1324,7 @@ cc_test(
name = "image_to_tensor_utils_test",
srcs = ["image_to_tensor_utils_test.cc"],
deps = [
":image_to_tensor_calculator_cc_proto",
":image_to_tensor_utils",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/framework/port:gtest_main",

View File

@ -330,9 +330,8 @@ class GlProcessor : public ImageToTensorConverter {
absl::Status ValidateTensorShape(const Tensor::Shape& output_shape) {
RET_CHECK_EQ(output_shape.dims.size(), 4)
<< "Wrong output dims size: " << output_shape.dims.size();
RET_CHECK_EQ(output_shape.dims[0], 1)
<< "Handling batch dimension not equal to 1 is not implemented in this "
"converter.";
RET_CHECK_GE(output_shape.dims[0], 1)
<< "The batch dimension needs to be greater or equal to 1.";
RET_CHECK_EQ(output_shape.dims[3], 3)
<< "Wrong output channel: " << output_shape.dims[3];
return absl::OkStatus();

View File

@ -172,7 +172,7 @@ constexpr char kValidIntProto[] = R"(
output_tensor_height: 200
)";
TEST(ValidateOptionOutputDims, ValidProtos) {
TEST(ValidateOptionOutputDims, ImageToTensorCalcOptions) {
const auto float_options =
mediapipe::ParseTextProtoOrDie<mediapipe::ImageToTensorCalculatorOptions>(
kValidFloatProto);
@ -202,7 +202,7 @@ TEST(ValidateOptionOutputDims, EmptyProto) {
HasSubstr("Valid output tensor width is required")));
}
TEST(GetOutputTensorParams, SetValues) {
TEST(GetOutputTensorParams, ImageToTensorCalcOptionsSetValues) {
// Test int range with ImageToTensorCalculatorOptions.
const auto int_options =
mediapipe::ParseTextProtoOrDie<mediapipe::ImageToTensorCalculatorOptions>(

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB