apple / coremltools

Core ML tools contain supporting tools for Core ML model conversion, editing, and validation.
https://coremltools.readme.io
BSD 3-Clause "New" or "Revised" License
4.35k stars 628 forks source link

I can convert the segmentation model with no error message, but the preview is not showing any predictions #1888

Open cnpcshangbo opened 1 year ago

cnpcshangbo commented 1 year ago

❓Question

Hello, This is the model I am trying to convert: https://github.com/cnpcshangbo/crack_detection/tree/coreML#pre-trained-model My code for conversion is: https://github.com/cnpcshangbo/crack_detection/blob/coreML/Code/conver2CoreML.py Currently, it works without errors, but the converted mode doesn't output anything. Here's a video to show how I converted: https://capture.dropbox.com/Wx1Wl5A9KVGnYDfj Hope to get some suggestions on how to debug this conversion? Thanks, Bo

junpeiz commented 1 year ago

Hi Bo,

At 2:42 of your video, it looks like the conversion is not fully succeeded (FileNotFound error).

Also, to better debug it, I would recommend to use Python to load the model and feed inputs, which will show detailed error messages. Code examples about how to load the model and run prediction could be found in coremltools documentation.

Thanks!