#from object_recognition import dbtools, models, capture, observations from mmod import MModTester N_LEVEL_MAX = 2 if "__main__" == __name__: ''' Run mmod testing ''' plasm = ecto.Plasm() parser = ArgumentParser() argv = sys.argv # add arguments for the source and sink Sink.add_arguments(parser) params, args, pipeline_params, do_display, db_params, db = read_arguments(parser, argv[1:]) model_ids = [] object_ids = set() for object_id in params['object_ids']: for model_id in models.find_model_for_object(db, object_id, 'MMOD'): model_ids.append(str(model_id)) object_ids.add(object_id) model_documents = DbDocuments(db_params, model_ids) # TODO handle this properly... ecto_ros.init(argv, "mmod_testing", False)#not anonymous. source = Source.parse_arguments(params['source'])
from object_recognition.common.io.source import Source from object_recognition.tod.detector import TodDetector DEBUG = False DISPLAY = True PoseArrayPub = ecto_geometry_msgs.Publisher_PoseArray ######################################################################################################################## if __name__ == '__main__': plasm = ecto.Plasm() source = Source(plasm) masker = Masker(plasm) sink = Sink(plasm) parser = ArgumentParser() # add arguments for the source source.add_arguments(parser) # add arguments for the sink sink.add_arguments(parser) parser.add_argument("-b", "--bag", dest="bag", help="The bag to analyze") parser.add_argument("-c", "--config_file", dest="config_file", help='the file containing the configuration as JSON. It should contain the following fields.\n' '"feature_descriptor": with parameters for "combination", "feature" and "descriptor".\n' '"db": parameters about the db: "type", "url".\n' '"objects_ids": the list of object to process, e.g. ["amys_country_cheddar_bowl",' '"band_aid_plastic_strips"]\n'
def sink(self, sink_params, object_ids, db_params): return Sink.parse_arguments(sink_params, db_params, object_ids)
#from object_recognition import dbtools, models, capture, observations from mmod import MModTester N_LEVEL_MAX = 2 if "__main__" == __name__: ''' Run mmod testing ''' plasm = ecto.Plasm() parser = ArgumentParser() argv = sys.argv # add arguments for the source and sink Sink.add_arguments(parser) params, args, pipeline_params, do_display, db_params, db = read_arguments( parser, argv[1:]) model_ids = [] object_ids = set() for object_id in params['object_ids']: for model_id in models.find_model_for_object(db, object_id, 'MMOD'): model_ids.append(str(model_id)) object_ids.add(object_id) model_documents = DbDocuments(db_params, model_ids) # TODO handle this properly... ecto_ros.init(argv, "mmod_testing", False) #not anonymous.