<jupyter_start><jupyter_text>Detect faces from source images and save them to one folder<jupyter_code>path_out = 'test'
path_to_annotations = 'test/annotations.csv'
predictor_path = 'dlib_landmarks_predictor/shape_predictor_68_face_landmarks.dat'

# process_folder('archive/source/faces_pytorch/images/', path_out, path_to_annotations, predictor_path)
# process_folder('example_data/images/', path_out, path_to_annotations, predictor_path)
# process_folder('faces_pytorch/images/', path_out, path_to_annotations, predictor_path)b<jupyter_output><empty_output><jupyter_text>Manualy label faces, extracted from source images<jupyter_code>label_images('data/images/', 'data/annotations.csv')<jupyter_output><empty_output><jupyter_text>Explore the dataset<jupyter_code>imgs = ImageList('data/images/', 'data/annotations.csv', default_type='numpy')
imgs.viewer()<jupyter_output><empty_output><jupyter_text>Distribute images to class folders, according to labels<jupyter_code># Categorical classes:
distribute_by_class('./data/images/', './data/datasets/categorical/', './data/annotations.csv', mode='categorical')
# Binary classes for 2 problems
distribute_by_class('./data/images/', './data/datasets/binary', './data/annotations.csv', mode='binary')<jupyter_output>Class statistics:
smile:
	calm: 672 images
	smile: 193 images
mouth:
	closed: 509 images
	open: 356 images
{'fraction_non_alphanumeric': 0.1258229700073153, 'fraction_numerical': 0.010972933430870519, 'mean_word_length': 8.985401459854014, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '493891', 'license': 'MIT', 'n_tokens_mistral': 475, 'n_tokens_neox': 458, 'n_words': 78, 'path': 'preprocess_and_label.ipynb', 'repo_name': 'fantopop/smile-detection', 'size': '1367'}