Releases: SaladDays831/FaceSeg
Releases · SaladDays831/FaceSeg
2.0.0
Breaking changes
- Minimum iOS is now 15. Swift 6 language mode, tools version 6.2.
FaceSegDelegateremoved. Calltry await FaceSeg(configuration:).segment(image)instead.FaceSegConfigurationis now a struct with a memberwise init.
faceInBoundingBoxImageHeight→faceInBoundingBoxSize.FaceSegErrorslimmed to 3 cases, conforms toError/LocalizedError. Use
error.localizedDescriptioninstead oferrorString.FaceSegMetadata.facePathsis now[CGPath]. Wrap withUIBezierPath(cgPath:)
if you need UIKit drawing.
New
- Partial-face tolerance: faces with missing landmarks are skipped instead of
failing the whole request. FaceSegConfiguration.minimumFaceCaptureQualitydrops low-quality detections.- Forehead reconstruction adds a midpoint control — better on tilted faces.
- Cancellation:
Task.checkCancellation()at phase boundaries. - Renderers preserve
image.scale(no more blurry Retina output). - Mirrored
UIImage.Orientationcases map correctly.
Migration
Before:
let seg = FaceSeg()
seg.delegate = self
seg.configuration.drawFacesImage = true
seg.process(image)
After:
let seg = FaceSeg(configuration: .init(drawFacesImage: true))
let result = try await seg.segment(image)