#parser.add_argument('--product', #dest='product', #default=False, #action="store_true", #help='Use product as additional feature') parser.add_argument('--save', help='Save training results in a file') parser.add_argument('--load', help='Load training results from a file') options = parser.parse_args() return options if __name__ == "__main__": history = minc.format_history(sys.argv) options = parse_options() # load prior and input image if (options.prior is not None or options.load is not None) and options.image is not None: if options.debug: print("Loading images...") # convert to float as we go #images= [ minc.Image(i).data.astype(np.float32) for i in options.image ] image = minc.Image(options.image).data.astype(np.float32) if options.debug: print("Done") clf = None
default=False, help='Use image coordinates as additional features' ) parser.add_argument('--random', type=int, dest="random", help='Provide random state if needed' ) parser.add_argument('--save',help='Save training results in a file') parser.add_argument('--load',help='Load training results from a file') options = parser.parse_args() return options if __name__ == "__main__": history=minc.format_history(sys.argv) options = parse_options() #print(repr(options)) # load prior and input image if (options.prior is not None or options.load is not None) and options.image is not None: if options.debug: print("Loading images...") images= [ minc.Image(i).data for i in options.image ] if options.coord: # add features dependant on coordinates c=np.mgrid[0:images[0].shape[0] , 0:images[0].shape[1] , 0:images[0].shape[2]]