Training a Defect Detection Model with Intel Geti#
The reference use case downloads a Geti-trained YOLOX-L OpenVINO model from
open-edge-platform/apm-pipeline-defect-detection.
It is demonstration-only, not validated for production, safety, or asset-integrity
decisions. See the use-case README
for the pinned download command, preprocessing, and known limitations.
Use Intel Geti to train and export a deployment-ready detector when you have a production dataset for your inspection scenario.
Training Workflow#
Collect representative images or video frames from the target environment. Include normal examples and each defect class that the application must detect. For the
pipeline-defect-detectionuse case, you can use the public Gas Pipelines Dataset on Kaggle as a starting point, subject to its attribution and license terms. Validate representative production data independently before operational use.Create a Geti object detection project.
Define the defect labels. For the reference pipeline use case, the application configuration expects these labels:
gas-pipelines deformation corrosion coating degradation deformations
These are the exact model-output labels in ID order, not a severity taxonomy. Preserve the distinct
deformationanddeformationsIDs;gas-pipelinesalone establishes neither damage nor safe operation. If you use different labels, update the APM configuration files listed in Update APM Configuration.Upload the dataset and annotate bounding boxes for each defect instance.
Train the model in Geti and review validation metrics. Do not proceed to deployment until the dataset covers expected camera angles, lighting, backgrounds, defect sizes, and negative samples.
Export the trained model in OpenVINO Intermediate Representation (IR) format. The exported model should include
.xmland.binartifacts.
Install the Exported Model#
Place the exported OpenVINO model artifacts in the use-case model directory. The default
pipeline-server-config.json expects the detector at this path inside the DL Streamer Pipeline
Server container:
/home/pipeline-server/models/hf/86a3169310e91fcdaea0aab45f1ade616fced081/model.xml
That container path maps to the host directory selected by USE_CASE_MODELS_DIR, which is normally:
apps/pipeline-defect-detection/models/
For a new custom export, use a separate directory; do not overwrite the checksum-verified HF cache. For example:
apps/pipeline-defect-detection/models/custom/model.xml
apps/pipeline-defect-detection/models/custom/model.bin
If you use a different model filename, update every CPU/GPU/NPU pipeline entry in:
apps/pipeline-defect-detection/configs/pipeline-server-config.json
For example:
"pipeline": "{auto_source} name=source ! decodebin3 ! videoconvert ! video/x-raw,format=BGR ! gvadetect model=/home/pipeline-server/models/custom/model.xml model-proc=/home/pipeline-server/models/pipeline-defect-detection.json pre-process-backend=opencv device=CPU threshold=0.25 name=detection ! gvametaconvert add-empty-results=true name=metaconvert ! queue ! gvafpscounter ! appsink name=destination"
Update every device-specific pipeline and the model-proc to match the new export. The example assumes the same FP32 NCHW/RGB/centered-letterbox contract as the reference export. Do not reuse that preprocessing for a different input contract, such as an export with embedded U8/NHWC preprocessing.
Update APM Configuration#
The detector labels must stay aligned with the reasoning and fallback configuration:
File |
What to update |
|---|---|
|
|
|
Per-class confidence thresholds and fallback actions |
|
Defect class descriptions and reasoning instructions |
|
Model path and detection threshold |
|
Input preprocessing and exact output-label mapping |
If you create a new use case, copy the full use-case directory and update the file names and
use_case_id consistently:
cp -r apps/pipeline-defect-detection apps/<new-use-case>
Validate the Trained Model#
After installing the exported model:
Start the application:
source ./setup.sh --use-case pipeline-defect-detection
Open the dashboard and run an inspection on a validation video.
Confirm detections are stored:
curl http://localhost:8080/api/storage/detections/summaryReview DL Streamer logs if detections are missing:
docker logs apm-dlstreamer docker logs apm-detection
Tune the
gvadetect threshold=value inpipeline-server-config.jsonand the policy thresholds inpolicy_fallback.jsonbased on validation results.
Dataset Readiness Guidance#
Before treating a model as release-ready, verify that the dataset includes:
Representative production camera views and image quality.
Enough examples for each defect class and enough negative or no-defect examples.
Variation in lighting, backgrounds, object scale, occlusion, and motion blur.
A separate validation set that was not used for training.
Clear label definitions so annotators apply bounding boxes consistently.
Do not use the reference model as evidence of production defect detection accuracy. It is provided only to demonstrate the APM application flow.