Skip to content

Commit 6887dd0

Browse files
committed
added readme
1 parent 362e27d commit 6887dd0

3 files changed

Lines changed: 19 additions & 26 deletions

File tree

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ title: Home
44
nav_order: 1
55
---
66

7+
# This is a fork of MediaPipe to demonstrate building MediaPipe as a Framework for iOS, in this case, the FaceMesh model
8+
- This builds an XCFramework into ./frameworkbuild/FaceMeshIOSLibFramework/xcframework
9+
- The XCFramework contains both arm64 and x86_64 (iOS Simulator) parts, so you can use this on both real devices and on the iOS simulator
10+
- I've created the Objective-C file for the framework in //mediapipe/examples/ios/facemeshioslib
11+
12+
# Usage
13+
## Building
14+
- prerequisites
15+
- You need to have Google's Bazel installed. Personally I install via node (`npm install -g bazel`).
16+
- run `./BUILD_FACE_MESH_XCFRAMEWORK.sh`, the resulting framework should then appear in ./frameworkbuild/FaceMeshIOSLibFramework/xcframework/FaceMeshIOSLibFramework.xcframework
17+
- Copy the framework and use it in your projects. You're welcome.
18+
- Framework usage : `#import <FaceMeshIOSLibFramework/FaceMeshIOSLibFramework.h>`
19+
- only one class : FaceMeshIOSLib
20+
- delegate callback gives you an array of detected faces (But there's only one face configured in my graph.. so there's at most length 1)
21+
- each face is an array of 468 `FaceMeshIOSLibFaceLandmarkPoint` points (x,y,z)
22+
23+
724
![MediaPipe](docs/images/mediapipe_small.png)
825

926
--------------------------------------------------------------------------------

mediapipe/examples/ios/facemeshioslib/FaceMeshIOSLib.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
// Copyright 2019 The MediaPipe Authors.
2-
//
3-
// Licensed under the Apache License, Version 2.0 (the "License");
4-
// you may not use this file except in compliance with the License.
5-
// You may obtain a copy of the License at
6-
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
9-
// Unless required by applicable law or agreed to in writing, software
10-
// distributed under the License is distributed on an "AS IS" BASIS,
11-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
// See the License for the specific language governing permissions and
13-
// limitations under the License.
1+
// Copyright 2021 Switt Kongdachalert
142

153
#import <CoreVideo/CoreVideo.h>
164
#import <Foundation/Foundation.h>

mediapipe/examples/ios/facemeshioslib/FaceMeshIOSLib.mm

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
// Copyright 2019 The MediaPipe Authors.
2-
//
3-
// Licensed under the Apache License, Version 2.0 (the "License");
4-
// you may not use this file except in compliance with the License.
5-
// You may obtain a copy of the License at
6-
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
9-
// Unless required by applicable law or agreed to in writing, software
10-
// distributed under the License is distributed on an "AS IS" BASIS,
11-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
// See the License for the specific language governing permissions and
13-
// limitations under the License.
1+
// Copyright 2021 Switt Kongdachalert
142

153
#import "FaceMeshIOSLib.h"
164
#import "mediapipe/objc/MPPCameraInputSource.h"

0 commit comments

Comments
 (0)