Lift subjects from images in your app

RSS for tag

Discuss the WWDC23 Session Lift subjects from images in your app

Posts under wwdc2023-10176 tag

6 Posts

Post

Replies

Boosts

Views

Activity

Extract subject of a picture programmatically
Hello, I'm doing a iOS app and I'm trying to find a way to extract programmatically a person from his identity picture (and to leave behind the background) I'm watching WWDC "Lift subjects from images in your app" video (a really cool feature) and i'm wondering if this feature would be possible programmatically, without the need of a human person interaction. Thank you.
2
0
1.4k
Sep ’23
VNGeneratePersonSegmentationRequest produces mask at different resolution then source image
Trying to use VNGeneratePersonSegmentationRequest.. it seems to work but the output mask isn't at the same resolution as the source image.. so comping the result with the source produces a bad result. Not the full code, but hopefully enough to see what I'm doing. var imageRect = CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height) let imageRef = image.cgImage(forProposedRect: &imageRect, context: nil, hints: nil)! let request = VNGeneratePersonSegmentationRequest() let handler = VNImageRequestHandler(cgImage: imageRef) do { try handler.perform([request]) guard let result = request.results?.first else { return } //Is this the right way to do this? let output = result.pixelBuffer //This ciImage alpha mask is a different resolution than the source image //So I don't know how to combine this with the source to cut out the foreground as they don't line up.. the res it's even the right aspect ratio. let ciImage = CIImage(cvPixelBuffer: output) ..... }
2
0
1.1k
Jul ’23
unrecognized selector sent to instance
When trying the code from this Session: https://developer.apple.com/videos/play/wwdc2023/10176/ Specifically: result.generateScaledMaskForImage(forInstances: result.allInstances, from: handler) It throws the error: -[VNInstanceMaskObservation generateScaledMaskForImageForInstances:fromRequestHandler:error:]: unrecognized selector sent to instance Any ideas?
0
0
1k
Jun ’23
Extract subject of a picture programmatically
Hello, I'm doing a iOS app and I'm trying to find a way to extract programmatically a person from his identity picture (and to leave behind the background) I'm watching WWDC "Lift subjects from images in your app" video (a really cool feature) and i'm wondering if this feature would be possible programmatically, without the need of a human person interaction. Thank you.
Replies
2
Boosts
0
Views
1.4k
Activity
Sep ’23
VNGeneratePersonSegmentationRequest produces mask at different resolution then source image
Trying to use VNGeneratePersonSegmentationRequest.. it seems to work but the output mask isn't at the same resolution as the source image.. so comping the result with the source produces a bad result. Not the full code, but hopefully enough to see what I'm doing. var imageRect = CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height) let imageRef = image.cgImage(forProposedRect: &imageRect, context: nil, hints: nil)! let request = VNGeneratePersonSegmentationRequest() let handler = VNImageRequestHandler(cgImage: imageRef) do { try handler.perform([request]) guard let result = request.results?.first else { return } //Is this the right way to do this? let output = result.pixelBuffer //This ciImage alpha mask is a different resolution than the source image //So I don't know how to combine this with the source to cut out the foreground as they don't line up.. the res it's even the right aspect ratio. let ciImage = CIImage(cvPixelBuffer: output) ..... }
Replies
2
Boosts
0
Views
1.1k
Activity
Jul ’23
ios17 lift subjects jagged edge and low resolution.
Why iOS 17's lift subject returns jagged edge and low resolution result image ? The output quality is totally different from iOS16. Does this just occur to beta version? or will it be the same in real iOS17 release version ?
Replies
1
Boosts
0
Views
836
Activity
Jul ’23
Will subject lifting require iOS 17?
Most of the APIs for this show iOS 16 support. Will a full subject lifting implementation require the device to be running iOS 17 or will it run on 16 too?
Replies
1
Boosts
0
Views
917
Activity
Jun ’23
unrecognized selector sent to instance
When trying the code from this Session: https://developer.apple.com/videos/play/wwdc2023/10176/ Specifically: result.generateScaledMaskForImage(forInstances: result.allInstances, from: handler) It throws the error: -[VNInstanceMaskObservation generateScaledMaskForImageForInstances:fromRequestHandler:error:]: unrecognized selector sent to instance Any ideas?
Replies
0
Boosts
0
Views
1k
Activity
Jun ’23
Subject Lifting for SwiftUI
Hi! Wondering if there's a way to add subject lifting to images in my SwiftUI app without relying on UIViewControllerRepresentable and Coordinators to adopt the ImageAnalysisInteraction protocol. Thank you!
Replies
0
Boosts
1
Views
1.1k
Activity
Jun ’23