Merge Datasets
Combine multiple synthetic datasets into one
Arguments:
Example Use:
from lexset.LexsetManager import merge_datasets
# Define the directories containing your COCO JSON files and images
# add as many as you like
json_dirs = ["D:/<path 1>", "D:/<path 2>"]
# Define the percentage of data to keep from each directory
percentages = [50, 50] # 50% from the first directory, 60% from the second
# Define paths to output JSON and image directory
output_json_path = "D:/<path 3>/coco_annotations.json"
output_img_dir = "D:/<path 3>/"
# Merge the datasets
merge_datasets(json_dirs, percentages, output_json_path, output_img_dir)Last updated