new script to convert a whole folder of Json files to a ready to training dataset #1107
JasgTrilla
started this conversation in
Show and tell
Replies: 1 comment
-
is the "folder_to_dataset.py" script available somewhere to test? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, i have created a variation script of json_to_dataset.py script, i would like make this contribution to the project if you consider it appropriate.
its named "folder_to_dataset.py", it converts not a single json file into dataset, but a whole folder of json files into a ready to training dataset.
OUTPUT: as output it drops the folders "training/images" and "training/labels" with the png files obtained from his correspondent json file, the png files are named as a sequence of numbers started by default from "1"
PARAMETERS: folder_to_dataset.py receives as input the folder which contains the json files you want to convert into dataset, also has an optional parameter named "-startsWith" which sets the first number to start the sequence of png output files.
Example:
the command: "folder_to_dataset.py myJsonsFolderPath" will drop: 1.png, 2.png, 3.png, … in training/images and training/labels folders
the command: "folder_to_dataset.py myJsonsFolderPath -startsWith 5“ will drop: 5.png, 6.png, 7.png, … in training/images and training/labels folders
script features:
*shows dataset building progress by percents
*skip no Json files without interrupt the process
*allows dataset updating by “startsWith” parameter
-the picture “example” shows how the script works
Beta Was this translation helpful? Give feedback.
All reactions