You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I attempted to train a custom dataset and run create_from_images.py.
And I met with the error when running create_from_images.py, here is the code:
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--C:/Users/xxxx/PycharmProjects/co-mod-gan/generated_TFRecord', help='Output directory of generated TFRecord', required=True)
parser.add_argument('--D:/xxxx/co-mod-gan/validation_set', help='Root directory of validation images', default=None)
parser.add_argument('--D:/xxxx/co-mod-gan/training_set', help='Root directory of training images', default=None)
parser.add_argument('--resolution', help='Target resolution', type=int, default=512)
parser.add_argument('--num-channels', help='Number of channels of images', type=int, default=3)
parser.add_argument('--num-processes', help='Number of parallel processes', type=int, default=8)
parser.add_argument('--shuffle', default=False, action='store_true')
parser.add_argument('--compressed', default=False, action='store_true')
parser.add_argument('--pix2pix', default=False, action='store_true')
args = parser.parse_args()
create_from_images(**vars(args))
if __name__ == "__main__":
main()
It is giving error:
usage: create_from_images.py [-h]
--C:\Users\xxxx\PycharmProjects\co-mod-gan\generated_TFRecord
C:\USERS\xxxx\PYCHARMPROJECTS\CO_MOD_GAN\GENERATED_TFRECORD
[--D:\xxxx\co-mod-gan\validation_set D:\FYP\CO_MOD_GAN\VALIDATION_SET]
[--D:\xxxx\co-mod-gan\training_set D:\FYP\CO_MOD_GAN\TRAINING_SET]
[--resolution RESOLUTION]
[--num-channels NUM_CHANNELS]
[--num-processes NUM_PROCESSES] [--shuffle]
[--compressed] [--pix2pix]
create_from_images.py: error: the following arguments are required: --C:\Users\xxxx\PycharmProjects\co-mod-gan\generated_TFRecord
And if -- deleted,
parser.add_argument('C:/Users/xxxx/PycharmProjects/co-mod-gan/generated_TFRecord', help='Output directory of generated TFRecord', required=True)
parser.add_argument('D:/xxxx/co-mod-gan/validation_set', help='Root directory of validation images', default=None)
parser.add_argument('D:/xxxx/co-mod-gan/training_set', help='Root directory of training images', default=None)
Another error occurs:
Traceback (most recent call last):
File "C:/Users/xxxx/PycharmProjects/co-mod-gan/dataset_tools/create_from_images.py", line 101, in <module>
main()
File "C:/Users/xxxx/PycharmProjects/co-mod-gan/dataset_tools/create_from_images.py", line 86, in main
parser.add_argument('C:/Users/keker/PycharmProjects/co-mod-gan/generated_TFRecord', help='Output directory of generated TFRecord', required=True)
File "C:\ProgramData\Anaconda3\envs\co-mod-gan\lib\argparse.py", line 1320, in add_argument
kwargs = self._get_positional_kwargs(*args, **kwargs)
File "C:\ProgramData\Anaconda3\envs\co-mod-gan\lib\argparse.py", line 1432, in _get_positional_kwargs
raise TypeError(msg)
TypeError: 'required' is an invalid argument for positionals
Would you please help me point what am I doing wrong here? Thank you very much.
I'm new to programming and really appreciate any of your help :)
The text was updated successfully, but these errors were encountered:
Hi all, I attempted to train a custom dataset and run create_from_images.py.
And I met with the error when running create_from_images.py, here is the code:
It is giving error:
And if
--
deleted,Another error occurs:
Would you please help me point what am I doing wrong here? Thank you very much.
I'm new to programming and really appreciate any of your help :)
The text was updated successfully, but these errors were encountered: