Exemplo n.º 1
0
def main():
    parser = cfgparser('config.ini')

    cemaden_sta_data, cemaden_plot_paths = None, None
    if parser.get('files', 'cemaden') != 'None':
        print('Cemaden...', end='')
        cemaden_sta_data, cemaden_plot_paths = run_cemaden(parser)
        print('OK')

    inmet_sta_data, inmet_plot_paths = None, None
    if parser.get('files', 'inmet') != 'None':
        print('Inmet...', end='')
        inmet_sta_data, inmet_plot_paths = run_inmet(parser)
        print('OK')

    print('Writing PDF...', end='')
    writePDF(parser, cemaden_sta_data, cemaden_plot_paths, inmet_sta_data,
             inmet_plot_paths)
    print('OK')

    print('Cleaning tmp...', end='')
    clean_tmp()
    print('OK\n')
Exemplo n.º 2
0
 def tearDown(self):
     remove_folder(self.dataset_name)
     clean_tmp(self.tmp_path)
Exemplo n.º 3
0
from labelbox_interface import LabelBoxInterface
from pascal_dataset_maker import PascalDatasetWriter
from data_augmentation import PascalDataAugmenter
from utils import clean_tmp

if __name__ == "__main__":
    # # Test creating pascal dataset from label box
    # TEST_FILE = 'test_files/test_dataset.json'
    # TMP_FOLDER = 'tmp'
    # kjn = LabelBoxInterface()
    # test_data = kjn.get_data(TEST_FILE)
    # kjn1 = PascalDatasetWriter()
    # kjn1.abstract_make_dataset(data=test_data, base_path='', dataset_name='test')
    # clean_tmp(TMP_FOLDER)

    # Test argument pascal dataset from label box
    TEST_FILE = 'test_files/test_dataset2.json'
    TMP_FOLDER = 'tmp'
    BACKGROUND_IMAGES = 'test_files/random_background_images'
    clean_tmp(TMP_FOLDER)
    kjn = LabelBoxInterface()
    test_data = kjn.get_data(TEST_FILE)
    kjn1 = PascalDataAugmenter()
    kjn1.argument_data(data=test_data,
                       base_path='',
                       dataset_name='biedronak3',
                       image_limit_count=1000,
                       background_images_folder=BACKGROUND_IMAGES)
    clean_tmp(TMP_FOLDER)