Classify hand poses and actions with Create ML

RSS for tag

Discuss the WWDC21 session Classify hand poses and actions with Create ML.

View Session

Posts under wwdc21-10039 tag

7 Posts
Sort by:
Post not yet marked as solved
1 Replies
607 Views
I have watched the 'Classify hand poses and actions with Create ML' from WWDC2021 I was able to create a model using the Create ML app. But I am not sure how to use it in my iOS project. The video above misses out several steps. I have the HandPoseRequest working and can get the MLMultiArray of points. I have added the model file to my project and can create a MLModel instance from it. But the video above shows: let handPosePredition = try model.prediction(poses: keypointsMultiArray) What is the type of model ? How was it created? I cannot find any model type that has a function prediction(poses: MLMultiarray) Thanks.
Posted
by
Post not yet marked as solved
0 Replies
279 Views
I'm building a feature to automatically edit out all the downtime of a tennis video. I have a partial implementation that stores the start and end times of Vision trajectory detections and writes only those segments to an AVFoundation export session. I've encountered a major issue, which is that the trajectories returned end whenever the ball bounce, so each segment is just one tennis shot and nowhere close to an entire rally with multiple bounces. I'm ensure if I should continue done the trajectory route, maybe stitching together the trajectories and somehow only splitting at the start and end of a rally. Any general guidance would be appreciated. Is there a different Vision or ML approach that would more accurately model the start and end time of a rally? I considered creating a custom action classifier to classify frames to be either "playing tennis" or "inactivity," but I started with Apple's trajectory detection since it was already built and trained. Maybe a custom classifier would be needed, but not sure.
Posted
by
Post not yet marked as solved
0 Replies
321 Views
After creating a custom action classifier in Create ML, previewing it (see the bottom of the page) with an input video shows the label associated with a segment of the video. What would be a good way to store the duration for a given label, say, each CMTimeRange of segment of video frames that are classified as containing "Jumping Jacks?" I previously found that storing time ranges of trajectory results was convenient, since each VNTrajectoryObservation vended by Apple had an associated CMTimeRange. However, using my custom action classifier instead, each VNObservation result's CMTimeRange has a duration value that's always 0. func completionHandler(request: VNRequest, error: Error?) { guard let results = request.results as? [VNHumanBodyPoseObservation] else { return } if let result = results.first { storeObservation(result) } do { for result in results where try self.getLastTennisActionType(from: [result]) == .playing { var fileRelativeTimeRange = result.timeRange fileRelativeTimeRange.start = fileRelativeTimeRange.start - self.assetWriterStartTime self.timeRangesOfInterest[Int(fileRelativeTimeRange.start.seconds)] = fileRelativeTimeRange } } catch { print("Unable to perform the request: \(error.localizedDescription).") } } In this case I'm interested in frames with the label "Playing" and successfully classify them, but I'm not sure where to go from here to track the duration of video segments with consecutive frames that have that label.
Posted
by
Post not yet marked as solved
0 Replies
350 Views
Hi everyone I'm trying to use createML hand action classifier to detect some simple actions, I'm having some trouble because the model only detects one hand at a time in the scene(even in the preview of the model, without any coding) and I would need both hands, is it a bug or am I doing something wrong? Thank you in advance
Posted
by