YOLO Segmentation Model for Human Body Parts and Objects
This repository contains a fine-tuned YOLO (You Only Look Once) segmentation model designed to detect and segment various human body parts and objects in images.
Model Overview
The model is based on the YOLO architecture and has been fine-tuned to detect and segment the following classes:
- Hair
- Face
- Neck
- Arm
- Hand
- Back
- Leg
- Foot
- Outfit
- Person
- Phone
Installation
To use this model, you'll need to have the appropriate YOLO framework installed. Please follow these steps:
Clone this repository:
git clone https://github.com/your-username/yolo-segmentation-human-parts.git cd yolo-segmentation-human-parts
Install the required dependencies:
pip install -r requirements.txt
Usage
To use the model for inference, you can use the following Python script:
from ultralytics import YOLO
# Load the model
model = YOLO('path/to/your/model.pt')
# Perform inference on an image
results = model('path/to/your/image.jpg')
# Process the results
for result in results:
boxes = result.boxes # Bounding boxes
masks = result.masks # Segmentation masks
# Further processing...
Training
If you want to further fine-tune the model on your own dataset, please follow these steps:
- Prepare your dataset in the YOLO format.
- Modify the
data.yaml
file to reflect your dataset structure and classes. - Run the training script:
python train.py --img 640 --batch 16 --epochs 100 --data data.yaml --weights yolov5s-seg.pt
Evaluation
To evaluate the model's performance on your test set, use:
python val.py --weights path/to/your/model.pt --data data.yaml --task segment
Contributing
Contributions to improve the model or extend its capabilities are welcome. Please submit a pull request or open an issue to discuss proposed changes.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Thanks to the YOLO team for the original implementation.
- Gratitude to all contributors who helped in fine-tuning and improving this model.
- Downloads last month
- 59