Enabling AI Classifications and AprilTag ID Detection in VEXcode IQ

The VEX IQ AI Vision Sensor is able to use pre-trained AI models to detect known objects. These include AI Classifications and AprilTag IDs. This article will explain how to use the AI Vision Utility in VEXcode IQ to enable this detection.

Before beginning, the AI Vision Sensor must be connected and configured in VEXcode IQ. See these articles for more information:


AI Classification Models

AI Classifications are Game Objects that an AI Vision Sensor can detect. These classifications allow the AI Vision Sensor to distinguish between different types of objects in its field of view. 

In text-based VEXcode, each of these classifications has an assigned ID which is what is used to differentiate between them in projects.

Classroom Elements

The Classroom Elements model includes game objects found within the IQ Classroom Bundle and EXP Classroom Bundle.

The AI Classifications include:

  • Blue, Red, and Green Cubes
  • Blue and Red Buckyballs
  • Blue, Red, and Green Rings
Game Objects AI Classification Python ID C++ ID

 

A red, green, and blue cube game object.

Blue, Red, and Green Cubes

Blue Cube ClassroomElements.BLUE_CUBE blueCube
Green Cube ClassroomElements.GREEN_CUBE greenCube
Red Cube ClassroomElements.RED_CUBE redCube

A blue and red ball.

Blue and Red Buckyballs

Blue Ball ClassroomElements.BLUE_BALL blueBall
Red Ball ClassroomElements.RED_BALL redBall

 

A blue, red, and green ring game object.

Blue, Red, and Green Rings

Blue Ring ClassroomElements.BLUE_RING blueRing
Green Ring ClassroomElements.GREEN_RING greenRing
Red Ring ClassroomElements.RED_RING redRing

VIQRC Mix & Match

The VIQRC Mix & Match model includes game objects found within the VEX IQ Robotics Competition "Mix & Match" Full Game & Field Element Kit and 2025-26 VEX IQ Robotics Competition "Mix & Match" Scoring Element Kit.

The AI Classifications include:

  • Orange, Red, and Blue Pins
  • Beams
Game Objects AI Classification Python ID C++ ID

 

Orange, Red, and Blue Pins

Orange Pin GameElementsMixAndMatch.ORANGE_PIN orangePin
Red Pin GameElementsMixAndMatch.RED_PIN redPin
Blue Pin GameElementsMixAndMatch.BLUE_PIN bluePin

Beams

Beam GameElementsMixAndMatch.BEAM beam

Enable AI Classification Detection

Detection Mode must be enabled in the AI Vision Utility for the AI Vision Sensor to detect AI Classifications.

Devices window in vexcode showing the AI Vision sensor with a highlight on a button that reads configure.

Select Configure in the AI Vision Sensor's device menu.

The AI Vision Utility will open. Select the toggle in the upper right corner of the Utility underneath AI Classification to turn on the AI Classification Detection Mode.

As shown in the video to the left, once the AI Classification toggle has been turned on, data about any AI Classification objects will appear in the window.

Select the AI Classification dropdown menu to choose which AI Classifications you want the AI Vision Sensor to detect.

AI Vision Utility in VEXcode with a highlight on the button in the lower right corner that reads Close.

Select Close in the lower right corner to exit the AI Vision Utility.

AI Vision Utility in VEXcode with a highlight on the area that reads AI Classification detection is on. A second highlight can be seen on the AI Classification table at the bottom that shows the list of available classifications.

You will see the new AI Classification Detection Mode be set to On and the AI Classifications that will be detected are added at the bottom of the AI Vision Sensor's device menu.

Devices window in vexcode showing the AI Vision sensor with a highlight on a button that reads Done.

Select Done to save your changes to the AI Vision Sensor's configuration.


AprilTag IDs

AprilTag IDs are visual markers designed for easy detection and identification by computer vision systems. These square tags feature a unique high contrast (usually black and white) pattern that allows cameras and software to quickly recognize them and determine their precise position and orientation in 3D space.

There are 38 different AprilTag IDs, numbered 0 through 37. For a printable copy of these AprilTag IDs, click here to download the PDF version or click here to download the Cricut ZIP (SVG) version.

Two AprilTags in the AI Vision Utility. One shows as ID 5 and the other shows as ID 4.

Each AprilTag has an identifiable ID number that allows the AI Vision Sensor to differentiate between them. This allows the AprilTag IDs to be used for navigation around a field or to identify points of interest.

Enable AprilTag Detection

Devices window in vexcode showing the AI Vision sensor with a highlight on a button that reads configure.

Select Configure in the AI Vision Sensor's device menu.

The AI Vision Utility will open. Select the toggle in the upper right corner of the Utility underneath AprilTags to turn on the AprilTag Detection Mode.

As shown in the video to the left, once the toggle has been turned on, data about any AprilTag IDs will appear in the window.

AI Vision Utility in VEXcode with a highlight on the area that reads AprilTag detection is on.

You will see the new AprilTags Detection Mode be set to On.

Devices window in vexcode showing the AI Vision sensor with a highlight on a button that reads Done.

Select Done to save your changes to the AI Vision Sensor's configuration.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: