Reputation: 25
I have a dataset for sign language. The dataset has been stored in subdirectory as below. This because the different data is been generated for same label.
This folder is been annotated in .csv file with columns 'Sentence' and 'Path of video', where images are the frames of the video dataset.
Frames of each video dataset are stored as .jpg file. The structure of directory is like:
| |---- ALL THE ABOVE --|--- 1 --- filename1.jpg | | --- filename2.jpg | |----2 --- filename1.jpg | --- filename2.jpg |---- ALL IS WELL -----|----1 --- filename1.jpg | | --- filename2.jpg | |----2 --- filename1.jpg | --- filename2.jpg
The total number of folders are 101 and labels are 22.
But the problem is, how to import the images into model recursively using tensorflow and split this data folder into training dataset, and testing dataset in tensorflow where I need to import every frame from directory. And Second question (Sorry if it silly but i need to know), how to use this .csv file (which consists its label and path of file in it) into the model
I would be thankful if anyone clear my doubts and confusion. Please apologize me if any grammatical error.
thank you all
Upvotes: 0
Views: 841
Reputation: 53
I suggest the following function tf.keras.utils.image_dataset_from_directory. You can choose whether you want to infer the labels or not.
Upvotes: 0