Skip to content

Commit

Permalink
Fixes multiple typos in the tasks internal files.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 568585517
  • Loading branch information
MediaPipe Team authored and copybara-github committed Sep 26, 2023
1 parent e5e75ea commit 199b422
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions mediapipe/tasks/ios/common/utils/sources/MPPCommonUtils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ + (void *)mallocWithSize:(size_t)memSize error:(NSError **)error {
return NULL;
}

void *allocedMemory = malloc(memSize);
if (!allocedMemory) {
void *allocatedMemory = malloc(memSize);
if (!allocatedMemory) {
exit(-1);
}

return allocedMemory;
return allocatedMemory;
}

+ (BOOL)checkCppError:(const absl::Status &)status toError:(NSError *_Nullable *)error {
Expand Down
2 changes: 1 addition & 1 deletion mediapipe/tasks/ios/test/vision/core/MPPImageTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ - (void)assertInitFailsWithImage:(nullable MPPImage *)mppImage
AssertEqualErrors(error, expectedError);
}

- (void)testInitWithImageSuceeds {
- (void)testInitWithImageSucceeds {
MPPImage *mppImage = [[MPPImage alloc] initWithUIImage:self.image error:nil];
[self assertMPPImage:mppImage
hasSourceType:MPPImageSourceTypeImage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ public List<String> getLabels() {
@AutoValue
public abstract static class SegmentationOptions {

/** Builder fo {@link SegmentationOptions} */
/** Builder for {@link SegmentationOptions} */
@AutoValue.Builder
public abstract static class Builder {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public void recognize_successWithAllowAllGestureExceptFist() throws Exception {
}

@Test
public void recognize_successWithPreferAlowListThanDenyList() throws Exception {
public void recognize_successWithPreferAllowListThanDenyList() throws Exception {
GestureRecognizerOptions options =
GestureRecognizerOptions.builder()
.setBaseOptions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class AudioClassifier extends AudioTaskRunner<AudioClassifierResult[]> {
* @param sampleRate The sample rate in Hz of the provided audio data. If not
* set, defaults to the sample rate set via `setDefaultSampleRate()` or
* `48000` if no custom default was set.
* @return The classification result of the audio datas
* @return The classification result of the audio data
*/
classify(audioData: Float32Array, sampleRate?: number):
AudioClassifierResult[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ export class GestureRecognizer extends VisionTaskRunner {
* Converts raw data into a landmark, and adds it to our worldLandmarks
* list.
*/
private adddJsWorldLandmarks(data: Uint8Array[]): void {
private addJsWorldLandmarks(data: Uint8Array[]): void {
for (const binaryProto of data) {
const handWorldLandmarksProto =
LandmarkList.deserializeBinary(binaryProto);
Expand Down Expand Up @@ -396,7 +396,7 @@ export class GestureRecognizer extends VisionTaskRunner {

this.graphRunner.attachProtoVectorListener(
WORLD_LANDMARKS_STREAM, (binaryProto, timestamp) => {
this.adddJsWorldLandmarks(binaryProto);
this.addJsWorldLandmarks(binaryProto);
this.setLatestOutputTimestamp(timestamp);
});
this.graphRunner.attachEmptyPacketListener(
Expand Down
4 changes: 2 additions & 2 deletions mediapipe/tasks/web/vision/hand_landmarker/hand_landmarker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export class HandLandmarker extends VisionTaskRunner {
* Converts raw data into a world landmark, and adds it to our worldLandmarks
* list.
*/
private adddJsWorldLandmarks(data: Uint8Array[]): void {
private addJsWorldLandmarks(data: Uint8Array[]): void {
for (const binaryProto of data) {
const handWorldLandmarksProto =
LandmarkList.deserializeBinary(binaryProto);
Expand Down Expand Up @@ -322,7 +322,7 @@ export class HandLandmarker extends VisionTaskRunner {

this.graphRunner.attachProtoVectorListener(
WORLD_LANDMARKS_STREAM, (binaryProto, timestamp) => {
this.adddJsWorldLandmarks(binaryProto);
this.addJsWorldLandmarks(binaryProto);
this.setLatestOutputTimestamp(timestamp);
});
this.graphRunner.attachEmptyPacketListener(
Expand Down
4 changes: 2 additions & 2 deletions mediapipe/tasks/web/vision/pose_landmarker/pose_landmarker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ export class PoseLandmarker extends VisionTaskRunner {
* Converts raw data into a world landmark, and adds it to our
* worldLandmarks list.
*/
private adddJsWorldLandmarks(data: Uint8Array[]): void {
private addJsWorldLandmarks(data: Uint8Array[]): void {
this.worldLandmarks = [];
for (const binaryProto of data) {
const poseWorldLandmarksProto =
Expand Down Expand Up @@ -452,7 +452,7 @@ export class PoseLandmarker extends VisionTaskRunner {

this.graphRunner.attachProtoVectorListener(
WORLD_LANDMARKS_STREAM, (binaryProto, timestamp) => {
this.adddJsWorldLandmarks(binaryProto);
this.addJsWorldLandmarks(binaryProto);
this.setLatestOutputTimestamp(timestamp);
});
this.graphRunner.attachEmptyPacketListener(
Expand Down

0 comments on commit 199b422

Please sign in to comment.