FIRST-Tech-Challenge / FtcRobotController

BSD 3-Clause Clear License
796 stars 4.59k forks source link

Error getting native address from native library: task_vision_jnl #744

Closed DominantDuck closed 11 months ago

DominantDuck commented 11 months ago

I am having trouble running my OpMode with a custom tflite file; I keep getting the message "Error getting native address from native library: task_vision_jnl" on my driver hub after pressing init. My "model_unquant.tflite" is located FtcRobotController -> assets.

Here is some of my code: private static final String TFOD_MODEL_ASSET = "model_unquant.tflite";

 tfod = new TfodProcessor.Builder()

                .setModelAssetName(TFOD_MODEL_ASSET)

                .setModelLabels(LABELS)
                .setIsModelTensorFlow2(true)
                .setIsModelQuantized(true)
                .setModelInputSize(300)
                .setModelAspectRatio(16.0 / 9.0)

                .build();`
texasdiaz commented 11 months ago

Usually with this error it's because you created an image Classification model using Google Teachable Machines or some other external tool and we use Object Detection APIs. They are not compatible with each other. With Image Classification you cannot detect multiple objects and you also cannot determine location within an image frame.

What tool did you use to create the model?

DominantDuck commented 11 months ago

I used Google Teachable Machines. Is there a way to create the model without using the ftc-ml tool?

texasdiaz commented 11 months ago

Is there something wrong with the ftc-ml tool? I'm just curious what your hesitation is.

You can use Google CoLab to create object detection models if you want, but we do not provide instruction or technical support for it. The only tool we support directly is ftc-ml.

DominantDuck commented 11 months ago

My only hesitation is the coach uploading the video files; it would be much easier for me to upload the files, especially after-practice hours. Thank you for your help.