diff --git a/mediapipe/tasks/ios/common/utils/sources/MPPCommonUtils.mm b/mediapipe/tasks/ios/common/utils/sources/MPPCommonUtils.mm index 9a2aab6ae..5510cbb3f 100644 --- a/mediapipe/tasks/ios/common/utils/sources/MPPCommonUtils.mm +++ b/mediapipe/tasks/ios/common/utils/sources/MPPCommonUtils.mm @@ -59,12 +59,12 @@ using absl::StatusCode; 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 { diff --git a/mediapipe/tasks/ios/test/vision/core/MPPImageTests.m b/mediapipe/tasks/ios/test/vision/core/MPPImageTests.m index a7fa97bfa..d9a84a29e 100644 --- a/mediapipe/tasks/ios/test/vision/core/MPPImageTests.m +++ b/mediapipe/tasks/ios/test/vision/core/MPPImageTests.m @@ -82,7 +82,7 @@ static NSString *const kExpectedErrorDomain = @"com.google.mediapipe.tasks"; AssertEqualErrors(error, expectedError); } -- (void)testInitWithImageSuceeds { +- (void)testInitWithImageSucceeds { MPPImage *mppImage = [[MPPImage alloc] initWithUIImage:self.image error:nil]; [self assertMPPImage:mppImage hasSourceType:MPPImageSourceTypeImage diff --git a/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/imagesegmenter/ImageSegmenter.java b/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/imagesegmenter/ImageSegmenter.java index 5837e6d06..813dba93c 100644 --- a/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/imagesegmenter/ImageSegmenter.java +++ b/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/imagesegmenter/ImageSegmenter.java @@ -739,7 +739,7 @@ public final class ImageSegmenter extends BaseVisionTaskApi { @AutoValue public abstract static class SegmentationOptions { - /** Builder fo {@link SegmentationOptions} */ + /** Builder for {@link SegmentationOptions} */ @AutoValue.Builder public abstract static class Builder { diff --git a/mediapipe/tasks/javatests/com/google/mediapipe/tasks/vision/gesturerecognizer/GestureRecognizerTest.java b/mediapipe/tasks/javatests/com/google/mediapipe/tasks/vision/gesturerecognizer/GestureRecognizerTest.java index 68d800fe9..3858c2387 100644 --- a/mediapipe/tasks/javatests/com/google/mediapipe/tasks/vision/gesturerecognizer/GestureRecognizerTest.java +++ b/mediapipe/tasks/javatests/com/google/mediapipe/tasks/vision/gesturerecognizer/GestureRecognizerTest.java @@ -289,7 +289,7 @@ public class GestureRecognizerTest { } @Test - public void recognize_successWithPreferAlowListThanDenyList() throws Exception { + public void recognize_successWithPreferAllowListThanDenyList() throws Exception { GestureRecognizerOptions options = GestureRecognizerOptions.builder() .setBaseOptions( diff --git a/mediapipe/tasks/web/audio/audio_classifier/audio_classifier.ts b/mediapipe/tasks/web/audio/audio_classifier/audio_classifier.ts index 35b502f82..2cc0ebe51 100644 --- a/mediapipe/tasks/web/audio/audio_classifier/audio_classifier.ts +++ b/mediapipe/tasks/web/audio/audio_classifier/audio_classifier.ts @@ -140,7 +140,7 @@ export class AudioClassifier extends AudioTaskRunner { * @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[] { diff --git a/mediapipe/tasks/web/vision/gesture_recognizer/gesture_recognizer.ts b/mediapipe/tasks/web/vision/gesture_recognizer/gesture_recognizer.ts index 295d64f28..1a6a43f2d 100644 --- a/mediapipe/tasks/web/vision/gesture_recognizer/gesture_recognizer.ts +++ b/mediapipe/tasks/web/vision/gesture_recognizer/gesture_recognizer.ts @@ -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); @@ -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( diff --git a/mediapipe/tasks/web/vision/hand_landmarker/hand_landmarker.ts b/mediapipe/tasks/web/vision/hand_landmarker/hand_landmarker.ts index 6b65362a7..efb3fc6e1 100644 --- a/mediapipe/tasks/web/vision/hand_landmarker/hand_landmarker.ts +++ b/mediapipe/tasks/web/vision/hand_landmarker/hand_landmarker.ts @@ -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); @@ -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( diff --git a/mediapipe/tasks/web/vision/pose_landmarker/pose_landmarker.ts b/mediapipe/tasks/web/vision/pose_landmarker/pose_landmarker.ts index 5df91a3d4..8f6531827 100644 --- a/mediapipe/tasks/web/vision/pose_landmarker/pose_landmarker.ts +++ b/mediapipe/tasks/web/vision/pose_landmarker/pose_landmarker.ts @@ -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 = @@ -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(