PersonalImageClassifier returns Error -1 even after ClassifierReady fires

Hello everyone,

I am facing an issue with the PersonalImageClassifier extension and would appreciate your guidance.

What I am trying to do

I built a simple image-classification app using PersonalImageClassifier:

  1. User clicks a button
  2. Camera takes a picture
  3. The captured image is displayed in an Image component
  4. The image is sent to the PersonalImageClassifier for classification
  5. The predicted label should be displayed in a Label component

Blocks logic (high level)

I am using the following events:

  • When Button.Click
    → Call Camera.TakePicture
  • When Camera.AfterPicture(image)
    → Set Image.Picture to image
    → Call classifier (using the available method for PersonalImageClassifier)
  • When PersonalImageClassifier.ClassifierReady
    → This event fires successfully
  • When PersonalImageClassifier.Error(errorCode)
    → This fires with errorCode = -1
  • When PersonalImageClassifier.GotResult(result)
    → This event never fires

Important observations

  • ClassifierReady does fire, so the model seems to load

  • Immediately after calling the classification method, Error fires with -1

  • The model was trained using the PIC web page and downloaded as a .mdl file

  • I am testing using the MIT AI Companion

  • A WebViewer component is present and set in the classifier properties

My question

  1. What does Error -1 specifically indicate in this context?
  2. Is this related to:
  • .mdl model compatibility?
  • WebViewer / Android WebView limitations?
  • Companion vs APK behavior?
  1. Is there a known limitation or workaround for this issue?

Attachments

I have attached:

  • Screenshots of the Blocks
  • Screenshots of the UI
  • Screenshots of PersonalImageClassifier and WebViewer properties

Thank you very much for your time and support.
Any clarification or confirmation would be greatly appreciated.

Best regards,
Jalal

looking-searching