args = parser.parse_args()
if not os.path.exists(args.imgdir):
raise IOError("Directory does not exist: {0}".format(args.imgdir))
if not os.path.exists(args.maskdir):
raise IOError("Directory does not exist: {0}".format(args.maskdir))
if args.method not in methods:
After Change
help="Input file containing a table of pixel RGB values sampled for each input class.",
required=True)
nbm_cmd.add_argument("-o", "--outfile", help="Trained classifier output filename.", required=True)
nbm_cmd.add_argument("-p", "--plots", help="Make output plots.", default=False, action="store_true")
nbm_cmd.set_defaults(func=run_naive_bayes_multiclass)
// Parse command-line options
args = parser.parse_args()