File size: 2,622 Bytes
7ae85d5
cd67379
 
 
 
 
 
 
7ae85d5
cd67379
7ae85d5
cd67379
 
 
7ae85d5
 
cd67379
 
94394f1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6706230
94394f1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
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.