Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

face mask detection perameter #3

Open
clownpreet22 opened this issue Jul 2, 2020 · 14 comments
Open

face mask detection perameter #3

clownpreet22 opened this issue Jul 2, 2020 · 14 comments

Comments

@clownpreet22
Copy link

what would be the perameter of this fun
def split_data(SOURCE, TRAINING, TESTING, SPLIT_SIZE):
dataset = []

for unitData in os.listdir(SOURCE):
    data = SOURCE + unitData
    if(os.path.getsize(data) > 0):
        dataset.append(unitData)
    else:
        print('Skipped ' + unitData)
        print('Invalid file i.e zero size')

train_set_length = int(len(dataset) * SPLIT_SIZE)
test_set_length = int(len(dataset) - train_set_length)
shuffled_set = random.sample(dataset, len(dataset))
train_set = dataset[0:train_set_length]
test_set = dataset[-test_set_length:]
   
for unitData in train_set:
    temp_train_set = SOURCE + unitData
    final_train_set = TRAINING + unitData
    copyfile(temp_train_set, final_train_set)

for unitData in test_set:
    temp_test_set = SOURCE + unitData
    final_test_set = TESTING + unitData
    copyfile(temp_test_set, final_test_set)

YES_SOURCE_DIR = "dest_folder/val/yes/"
TRAINING_YES_DIR = "dest_folder/train/yes/"
TESTING_YES_DIR = "dest_folder/test/yes/"
NO_SOURCE_DIR = "dest_folder/val/no/"
TRAINING_NO_DIR = "dest_folder/val/no/"
TESTING_NO_DIR = "dest_folder/test/no/"
split_size = .8
split_data(YES_SOURCE_DIR, TRAINING_YES_DIR, TESTING_YES_DIR, split_size)
split_data(NO_SOURCE_DIR, TRAINING_NO_DIR, TESTING_NO_DIR, split_size)
location of dataset

@RAVIKIRAN-DHULIPALA
Copy link

RAVIKIRAN-DHULIPALA commented Jul 2, 2020 via email

@clownpreet22
Copy link
Author

clownpreet22 commented Jul 2, 2020 via email

@RAVIKIRAN-DHULIPALA
Copy link

RAVIKIRAN-DHULIPALA commented Jul 2, 2020 via email

@clownpreet22
Copy link
Author

clownpreet22 commented Jul 2, 2020 via email

@clownpreet22
Copy link
Author

clownpreet22 commented Jul 2, 2020 via email

@RAVIKIRAN-DHULIPALA
Copy link

RAVIKIRAN-DHULIPALA commented Jul 2, 2020 via email

@clownpreet22
Copy link
Author

clownpreet22 commented Jul 2, 2020 via email

@RAVIKIRAN-DHULIPALA
Copy link

RAVIKIRAN-DHULIPALA commented Jul 3, 2020 via email

@clownpreet22
Copy link
Author

clownpreet22 commented Jul 3, 2020 via email

@RAVIKIRAN-DHULIPALA
Copy link

I'm sorry I couldn't find any images

@clownpreet22
Copy link
Author

clownpreet22 commented Jul 3, 2020 via email

@RAVIKIRAN-DHULIPALA
Copy link

RAVIKIRAN-DHULIPALA commented Jul 3, 2020 via email

@clownpreet22
Copy link
Author

clownpreet22 commented Jul 3, 2020 via email

@vinayakpandi
Copy link

@clownpreet22 - Were you able to resolve the shape issue...if so could you please guide me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants