【发布时间】:2018-11-19 23:35:29
【问题描述】:
我使用 Android Studio 进行编码,在 tensorflowObjectDetection 示例中,我注释掉了 @Disable 并添加了我们的 Vuforia 密钥,但当我运行程序时它就崩溃了。我已将其范围缩小到以下代码:
private void initTfod() {
int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(
"tfodMonitorViewId", "id", hardwareMap.appContext.getPackageName());
TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);
tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);
tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL);
}
通过注释掉最后两行,它不会崩溃,但它不明白为什么。
【问题讨论】:
标签: java android android-studio tensorflow