This CL fixes the multiple typos in the new task api solution
PiperOrigin-RevId: 519634122
This commit is contained in:
parent
55b9bd9d5e
commit
5ccf986513
|
@ -107,7 +107,7 @@ absl::Status ConfigureImageToTensorCalculator(
|
||||||
options->mutable_output_tensor_float_range()->set_max((255.0f - mean) /
|
options->mutable_output_tensor_float_range()->set_max((255.0f - mean) /
|
||||||
std);
|
std);
|
||||||
}
|
}
|
||||||
// TODO: need to support different GPU origin on differnt
|
// TODO: need to support different GPU origin on different
|
||||||
// platforms or applications.
|
// platforms or applications.
|
||||||
options->set_gpu_origin(mediapipe::GpuOrigin::TOP_LEFT);
|
options->set_gpu_origin(mediapipe::GpuOrigin::TOP_LEFT);
|
||||||
return absl::OkStatus();
|
return absl::OkStatus();
|
||||||
|
|
|
@ -68,8 +68,8 @@ TEST(DisallowGate, VerifyConfig) {
|
||||||
input_stream: "VALUE_3:__stream_3"
|
input_stream: "VALUE_3:__stream_3"
|
||||||
)pb")));
|
)pb")));
|
||||||
|
|
||||||
CalculatorGraph calcualtor_graph;
|
CalculatorGraph calculator_graph;
|
||||||
MP_EXPECT_OK(calcualtor_graph.Initialize(graph.GetConfig()));
|
MP_EXPECT_OK(calculator_graph.Initialize(graph.GetConfig()));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(DisallowIf, VerifyConfig) {
|
TEST(DisallowIf, VerifyConfig) {
|
||||||
|
@ -99,8 +99,8 @@ TEST(DisallowIf, VerifyConfig) {
|
||||||
input_stream: "VALUE:__stream_1"
|
input_stream: "VALUE:__stream_1"
|
||||||
)pb")));
|
)pb")));
|
||||||
|
|
||||||
CalculatorGraph calcualtor_graph;
|
CalculatorGraph calculator_graph;
|
||||||
MP_EXPECT_OK(calcualtor_graph.Initialize(graph.GetConfig()));
|
MP_EXPECT_OK(calculator_graph.Initialize(graph.GetConfig()));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(DisallowIf, VerifyConfigWithSideCondition) {
|
TEST(DisallowIf, VerifyConfigWithSideCondition) {
|
||||||
|
@ -130,8 +130,8 @@ TEST(DisallowIf, VerifyConfigWithSideCondition) {
|
||||||
input_side_packet: "CONDITION:__side_packet_1"
|
input_side_packet: "CONDITION:__side_packet_1"
|
||||||
)pb")));
|
)pb")));
|
||||||
|
|
||||||
CalculatorGraph calcualtor_graph;
|
CalculatorGraph calculator_graph;
|
||||||
MP_EXPECT_OK(calcualtor_graph.Initialize(graph.GetConfig()));
|
MP_EXPECT_OK(calculator_graph.Initialize(graph.GetConfig()));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(AllowGate, VerifyConfig) {
|
TEST(AllowGate, VerifyConfig) {
|
||||||
|
@ -166,8 +166,8 @@ TEST(AllowGate, VerifyConfig) {
|
||||||
input_stream: "VALUE_3:__stream_3"
|
input_stream: "VALUE_3:__stream_3"
|
||||||
)pb")));
|
)pb")));
|
||||||
|
|
||||||
CalculatorGraph calcualtor_graph;
|
CalculatorGraph calculator_graph;
|
||||||
MP_EXPECT_OK(calcualtor_graph.Initialize(graph.GetConfig()));
|
MP_EXPECT_OK(calculator_graph.Initialize(graph.GetConfig()));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(AllowIf, VerifyConfig) {
|
TEST(AllowIf, VerifyConfig) {
|
||||||
|
@ -192,8 +192,8 @@ TEST(AllowIf, VerifyConfig) {
|
||||||
input_stream: "VALUE:__stream_1"
|
input_stream: "VALUE:__stream_1"
|
||||||
)pb")));
|
)pb")));
|
||||||
|
|
||||||
CalculatorGraph calcualtor_graph;
|
CalculatorGraph calculator_graph;
|
||||||
MP_EXPECT_OK(calcualtor_graph.Initialize(graph.GetConfig()));
|
MP_EXPECT_OK(calculator_graph.Initialize(graph.GetConfig()));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(AllowIf, VerifyConfigWithSideConition) {
|
TEST(AllowIf, VerifyConfigWithSideConition) {
|
||||||
|
@ -218,8 +218,8 @@ TEST(AllowIf, VerifyConfigWithSideConition) {
|
||||||
input_side_packet: "CONDITION:__side_packet_1"
|
input_side_packet: "CONDITION:__side_packet_1"
|
||||||
)pb")));
|
)pb")));
|
||||||
|
|
||||||
CalculatorGraph calcualtor_graph;
|
CalculatorGraph calculator_graph;
|
||||||
MP_EXPECT_OK(calcualtor_graph.Initialize(graph.GetConfig()));
|
MP_EXPECT_OK(calculator_graph.Initialize(graph.GetConfig()));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -91,7 +91,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
* A synchronous method to invoke the C++ task runner to process single image inputs. The call
|
* A synchronous method to invoke the C++ task runner to process single image inputs. The call
|
||||||
* blocks the current thread until a failure status or a successful result is returned.
|
* blocks the current thread until a failure status or a successful result is returned.
|
||||||
*
|
*
|
||||||
* @param packetMap A `PackeMap` containing pairs of input stream name and data packet.
|
* @param packetMap A `PacketMap` containing pairs of input stream name and data packet.
|
||||||
* @param error Pointer to the memory location where errors if any should be
|
* @param error Pointer to the memory location where errors if any should be
|
||||||
* saved. If @c NULL, no error will be saved.
|
* saved. If @c NULL, no error will be saved.
|
||||||
*
|
*
|
||||||
|
@ -105,7 +105,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
* A synchronous method to invoke the C++ task runner to process continuous video frames. The call
|
* A synchronous method to invoke the C++ task runner to process continuous video frames. The call
|
||||||
* blocks the current thread until a failure status or a successful result is returned.
|
* blocks the current thread until a failure status or a successful result is returned.
|
||||||
*
|
*
|
||||||
* @param packetMap A `PackeMap` containing pairs of input stream name and data packet.
|
* @param packetMap A `PacketMap` containing pairs of input stream name and data packet.
|
||||||
* @param error Pointer to the memory location where errors if any should be saved. If @c NULL, no
|
* @param error Pointer to the memory location where errors if any should be saved. If @c NULL, no
|
||||||
* error will be saved.
|
* error will be saved.
|
||||||
*
|
*
|
||||||
|
@ -121,7 +121,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
* available in the user-defined `packetsCallback` that was provided during initialization of the
|
* available in the user-defined `packetsCallback` that was provided during initialization of the
|
||||||
* `MPPVisionTaskRunner`.
|
* `MPPVisionTaskRunner`.
|
||||||
*
|
*
|
||||||
* @param packetMap A `PackeMap` containing pairs of input stream name and data packet.
|
* @param packetMap A `PacketMap` containing pairs of input stream name and data packet.
|
||||||
* @param error Pointer to the memory location where errors if any should be saved. If @c NULL, no
|
* @param error Pointer to the memory location where errors if any should be saved. If @c NULL, no
|
||||||
* error will be saved.
|
* error will be saved.
|
||||||
*
|
*
|
||||||
|
|
|
@ -28,13 +28,13 @@ using ::mediapipe::tasks::core::PacketMap;
|
||||||
using ::mediapipe::tasks::core::PacketsCallback;
|
using ::mediapipe::tasks::core::PacketsCallback;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
/** Rotation degress for a 90 degree rotation to the right. */
|
/** Rotation degrees for a 90 degree rotation to the right. */
|
||||||
static const NSInteger kMPPOrientationDegreesRight = -90;
|
static const NSInteger kMPPOrientationDegreesRight = -90;
|
||||||
|
|
||||||
/** Rotation degress for a 180 degree rotation. */
|
/** Rotation degrees for a 180 degree rotation. */
|
||||||
static const NSInteger kMPPOrientationDegreesDown = -180;
|
static const NSInteger kMPPOrientationDegreesDown = -180;
|
||||||
|
|
||||||
/** Rotation degress for a 90 degree rotation to the left. */
|
/** Rotation degrees for a 90 degree rotation to the left. */
|
||||||
static const NSInteger kMPPOrientationDegreesLeft = -270;
|
static const NSInteger kMPPOrientationDegreesLeft = -270;
|
||||||
|
|
||||||
@interface MPPVisionTaskRunner () {
|
@interface MPPVisionTaskRunner () {
|
||||||
|
|
|
@ -50,7 +50,7 @@ table ImageSegmenterOptions {
|
||||||
|
|
||||||
// The minimum necessary image segmenter metadata parser version to fully
|
// The minimum necessary image segmenter metadata parser version to fully
|
||||||
// understand all fields in a given metadata flatbuffer. This field is
|
// understand all fields in a given metadata flatbuffer. This field is
|
||||||
// automaticaly populated by the MetadataPopulator when the metadata is
|
// automatically populated by the MetadataPopulator when the metadata is
|
||||||
// populated into a TFLite model. This min_parser_version is specific for the
|
// populated into a TFLite model. This min_parser_version is specific for the
|
||||||
// image segmenter metadata defined in this schema file.
|
// image segmenter metadata defined in this schema file.
|
||||||
min_parser_version:string;
|
min_parser_version:string;
|
||||||
|
|
|
@ -130,7 +130,7 @@ export class FaceStylizer extends VisionTaskRunner {
|
||||||
* FaceStylizer is created with the image running mode.
|
* FaceStylizer is created with the image running mode.
|
||||||
*
|
*
|
||||||
* The input image can be of any size. To ensure that the output image has
|
* The input image can be of any size. To ensure that the output image has
|
||||||
* reasonable quailty, the stylized output image size is determined by the
|
* reasonable quality, the stylized output image size is determined by the
|
||||||
* model output size.
|
* model output size.
|
||||||
*
|
*
|
||||||
* @param image An image to process.
|
* @param image An image to process.
|
||||||
|
@ -154,7 +154,7 @@ export class FaceStylizer extends VisionTaskRunner {
|
||||||
* first, then the specified rotation is applied to the crop.
|
* first, then the specified rotation is applied to the crop.
|
||||||
*
|
*
|
||||||
* The input image can be of any size. To ensure that the output image has
|
* The input image can be of any size. To ensure that the output image has
|
||||||
* reasonable quailty, the stylized output image size is the smaller of the
|
* reasonable quality, the stylized output image size is the smaller of the
|
||||||
* model output size and the size of the 'regionOfInterest' specified in
|
* model output size and the size of the 'regionOfInterest' specified in
|
||||||
* 'imageProcessingOptions'.
|
* 'imageProcessingOptions'.
|
||||||
*
|
*
|
||||||
|
@ -221,7 +221,7 @@ export class FaceStylizer extends VisionTaskRunner {
|
||||||
* frame's timestamp (in milliseconds). The input timestamps must be
|
* frame's timestamp (in milliseconds). The input timestamps must be
|
||||||
* monotonically increasing.
|
* monotonically increasing.
|
||||||
*
|
*
|
||||||
* To ensure that the output image has reasonable quailty, the stylized
|
* To ensure that the output image has reasonable quality, the stylized
|
||||||
* output image size is the smaller of the model output size and the size of
|
* output image size is the smaller of the model output size and the size of
|
||||||
* the 'regionOfInterest' specified in 'imageProcessingOptions'.
|
* the 'regionOfInterest' specified in 'imageProcessingOptions'.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user