AI object detection on the ctrlX CORE – no CAD model needed
AI object detection on a PLC platform used to mean a separate industrial PC, a GPU and a data scientist. On the ctrlX CORE with the AI module, the neural network runs right next to the PLC – and you train it on images of your own parts, without a CAD model.
This guide walks you through the four steps from the first camera image to part positions in the ctrlX Data Layer, and shows which LumiScan app does what. For the bigger picture of LumiScan on Bosch Rexroth’s automation platform, see our ctrlX AUTOMATION platform page.
Why run AI object detection on the controller?
Classic rule-based machine vision works well as long as parts look the same every time. Once you have varying surfaces, several part variants or parts lying in random positions, the rules multiply. A neural network learns the variation from examples instead. We explain the difference in more detail in image recognition vs. pattern recognition.
Running that network on the controller rather than on a separate PC has three practical advantages:
- Less hardware in the cabinet. The ctrlX CORE with the AI module does the inference itself. The key component of the module is a Hailo-8 M.2 accelerator.
- Results where the PLC needs them. Detections are written to the ctrlX Data Layer, the central data hub of ctrlX OS. The PLC program reads them like any other variable – no extra fieldbus, no custom interface.
- One platform to maintain. All runtime apps are installed, updated and licensed through the ctrlX OS Store, like every other app on the device.
What you need
- A ctrlX CORE with AI module (ctrlX COREplus or COREplus X7). The ctrlX CORE X7 is also available with three Hailo-8 modules; we have tested this configuration with LumiScan AI Object Matching. One network can run on all three modules in parallel, which significantly increases inference speed.
- An Ethernet camera that is GenICam compliant.
- An engineering PC for annotation and training.
- The LumiScan apps for each step, all available in the ctrlX OS Store:
- LumiScan CamDriver – image acquisition on the ctrlX CORE
- LumiScan Annotation Framework – annotating your images on the PC
- LumiScan Training Framework – training the network on the PC
- LumiScan AI Object Matching – running the network on the ctrlX CORE
- LumiScan Calibration – converting pixels into real-world coordinates (for robot applications)
Bosch Rexroth also offers the hardware and apps as a ready solution set in the ctrlX configurator.
Step 1: Acquire images of your real parts
Connect the camera to the ctrlX CORE and acquire images with LumiScan CamDriver. One driver covers GenICam cameras from different manufacturers, so you can keep the camera you already use. Our how-to on connecting a GenICam Ethernet camera with LumiScan CamDriver covers the setup in detail.
Take the images in the cell where the network will later work, under the same lighting. Make sure your image set covers the variation you expect in production: all part variants, different positions and orientations, touching and overlapping parts, good and borderline surfaces. Images that represent production well matter more than a large number of very similar ones.
Step 2: Annotate the parts – no CAD model, no AI expertise
Copy the images to the engineering PC and open them in LumiScan Annotation Framework. You mark each part you want the network to find. Oriented bounding boxes record the orientation of a part as well as its position – why that matters for gripping is explained in oriented bounding boxes.
This is the step where your process knowledge goes in. You decide what counts as a part, which variants belong to which class and which edge cases the network should learn. Nobody needs a CAD model, and nobody needs to write code.
Step 3: Train the neural network
LumiScan Training Framework takes the annotated images and trains the network automatically. The result is a model in the open ONNX format that LumiScan AI Object Matching can load.
Two tips from our projects:
- Keep some images back. Test the network on images it has not seen during training. A network that is only good on its training images has learned them by heart – we describe the effect and how to avoid it in overfitting in neural networks.
- Retrain instead of starting over. If production brings a new variant or a new surface, annotate a few additional images and retrain. Your existing data set stays the basis.
Step 4: Run the model on the ctrlX CORE and use the results
Upload the trained model to LumiScan AI Object Matching on the ctrlX CORE. The app runs the network on the AI module, finds the parts in every image and returns their position and orientation in pixel coordinates. What happens during inference is explained in what is inference?.
If your cycle time is tight, use a ctrlX CORE X7 with three Hailo-8 modules: one network then runs on all three modules in parallel, which significantly increases inference speed. Alternatively, the three modules can run three different networks side by side – for example for different part families.
The results are written to the ctrlX Data Layer. From there:
- the PLC reads them – for example to sort, count or check presence,
- LumiScan Calibration converts the pixel coordinates into real-world coordinates, so a robot can pick the part,
- LumiScan Cockpit shows images and results in the browser – handy during commissioning. Our how-to on evaluating images in LumiScan Cockpit shows how to add overlays.
That closes the loop: the camera image is acquired on the controller, the network runs on the controller, and the PLC reacts to the result on the same controller.
Frequently asked questions
Do I need a CAD model of my parts?
No. LumiScan AI Object Matching learns the parts from annotated images. That also works for parts without CAD data, for soft or deformable parts and for parts whose appearance varies.
Do I need AI or programming knowledge?
No. Annotation and training run in graphical tools; the network is generated automatically. What you need is knowledge of your parts and your process.
Which ctrlX hardware runs AI Object Matching?
The ctrlX CORE with AI module (Hailo-8), including the ctrlX CORE X7 with three Hailo-8 modules. Because the network is an ONNX model, the same network also runs on a ctrlX IPC with NVIDIA GPU, for example the ctrlX IPC PR53, if an application needs more computing power – and on Windows 11 or Ubuntu PCs.
How can I speed up inference on the ctrlX CORE?
Use a ctrlX CORE X7 with three Hailo-8 modules. LumiScan AI Object Matching can run one network on all three modules in parallel, which significantly increases inference speed. The same hardware can also run three different networks at the same time.
How is AI Object Matching licensed?
You need one licence per compute device running in parallel – a Hailo-8 module on the ctrlX CORE or a GPU in an IPC – regardless of whether the devices run different networks or the same network. A ctrlX CORE X7 using all three Hailo-8 modules therefore needs three licences.
How does the result get to the PLC or the robot?
All results are written to the ctrlX Data Layer. The PLC and every ctrlX OS app can read them there. For robot applications, LumiScan Calibration converts pixel coordinates into real-world coordinates.
Get started
All LumiScan apps for this workflow are available in the ctrlX OS Store, and the manuals are on docs.hdvisionsystems.com. If you would like to check whether your parts are a good fit for AI object detection, send us a few sample images – we’ll tell you what to expect.