train_yolo_v7

train_yolo_v7

About

2.0.0
GPL-3.0

Train YOLOv7 object detection models.

Task: Object detection
yolo
v7
object
detection
real-time
coco

Train on YOLOv7 object detection models.

Desk object detection

🚀 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/json/annotation/file",
    "image_folder": "path/to/image/folder",
    "task": "detection",
}) 

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

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

☀️ Use with Ikomia Studio

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

  • If you haven't started using Ikomia Studio yet, download and install it from this page.

  • For additional guidance on getting started with Ikomia Studio, check out this blog post.

📝 Set algorithm parameters

  • train_imgsz (int) - default '640': Size of the training image.
  • test_imgsz (int) - default '640': Size of the eval image.
  • epochs (int) - default '10': Number of complete passes through the training dataset.
  • batch_size (int) - default '16': Number of samples processed before the model is updated.
  • dataset_split_ratio (float) – default '0.9': Divide the dataset into train and evaluation sets ]0, 1[.
  • output_folder (str, optional): Path to where the model will be saved.
  • config_file (str, optional): Path to hyperparameters configuration file .yaml.
  • dataset_folder (str, optional): Path to dataset folder.
  • model_weight_file (str, optional): Path to pretrained model weights. Can be used to fine tune a model.
  • model_name (str) - default 'yolov7': Model architecture to be trained. Should be one of :
    • yolov7
    • yolov7-d6
    • yolov7-e6
    • yolov7-e6e
    • yolov7-tiny
    • yolov7-w6
    • yolov7x

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/json/annotation/file",
    "image_folder": "path/to/image/folder",
    "task": "detection",
}) 

# Add train algorithm
train = wf.add_task(name="train_yolo_v7", auto_connect=True)
train.set_parameters({
    "batch_size": "2",
    "epochs": "5",
    "train_imgsz": "640",
    "test_imgsz": "640",
    "dataset_split_ratio": "0.9"
})

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

Developer

  • Ikomia
    Ikomia

License

GNU General Public License v3.0
Read license full text

Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.

PermissionsConditionsLimitations

Commercial use

License and copyright notice

Liability

Modification

State changes

Warranty

Distribution

Disclose source

Patent use

Same license

Private use

This is not legal advice: this description is for informational purposes only and does not constitute the license itself. Provided by choosealicense.com.