Closed RembiTime closed 1 year ago
You likely did more than just "rename" the model file in the assets, where did you create your model from? If it wasn't created using ftc-ml, it's not guaranteed to work. The problem is that most tools online use TensorFlow Image Classification (TFIC), and this is not supported in FTC TensorFlow. Only TensorFlow Object Detection (TFOD) is supported.
I created it using Google Teachable Machine
Yep, Google Teachable Machine uses TensorFlow Image Classification exclusively. The difference between TFIC and TFOD is that TFIC can detect A SINGLE pattern in an image, and furthermore cannot detect where in the image the pattern was detected. However, TFOD can detect MULTIPLE patterns in an image, and provides additional information such as the bounding box of the object. TFIC and TFOD neural networks are trained very differently, so the TFOD interface built into the FTC TensorFlow tools cannot use or understand a TFIC model. Please use ftc-ml to train a model for FTC.
Closing this issue since the FTC SDK only supports TensorFlow Object Detection, and not TensorFlow Image Classification. The only model generation software 100% supported by the FTC SDK is the ftc-ml tool provided to all teams. Please see the big warning in orange at the ftc-ml tool documentation page.
Hello! I was trying to implement an object detection system into our robot, so I copied over this example file. The only thing that I changed were the labels, the filename of the tflite file in assets, and my Vuforia key. Whenever I try to initialize the opmode, it outputs "Press Play to start op mode" but then crashes. The error I receive is "Error occurred when initializing ObjectDetector: Input tensor has type kTfLiteFloat32: it requires specifying NormalizationOptions metadata to preprocess input images." I am using FTCRobotController 8.1. Here is my code: