@@ -587,11 +587,11 @@ def parseCommandLineArgs():
587587 parser .add_argument ('--trainFrameFirst' , type = int , default = 1 ,
588588 help = 'specify the number of the first frame used for training' )
589589 parser .add_argument ('--trainFrameLast' , type = int , default = 140 ,
590- help = 'specify the number of the last frame used for training' )
590+ help = 'specify the number of the last frame (exclusive) used for training' )
591591 parser .add_argument ('--validationFrameFirst' , type = int , default = 141 ,
592592 help = 'specify the number of the first frame used for validation' )
593593 parser .add_argument ('--validationFrameLast' , type = int , default = 150 ,
594- help = 'specify the number of the last frame used for validation' )
594+ help = 'specify the number of the last frame (exclusive) used for validation' )
595595 parser .add_argument ('--paramFile' , type = Path , default = None ,
596596 help = '''
597597 specify the path to the parameter txt file, the parent
@@ -622,6 +622,18 @@ def checkCommandLineArgs(args):
622622 print (f"parameter file { args .paramFile } does not exist... exiting" )
623623 sys .exit ()
624624
625+ if args .trainFrameFirst == 0 or args .validationFrameFirst == 0 :
626+ print (f"frame 0 does not contain valid data... exiting" )
627+ sys .exit ()
628+
629+ if args .trainFrameLast <= args .trainFrameFirst :
630+ print (f"training frame range isn't valid... exiting" )
631+ sys .exit ()
632+
633+ if args .validationFrameLast <= args .validationFrameFirst :
634+ print (f"validation frame range isn't valid... exiting" )
635+ sys .exit ()
636+
625637def main ():
626638 args = parseCommandLineArgs ()
627639 checkCommandLineArgs (args )
0 commit comments