All Products
Search
Document Center

Platform For AI:Object detection (easycv)

Last Updated:Mar 25, 2026

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

Prerequisites

OSS is activated, and Machine Learning Studio is authorized to access OSS. For more information, see Activate OSS and Grant required permissions to use Machine Learning Designer.

Limitations

  • Available only in Designer.

  • Only DLC engine supported.

Parameters

  • Input

    Input port

    Type

    Upstream component

    Required

    Training data

    OSS

    Read OSS data

    No

    If not connected, configure Annotation file path for training set on the Field settings tab.

    Validation data

    OSS

    Read OSS data

    No

    If not connected, configure Annotation file path for validation set on the Field settings tab.

    Class list file

    OSS

    Read OSS data

    No

    If not connected, configure Class list file OSS path on the Field settings tab.

  • Configuration

    Tab

    Parameter

    Required

    Description

    Default

    Field settings

    Model type

    Yes

    Model type to use for training. Valid values:

    • FCOS

    • YOLOX

    • YOLOv5

    • YOLOv7

    YOLOX

    OSS directory for training

    No

    OSS directory to store the trained model. Example: examplebucket.oss-cn-shanghai-internal.aliyuncs.com/test/ckpt/. If empty, uses default workspace path.

    None

    Annotation file path for training set

    No

    • If data format is DetSourcePAI, provide a file with a .manifest extension.

    • If data format is COCO, provide a file with a .json extension.

    If training data provided through an input port, leave this parameter empty. If both configured, the input port takes precedence.

    None

    Annotation file path for validation set

    No

    • If data format is DetSourcePAI, provide a file with a .manifest extension.

    • If data format is COCO, provide a file with a .json extension.

    If validation data provided through an input port, leave this parameter empty. If both configured, the input port takes precedence.

    None

    Class list file OSS path

    No

    Specify a label list file with a .txt extension.

    If class list file provided through an input port, leave this parameter empty. If both configured, the input port takes precedence.

    None

    Pre-trained model OSS path

    No

    To use a custom pre-trained model, set this parameter to its OSS path. If not specified, PAI uses a default pre-trained model.

    None

    Training data OSS path

    Yes

    Appears only when data format is COCO. Specify the path to training images in COCO format.

    None

    Validation data OSS path

    Yes

    Appears only when data format is COCO. Specify the path to evaluation images in COCO format.

    None

    Data format

    Yes

    Valid values:

    • COCO

    • DetSourcePAI (YOLOv5 and YOLOv7 models support only DetSourcePAI format.)

    DetSourcePAI

    Parameters

    YOLOX model structure

    Yes

    Appears only when model type is YOLOX. Select the desired model structure from the drop-down list.

    • yolox-s

    • yolox-m

    • yolox-l

    • yolox-x

    yolox-s

    Number of classes

    Yes

    Class labels in the dataset.

    20

    Image scale

    Yes

    Size of the image after resizing. Separate height and width with a space. Example: 320 320.

    320 320

    Optimizer

    Yes

    Configurable only when model type is YOLOX.

    Optimizer for model training. Valid values:

    • momentum

    • adam

    momentum

    Initial learning rate

    Yes

    Initial learning rate.

    0.01

    Training batch size

    Yes

    Samples used in a single training iteration.

    8

    Validation batch size

    Yes

    Samples used in a single evaluation iteration.

    8

    Number of epochs

    Yes

    Training epochs to run.

    Note

    For YOLOX models, total epochs must exceed the sum of warmup epochs and Last no augmented lr epochs.

    20

    Log loss frequency

    No

    Frequency, in training batches, to log the loss. A value of 200 logs loss every 200 batches.

    200

    Validation frequency

    No

    Validation interval in epochs. A value of 2 runs validation every two epochs.

    2

    Warmup epochs

    No

    Applies only to YOLOX models.

    5

    Last no augmented lr epochs

    No

    Applies only to YOLOX models.

    5

    Export model format

    Yes

    Format of the exported model. Valid values:

    • raw

    • jit (YOLOv5 and YOLOv7 models do not support this format.)

    • onnx

    raw

    Checkpoint saving frequency

    No

    Frequency, in epochs, for saving model checkpoints. A value of 1 saves a checkpoint after every epoch.

    1

    Tuning

    GPU machine type

    Yes

    Requires a GPU instance to run.

    4

    Enable FP16

    No

    Enables FP16 half-precision training.

    false

    Execution mode

    Yes

    Supports only distributed training on DLC.

    Distributed DLC

  • Output

    Output port

    Type

    Downstream component

    Output model

    OSS path specified for OSS directory for training on the Field settings tab. Stores the trained model in SavedModel format.

    image prediction

Example

For FCOS, YOLOX, YOLOv5, and YOLOv7 models, use the Object detection (easycv) component to build a pipeline as shown below.

image

Configure the components by following these steps:

  1. Use the iTAG module in PAI to label your images. For more information, see Create a dataset: for data labeling and Create a labeling job.

    1. After creating a dataset, select the General Template template under Object Detection when creating the labeling job.

    2. 目标检测模板

    3. For Object Detection Label Configuration, select Single-label. Under Label Configuration, enter all your label names to simplify labeling.

    4. 单选标签示例

    5. After completing labeling, export the results in manifest format to OSS for the component to use.

    6. 标注结果导出

  2. Use the Read OSS data component to read the labeled result file xxx.manifest, and set OSS Data Path to the OSS path of the labeled result dataset. For example, oss://examplebucket.oss-cn-shanghai.aliyuncs.com/ev_demo/xxx.manifest.

  3. Connect training data and validation data to the Object detection (easycv) component and configure its parameters. For details, see Configure component parameters.

For FCOS and YOLOX models, perform offline inference using the image prediction component. For more information, see image prediction.

3eeb980b8371052b9785a02f3719c4aa

Related documents

  • After training an object detection model, connect an image prediction component downstream of the Object detection (easycv) component to run predictions and evaluate model performance. For more information, see image prediction.

  • For more information about Designer components, see Designer overview.

  • Designer offers a variety of algorithm components. Select the component appropriate for your data processing scenario. For more information, see Designer component reference.