Folder2Label: Takes label folders for tensor training and stores labels in...

Description Usage Arguments Examples

Description

Files should be sorted in the following order: out_image_path: LabelFolder1: TrueFolder: Image_i.jpg FalseFolder: Image_i.jpg OtherFolder: LabelFolder2: TrueFolder: Image_i.jpg FalseFolder: OtherFolder:

Usage

1
Folder2Label(database, image_path, image_ext = ".jpg", out_image_path)

Arguments

database:

path and name of RDS or dta file as provided by IFPRI with images where labels will be stored

image_ext:

extension type of image for example .jpg

out_image_path:

path of folder where images were sorted for training

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
image_ext = '.jpg'
database = '/media/ssd/Lodging_Classifier/cropmonitor_merged.rds'
out_image_path = '/media/ssd/Lodging_Classifier/sorted'
in_data = Folder2Label(database,image_path,image_ext='.jpg',out_image_path)
saveRDS(in_data,'/media/ssd/Lodging_Classifier/cropmonitor_merged_updated_images.rds')

table(in_data$Lodging)

## End(Not run)

khufkens/cropmonitor documentation built on May 31, 2019, 8:29 a.m.