yolo-human-parse / README.md
MnLgt's picture
"hi"
6706230
---
license: apache-2.0
tags:
- vision
- image-classification
widget:
- src: >-
https://huggingface.co/jordandavis/yolo-human-parse/blob/main/sample_images/image_one.jpg
example_title: Straight ahead
- src: >-
Looking back
example_title: Teapot
- src: >-
https://huggingface.co/jordandavis/yolo-human-parse/blob/main/sample_images/image_three.jpg
example_title: Sweats
---
# 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:
0. Hair
1. Face
2. Neck
3. Arm
4. Hand
5. Back
6. Leg
7. Foot
8. Outfit
9. Person
10. Phone
## Installation
To use this model, you'll need to have the appropriate YOLO framework installed. Please follow these steps:
1. Clone this repository:
```
git clone https://github.com/your-username/yolo-segmentation-human-parts.git
cd yolo-segmentation-human-parts
```
2. Install the required dependencies:
```
pip install -r requirements.txt
```
## Usage
To use the model for inference, you can use the following Python script:
```python
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:
1. Prepare your dataset in the YOLO format.
2. Modify the `data.yaml` file to reflect your dataset structure and classes.
3. 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](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.