CHIP-Segmentation / README.md
danhtran8989's picture
Update README.md
1d93f05 verified
|
Raw
History Blame Contribute Delete
2.4 kB
metadata
license: apache-2.0
tags:
  - segmentation
size_categories:
  - 10K<n<100K

CHIP Dataset - Segmentation Training Guide

Overview

This dataset is designed for training segmentation models, specifically for human/CHIP segmentation tasks using YOLO models.

Dataset Structure

After extracting CHIP_dataset.zip, the directory structure should include:

  • train/ and valid/ folders with images
  • data.yaml configuration file for YOLO training

Prerequisites

  • Python environment
  • GPU with CUDA support (recommended)

Installation

pip install ultralytics tqdm

Download and Extract Dataset

# Download dataset
wget https://huggingface.co/datasets/OSAS-AI/CHIP-Segmentation/resolve/main/CHIP_dataset.zip

# Extract
from zipfile import ZipFile
from tqdm import tqdm
import os

zip_path = "CHIP_dataset.zip"
extract_dir = "."
os.makedirs(extract_dir, exist_ok=True)

with ZipFile(zip_path, "r") as zip_ref:
    members = zip_ref.infolist()
    for member in tqdm(members, desc="Extracting", unit="file"):
        zip_ref.extract(member, extract_dir)

print(f"Extracted to: {extract_dir}")

Download Pre-trained Model

wget https://huggingface.co/Ultralytics/YOLO26/resolve/main/yolo26s-seg.pt

Training

from ultralytics import YOLO

# Load model
model = YOLO('yolo26s-seg.pt')  # small variant – good balance

# Train
results = model.train(
    data='data.yaml',
    epochs=300,
    imgsz=640,
    batch=32,  # reduce if OOM
    device="0,1",  # adjust for your GPUs
    workers=8,
    project='runs/train',
    name='human_segmentation',
    exist_ok=False,
    patience=15,
    save=True,
    val=True,
    plots=True
)

Key Training Parameters

  • Model: YOLOv26s-seg (segmentation)
  • Image Size: 640x640
  • Epochs: 300
  • Batch Size: 32 (adjust based on VRAM)
  • Multi-GPU: Supports device="0,1"

Inference / Usage

After training, the best model will be saved in runs/train/human_segmentation/weights/best.pt

model = YOLO('path/to/best.pt')
results = model('path/to/image.jpg')

Dataset on Hugging Face

CHIP-Segmentation

For more details, refer to Ultralytics YOLO documentation.

You can copy the entire block above and save it as README.md. Let me know if you want any changes!