Skip to content

Train YOLOv8 with SAHI on custom dataset #1059

Answered by fcakyon
Mu-Magdy asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @Mu-Magdy,

You can slice a COCO formatted dataset as:

from sahi.slicing import slice_coco

coco_dict, coco_path = slice_coco(
    coco_annotation_file_path=coco_annotation_file_path,
    image_dir=image_dir,
    slice_height=256,
    slice_width=256,
    overlap_height_ratio=0.2,
    overlap_width_ratio=0.2,
)

then use this dataset during training.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Mu-Magdy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants