<jupyter_start><jupyter_text>Create Data Generatoe<jupyter_code>datagen = SavingDataGen(input_path, 'multi-part', output_path=output_path,
                        split_masks=True, separable_class=False,
                  augmentor_params={
                    'output_type_list': ['multi-object', 'multi-part', 'class'],
                    'overlap_ratio': 0.2,
                    'persp_trans': 0,
                    'max_rotate_degree': 90,
                    'flip_prob': 0.5,
                    'background': 'img',
                    'background_image_list': background_path,
                    'salt': 0.01,
                    'pepper': 0.01,
                    'gauss_var': 0,
                    'smooth_kernel_size': 5,
                    'bboxes': True,
                    'num_classes': 10,
                    'adjust_mask': True,
                    'pad_mask': 10
                })<jupyter_output><empty_output><jupyter_text>Generate some samples to local folder (single for all classes, separate for every mask type)<jupyter_code>n = 100
result = %timeit -n1 -r1 -o datagen.create_dataset(num_samples=n, scene_samples=8)
result.average / n
# !rm -rf './data/output/'<jupyter_output><empty_output><jupyter_text>Generate some samples to local folder (separate for every class, separate for every mask type)<jupyter_code>datagen = SavingDataGen(input_path, 'multi-part', output_path=output_path,
                        split_masks=True, separable_class=True,
                  augmentor_params={
                    'output_type_list': ['multi-object', 'multi-part'],
                    'overlap_ratio': 0,
                    'persp_trans': 0,
                    'max_rotate_degree': 90,
                    'flip_prob': 0.5,
                    'background': 'img',
                    'background_image_list': background_path,
                    'salt': 0.01,
                    'pepper': 0.01,
                    'gauss_var': 1e-5,
                    'smooth_kernel_size': 7,
                    'bboxes': True,
                    'num_classes': 2,
                    'adjust_mask': True,
                    'pad_mask': 10
                })
result = %timeit -n1 -r1 -o datagen.create_dataset(num_samples=n, scene_samples=8)
result.average / n<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10942906574394463, 'fraction_numerical': 0.019896193771626297, 'mean_word_length': 1.6135593220338984, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '609651', 'license': 'MIT', 'n_tokens_mistral': 726, 'n_tokens_neox': 645, 'n_words': 129, 'path': 'Generate_dataset.ipynb', 'repo_name': '1mplex/segmentation_image_augmentation', 'size': '2312'}