All Products
Search
Document Center

Platform For AI:Object detection (easycv)

Last Updated:Apr 01, 2026

Train object detection models using YOLOX, FCOS, YOLOv5, and YOLOv7 to identify and locate entities in images.

Prerequisites

Before you begin, ensure that you have:

Limitations

  • Available only in Designer.

  • Only the DLC engine is supported.

Parameters

Input

Input portTypeUpstream componentRequired
Training dataOSSRead OSS dataNo — if not connected, configure Annotation file path for training set on the Field settings tab
Validation dataOSSRead OSS dataNo — if not connected, configure Annotation file path for validation set on the Field settings tab
Class list fileOSSRead OSS dataNo — if not connected, configure Class list file OSS path on the Field settings tab

Configuration

Field settings tab

ParameterRequiredDefaultDescription
Model typeYesYOLOXModel architecture for training. Valid values: FCOS, YOLOX, YOLOv5, YOLOv7.
Data formatYesDetSourcePAIAnnotation format for your dataset. DetSourcePAI uses .manifest files (produced by PAI iTAG); COCO uses .json files (standard COCO annotation format). YOLOv5 and YOLOv7 support DetSourcePAI only.
Annotation file path for training setNoNonePath to the training annotation file. Use a .manifest file for DetSourcePAI or a .json file for COCO. If training data is connected through the input port, leave this blank — the input port takes precedence.
Annotation file path for validation setNoNonePath to the validation annotation file. Use a .manifest file for DetSourcePAI or a .json file for COCO. If validation data is connected through the input port, leave this blank — the input port takes precedence.
Training data OSS pathYes (COCO only)NonePath to training images in COCO format. Appears only when Data format is set to COCO.
Validation data OSS pathYes (COCO only)NonePath to evaluation images in COCO format. Appears only when Data format is set to COCO.
Class list file OSS pathNoNonePath to a label list file with a .txt extension. If a class list file is connected through the input port, leave this blank — the input port takes precedence.
Pre-trained model OSS pathNoNoneOSS path to a custom pre-trained model. If not specified, PAI uses a default pre-trained model.
OSS directory for trainingNoNoneOSS directory where the trained model is saved. Example: examplebucket.oss-cn-shanghai-internal.aliyuncs.com/test/ckpt/. If left blank, the default workspace path is used.

Parameters tab

ParameterRequiredDefaultDescription
YOLOX model structureYes (YOLOX only)yolox-sArchitecture variant for YOLOX. Valid values: yolox-s, yolox-m, yolox-l, yolox-x.
Number of classesYes20Number of object classes in your dataset.
Image scaleYes320 320Image dimensions after resizing (height width). Example: 320 320.
OptimizerYes (YOLOX only)momentumOptimizer for model training. Valid values: momentum, adam.
Initial learning rateYes0.01Learning rate at the start of training.
Training batch sizeYes8Number of samples per training iteration.
Validation batch sizeYes8Number of samples per evaluation iteration.
Number of epochsYes20Total training epochs. For YOLOX, this value must exceed the sum of Warmup epochs and Last no augmented lr epochs.
Log loss frequencyNo200Frequency (in batches) for logging the training loss.
Validation frequencyNo2Validation interval in epochs. A value of 2 runs validation every two epochs.
Warmup epochsNo5Applies to YOLOX only. Number of warm-up epochs at the start of training.
Last no augmented lr epochsNo5Applies to YOLOX only. Number of final epochs run without data augmentation.
Export model formatYesrawFormat of the exported model. JIT is not supported for YOLOv5 and YOLOv7. Valid values: raw, jit, onnx.
Checkpoint saving frequencyNo1Frequency (in epochs) for saving model checkpoints. A value of 1 saves a checkpoint after every epoch.

Tuning tab

ParameterRequiredDefaultDescription
GPU machine typeYes4GPU instance type for training. A GPU instance is required.
Enable FP16NofalseEnables FP16 half-precision training to reduce memory usage and speed up training on supported GPUs.
Execution modeYesDistributed DLCDistributed training on DLC. Only distributed mode is supported.

Output

Output portTypeDownstream component
Output modelSavedModel format, stored at the OSS path specified in OSS directory for training on the Field settings tabimage prediction

Build an object detection pipeline

Build an end-to-end object detection pipeline using FCOS, YOLOX, YOLOv5, or YOLOv7.

image

Step 1: Label your images

Use the iTAG module in PAI to label your training images.

  1. Create a dataset and a labeling job. See Create a dataset: for data labeling and Create a labeling job.

  2. When creating the labeling job, select the General Template template under Object Detection.

    目标检测模板

  3. Under Object Detection Label Configuration, select Single-label. In the Label Configuration section, enter all your label names.

    单选标签示例

  4. After labeling is complete, export the results in manifest format to OSS.

    标注结果导出

Step 2: Read the labeled data

Add a Read OSS data component to the pipeline. Set OSS Data Path to the OSS path of the exported manifest file. For example: oss://examplebucket.oss-cn-shanghai.aliyuncs.com/ev_demo/xxx.manifest.

Step 3: Configure the training component

Connect the Training data and Validation data input ports of the Object detection (easycv) component to the Read OSS data component, then configure the parameters as described in Configuration.

Step 4: Run inference (FCOS and YOLOX)

For FCOS and YOLOX models, add an image prediction component downstream to run offline inference. See image prediction.

3eeb980b8371052b9785a02f3719c4aa

What's next