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:
- Connect the AI Vision Sensor to Web-Based VEXcode IQ
- Connect the AI Vision Sensor to App-Based VEXcode IQ
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 |
|
Blue, Red, and Green Cubes |
Blue Cube | ClassroomElements.BLUE_CUBE |
blueCube |
| Green Cube | ClassroomElements.GREEN_CUBE |
greenCube |
|
| Red Cube | ClassroomElements.RED_CUBE |
redCube |
|
|
Blue and Red Buckyballs |
Blue Ball | ClassroomElements.BLUE_BALL |
blueBall |
| Red Ball | ClassroomElements.RED_BALL |
redBall |
|
|
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.
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.
Select Close in the lower right corner to exit the AI Vision Utility.
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.
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.
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
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.
You will see the new AprilTags Detection Mode be set to On.
Select Done to save your changes to the AI Vision Sensor's configuration.