···11An realtime pose detection library for [Android](https://www.android.com/) and [Compose Multiplatform](https://www.jetbrains.com/lp/compose-multiplatform/).
22Android version uses CameraX and GoogleML Kit, while iOS version uses AVFoundation with VisionKit and CoreML.
33+We also support analysing pre-recorded video files.
44+We now also support adding custom object detection models to the library, allowing you to detect custom objects in your camera feed or video files along side body poses.
3546## Quick Start
57···4042Create a Skeleton Repisitory
4143```kotlin
4244val skeletonRepository = remember { SkeletonRepository() }
4545+val customObjectRepository = remember { CustomObjectRespository() }
4346```
44474548Initialise the camera feed
4649```kotlin
4747-if (permissionGranted) CameraView(skeletonRepository = skeletonRepository)
5050+if (permissionGranted) {
5151+ CameraView(
5252+ skeletonRepository = skeletonRepository,
5353+ customObjectRepository = customObjectRespository,
5454+ )
5555+} else {
5656+ Text("Camera permission not granted")
5757+}
4858```
49595060Create a Pose to detect
···8797}
8898```
8999100100+Add a custom object detection model
101101+Initialse the custom models for ios and android respectively.
102102+For android you need to add a .tflite model file to your assets folder, then set androidModelPath to the name of the model file, including the .tflite extension.
103103+For iOS you need to add a .mlmodel model file to your Xcode project, then set iosModelPath to the name of the model file without the .mlmodel extension.
104104+```kotlin
105105+CustomObjectModel.init(
106106+ androidModelPath = "4.tflite",
107107+ iosModelPath = "YOLOv3FP16"
108108+ )
109109+```
110110+Once this is done, you can use the `CustomObjectRepository` to receive detected objects in the camera feed or video frames.
111111+112112+90113Check out the sample app for full example of how to use the library.
9111492115## License
···102125 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
103126 See the License for the specific language governing permissions and
104127 limitations under the License.
105105-106106-
···1212 val timestamp: Long
1313}
14141515-expect class FrameAnalyser(){
1515+expect class FrameAnalyser() {
1616 suspend fun analyseFrame(inputFrame: InputFrame): AnalysisResult
1717}
1818