Tensorflow Labels for two separate videos

I have spent hours trying to find a tutorial to help us with this, and apologize if I missed the info on how to do this correctly.
We have two trained models one for the blue element and one for the red. I added them to the ConceptTensorFlowObjectDetection Opmode as below (they are in assets):

private static final String TFOD_BLUE_ELEMENT = “model_20231203_222541.tflite”;
private static final String TFOD_RED_ELEMENT = “model_20231203_222209.tflite”;
// TFOD_MODEL_FILE points to a model file stored onboard the Robot Controller’s storage,
// this is used when uploading models directly to the RC using the model upload interface.
private static final String TFOD_MODEL_FILE = “/sdcard/FIRST/tflitemodels/myCustomModel.tflite”;

// Define the labels recognized in the model for TFOD (must be in training order!)
private static final String[] LABELS = {
      //  "Pixel",  this is commented out because we were testing to see what labels would show up


tfod = new TfodProcessor.Builder()

        // With the following lines commented out, the default TfodProcessor Builder
        // will load the default model for the season. To define a custom model to load, 
        // choose one of the following:
        //   Use setModelAssetName() if the custom TF Model is built in as an asset (AS only).
        //   Use setModelFileName() if you have downloaded a custom team model to the Robot Controller.

        // The following default settings are available to un-comment and edit as needed to 
        // set parameters for custom models.
        .setModelAspectRatio(16.0 / 9.0)


(I cut sections of code out in the above)

When we run the opmode the labels seem to be displayed based on the order of how we list them in the program. For example, if we use our red team prop, but the blue_element is listed first, it only displays BlueElement. If we put the pixel out it sees it as the blue element as well, but it won’t see the red element even if we put it out. We trained one label for each model. I am not sure if this explains the problem well enough. How can we properly code to use two separate models, one trained to each element? Thank you.

You cannot - you can only load a single TensorFlow model. Models are able to be trained with multiple labels, you do not need to have separate models for individual labels. If you have two models, I recommend using the appropriate model for the alliance color you’re going to have (I assume you might have different autonomous programs for Red and Blue positions).

Or, you can combine all of the videos used to create the two datasets into a single dataset (by selecting each video’s checkbox and then creating a dataset), and train a model using the combined dataset. Then you can load the single model with both trained labels.

Sorry to be the bearer of bad news.