-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS compatibility? #14
Comments
macOS computed feature for image 'a'
iOS computed feature for the same image 'a'
|
Dropping directly into CoreML rather than vision produces the same result. I manually resize a |
Apologies for the monologue - here is an interesting observation on the issue: It appears that custom layers on CoreML models are loaded slightly different on iOS than on macOS - at least with a sample size of 1 for this MaskRCNN. To realize this I added some debug logging to the custom layer initializers and functions. when iOS loads the CoreML model and runs inference (prediction is called), we see:
Which shows us initializers and expected keys / values, output sizes and shapes. macOS however shows a 2 pass initialization - one with very different :
|
Closer : Pyramid ROI layer requires a retained command buffer as opposed to a unretained, and metal GPU resources require manual synchronization on discrete GPU's to get results. While I'm not matching iOS exactly, I am getting somewhat sensible results. Bit more to do. |
Hello
Firstly, thank you for this repo and your work. Im able to run your examples on iOS sans issue.
I am attempting to run your example code on a simple macOS test harness. However, I am not getting expected results. Prediction runs, I can load the model, load the config, the anchors, configure Vision, the request, provide an image, however the VNCoreMLRequest results always have 0 score within
Detection.detectionsFromFeatureValue
- and I'm trying to (unsuccessfully debug).Verified:
MaskRCNNConfig.defaultConfig
VNCoreMLFeatureValueObservation
However I don't seem to get valid scores for what appear to be valid input images. I can verify that iOS on the same image works and makes a great prediction, bounding box and mask.
Have you been able to run this code on macOS?
The text was updated successfully, but these errors were encountered: