'Split a big json file into three small json files that compatible with the image names in three folders(test,train and val)
I am new in working with deep learning which required three main folders(train,test and val) that contains images with annotation.
the annotation will be in form of coco which could be written in a json file. each folder should have its own json file , that contains information regards images inside the folder with annotations.
I have a folder with around 2800 images ,and one json file.
i want to split them into 3 folders as above with ratio of 80% train , 10% test and 10% val
I used this code for that:
import annotated_images
RANDOM_SEED=1337
IMG_PATH= '/content/Untitled Folder/'
annotated-images.split(IMG_PATH, output="/new_dataset/", seed=1337, ratio=(.8, .1, .1))
but i don't know how to split and separate the json file accordingly.
any help , i will appreciate it
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
