I am making an attempt to understand how comparable the 2 photographs are. For that, I am utilizing VNGenerateImageFeaturePrintRequest and producing a VNFeaturePrintObservation from a picture. Then for the 2 totally different photographs, I am computing characteristic distance by utilizing their VNFeaturePrintObservation. Sadly, computed distances are totally different for iOS 16.0 and iOS 17.0 thus failing my threshold worth.
I attempted to get featurePrintObservation for photographs like beneath,
let requestHandler = VNImageRequestHandler(cgImage: cgImage, choices: [:])
let request = VNGenerateImageFeaturePrintRequest()
do {
attempt requestHandler.carry out([request])
self.characteristic = request.outcomes?.first
} catch {
print("Imaginative and prescient error: (error)")
}
Then I attempted to compute distance between two characteristic like beneath,
attempt! feature1.computeDistance(&visionDistance, to: feature2)
The output end result “visionDistance” is totally different for iOS 16.0 and iOS 17.0 for a similar two photographs (For instance, ‘22.66224‘ in iOS 16.3.1 and ‘1.2178229‘ in iOS 17.0.1). I wish to know if VNFeaturePrintObservation has modified in iOS 17.0 or not, and if modified then is there any strategy to generalize the calculation for each of the iPhone working techniques?