Tool to Create,Modify YOLO dataset and much more...
Project description
yolo-splitter
Tool to create,modify YOLO dataset.
Installation
pip install yolosplitter
Uses
from yolosplitter import YoloSplitter
ys = YoloSplitter(imgFormat=['.jpg', '.jpeg', '.png'], labelFormat=['.txt'] )
# If you have yolo-format dataset already on the system
df = ys.from_yolo_dir(input_dir="yolo_dataset",ratio=(0.7,0.2,0.1),return_df=True)
# If you have mixed Images and Labels in the same directory
df = ys.from_mixed_dir(input_dir="mydataset",ratio=(0.7,0.2,0.1),return_df=True)
# To see train/test/val split size, total error files, all class names from annotation files
ys.info()
# !!! changed show_dataframe to get_dataframe()
# to see dataframe
ys.get_dataframe()
ys.save_split(output_dir="potholes")
Saving New split in 'potholes' dir
100%|██████████| 118/118 [00:00<00:00, 1352.79it/s]
# Use ys.show_show_errors to show filename which have errors
ys.show_errors()
# Use ys.show_dataframe to see dataframe created on the dataset
ys.get_dataframe()
# To see train/test/val split size, total error files, all class names from annotation files
ys.info()
Input Directory
MyDataset/
├── 02.png
├── 02.txt
├── 03.png
├── 03.txt
├── 04.png
├── 04.txt
├── 05.png
├── 05.txt
├── 06.png
├── 06.txt
├── 07.png
├── 07.txt
├── 08.png
├── 08.txt
├── 09.png
├── 09.txt
├── 10.png
├── 10.txt
├── 11.png
└── 11.txt
Output Directory
MyDataset-splitted/
├── data.yaml
├── train
│ ├── images
│ │ ├── 03.png
│ │ ├── 04.png
│ │ ├── 05.png
│ │ ├── 07.png
│ │ ├── 08.png
│ │ ├── 09.png
│ │ └── 10.png
│ └── labels
│ ├── 03.txt
│ ├── 04.txt
│ ├── 05.txt
│ ├── 07.txt
│ ├── 08.txt
│ ├── 09.txt
│ └── 10.txt
└── val
├── images
│ ├── 02.png
│ ├── 06.png
│ └── 11.png
└── labels
├── 02.txt
├── 06.txt
└── 11.txt
Change Log
Stable
-
2023-12-20 version 4.8
- Changed yaml file style
-
2023-12-19 version 4.7
- Fix output dir of
val
tovalid
thanks to [https://github.com/AndreasFridh] - Added
ys.info()
To see train/test/val split size, total error files, all class names from annotation files - Changed
ys.show_dataframe
toys.get_dataframe()
- small bug fixes
- Fix output dir of
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yolosplitter-0.4.8.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for yolosplitter-0.4.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67e5c8364a92bea57a1bd0ffd082da6e962272efb0cf3f78348dffc5aad7f5b6 |
|
MD5 | ce518024b10f1c0f94425b821653ecdb |
|
BLAKE2b-256 | 3b78a2009eca49147bf8a076f545e8c2fa99649caef4ce06ad52e9aea6a58b0e |