Ikomia-hub / train_mmlab_detection

https://ikomia.com
Apache License 2.0
10 stars 1 forks source link
Algorithm icon

train_mmlab_detection


Stars Website GitHub
Discord community

Train for OpenMMLab detection models. mmdet illustration

:rocket: Use with Ikomia API

1. Install Ikomia API

We strongly recommend using a virtual environment. If you're not sure where to start, we offer a tutorial here.

pip install ikomia

2. Create your workflow

from ikomia.dataprocess.workflow import Workflow

# Init your workflow
wf = Workflow()    

# Add dataset loader
coco = wf.add_task(name="dataset_coco")

coco.set_parameters({
    "json_file": "path/to/annotation/file.json",
    "image_folder": "path/to/image/folder",
    "task": "detection",
}) 

# Add train algorithm
train = wf.add_task(name="train_mmlab_detection", auto_connect=True)

# Launch your training on your data
wf.run()

:sunny: Use with Ikomia Studio

Ikomia Studio offers a friendly UI with the same features as the API.

:pencil: Set algorithm parameters

Parameters should be in strings format when added to the dictionary.

from ikomia.dataprocess.workflow import Workflow

# Init your workflow
wf = Workflow()    

# Add dataset loader
coco = wf.add_task(name="dataset_coco")

coco.set_parameters({
    "json_file": "path/to/annotation/file.json",
    "image_folder": "path/to/image/folder",
    "task": "detection",
}) 

# Add train algorithm
train = wf.add_task(name="train_mmlab_detection", auto_connect=True)
train.set_parameters({
    "epochs": "5",
    "batch_size": "2",
    "dataset_split_ratio": "90",
    "eval_period": "1"
}) 

# Launch your training on your data
wf.run()