Beispiel #1
0
import sys
import time

# add module path
script_path = os.path.dirname(os.path.realpath(__file__))
module_path = os.path.join(script_path, "myutils")
sys.path.append(module_path)

# my modules
from create_dataset_utils import DSUtils


# main function
if __name__ == '__main__':
    argv = sys.argv
    argc = len(argv)

    if argc != 2:
        print("Error: The number of arguments must be one.")
        print("arg 1: The images directory path.")
        sys.exit(1)

    input_path = os.path.normpath(argv[1])
    if not os.path.exists(os.path.join(os.getcwd(), input_path)):
        print("Error: Inputted path doesn't exist.")
        sys.exit(1)

    ds = DSUtils()
    ds.img_split_augmentation(input_path, "heavy")

Beispiel #2
0
import sys
import time

# add module path
script_path = os.path.dirname(os.path.realpath(__file__))
module_path = os.path.join(script_path, "myutils")
sys.path.append(module_path)

# my modules
from create_dataset_utils import DSUtils


# main function
if __name__ == '__main__':
    argv = sys.argv
    argc = len(argv)

    if argc != 2:
        print("Error: The number of arguments must be one.")
        print("arg 1: The images directory path.")
        sys.exit(1)

    input_path = os.path.normpath(argv[1])
    if not os.path.exists(os.path.join(os.getcwd(), input_path)):
        print("Error: Inputted path doesn't exist.")
        sys.exit(1)

    ds = DSUtils()
    ds.img_split_augmentation(input_path, "light")