-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,33 @@ | ||
The "*datasets.py*" file is a class which implements useful methods | ||
to process files from a given dataset. | ||
|
||
``` | ||
* def createFolder(self, directory): | ||
* def createFolder(self, __directory__): | ||
|
||
creates a Folder at __directory__ | ||
|
||
* def createClassificationFolders(self, directory): | ||
* def createClassificationFolders(self, __directory__): | ||
|
||
creates Folders ranging from 0 to 100 in a given __directory__ | ||
|
||
* def downloadAndUnzip(self, url, target_zip_directory, target_extract_directory): | ||
* def downloadAndUnzip(self, __url__, __target_zip_directory__, __target_extract_directory__): | ||
|
||
downloads file from __url__ into __target_zip_directory__ and extracts | ||
files into target_extract_directory | ||
files into target_extract_directory | ||
|
||
* def readAndPrintDataImagesLAP(self, __image_directory__, __type_set_csv__, __classification_target_directory__): | ||
|
||
* def readAndPrintDataImagesLAP(self, image_directory, type_set_csv, classification_target_directory): | ||
loads LAP dataset images from __image_directory__ and finds the corresponding age | ||
from the csv file located in __image_directory__, split into three __type_set_csv__ (train, valid, test). | ||
These images are written in the correct __classification_target_directory__ | ||
|
||
* def load_images_from_folder(self, folder): | ||
* def load_images_from_folder(self, __folder__): | ||
|
||
loads all images from __folder__ | ||
|
||
* def readAndPrintDataImagesFGNET(self, image_directory, classification_target_directory): | ||
* def readAndPrintDataImagesFGNET(self, __image_directory__, classification_target_directory): | ||
|
||
loads FGNET dataset images from __image_directory__ and finds the corresponding age from the image name. | ||
These images are randomly written into either Train, Test, Valid Classification folder and further into the folders of the corresponding age | ||
|
||
``` | ||
|
||
To add a new dataset, just write a new method readAndPrintDataImagesXXX |