Skip to content

Commit db38ff0

Browse files
authored
Update README.md
Signed-off-by: Glenn Jocher <[email protected]>
1 parent 7a0d602 commit db38ff0

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,26 @@ pip install -r requirements.txt # Installs all the required packages
2323

2424
## 💡 Usage
2525

26-
This package has become part of the ultralytics python package. Therefore the conversion can be done with the `coco_convert` method. An example of keypoint annotated labels looks like this:
26+
JSON2YOLO functionality is now part of the main `ultralytics` Python package. To use the converter, first install the package:
27+
28+
```bash
29+
pip install ultralytics
30+
```
31+
32+
You can then easily convert COCO JSON datasets to YOLO format using the `convert_coco` method. Here's an example using keypoint annotations:
2733

2834
```python
2935
from ultralytics.data.converter import convert_coco
3036

3137
convert_coco(
32-
labels_dir="<path/to/labels.json>",
33-
save_dir="<path/to/output_dir>",
38+
labels_dir="path/to/labels.json",
39+
save_dir="path/to/output_dir",
3440
use_keypoints=True,
3541
)
3642
```
3743

38-
This method will process the JSON files, extract bounding box information, and convert it into the YOLO format, saving one `.txt` file per image in the specified save directory. For more details on [dataset formats](https://docs.ultralytics.com/datasets/), refer to our documentation.
44+
This method processes your JSON file, converts annotations (bounding boxes and keypoints), and saves the labels in YOLO format (`.txt` files) within the specified directory. For more details, refer to our [dataset format documentation](https://docs.ultralytics.com/datasets/).
45+
3946

4047
## 📚 Citation
4148

0 commit comments

Comments
 (0)