Example #1
0
  def __init__(self, port):

    util_root = '/works/demon_11st/utils'
    sys.path.insert(0, util_root)
    from demon_utils import demon_utils
    app.demon_utils = demon_utils('/storage/enroll')

    vsm_root = '/works/demon_11st/vsm'
    sys.path.insert(0, vsm_root)
    from vsm import vsm
    #import pdb; pdb.set_trace()
    image_sentence_filename = '/storage/attribute/PBrain_all.csv.image_sentence.txt'
    app.vsm = vsm(image_sentence_filename)

    agent_detector_root = '/works/demon_11st/agent/detection'
    sys.path.insert(0, agent_detector_root)
    import _init_paths
    from conf import conf
    from agent_detector import agent_detector
    yaml_file = '/storage/product/detection/11st_All/cfg/faster_rcnn_end2end_test.yml'
    conf = conf(yaml_file, 0)
    app.agent_detector = agent_detector()

    #import pdb; pdb.set_trace()
    agent_attribute_root = '/works/demon_11st/agent/attribute' 
    sys.path.insert(0, agent_attribute_root)
    from agent_attribute import agent_attribute 
    attribute_demon_host_ip = host_ip
    attribute_demon_port= 8080
    app.agent_attribute = agent_attribute( \
      attribute_demon_host_ip, attribute_demon_port)

    app.result_dic = init_result_dic()

    web_server.__init__(self, app, port)
Example #2
0
    def __init__(self, port, net_args, oversample, category_no, max_num_items,
                 database_filename):
        self.net_args = net_args
        self.database_filename = database_filename
        # Initialize classifier
        app.oversample = oversample
        app.agent = agent(**self.net_args)
        logging.info('Initialize vision model done')
        app.agent.net.forward()
        logging.info('Net forward done')
        # Initialize indexer
        app.indexer = indexer(category_no, max_num_items)
        app.indexer.load_category(database_filename)
        logging.info('Initialize indexer done')
        # get parser_utils
        app.parser_utils = parser_utils()
        app.korean_url_handler = korean_url_handler()

        # start web server
        web_server.__init__(self, app, port)
Example #3
0
  def __init__(self, 
    port, 
    net_args, oversample, 
    category_no, max_num_items, database_filename):
    self.net_args = net_args
    self.database_filename = database_filename
    # Initialize classifier
    app.oversample = oversample
    app.agent = agent(**self.net_args)
    logging.info('Initialize vision model done')
    app.agent.net.forward()
    logging.info('Net forward done')
    # Initialize indexer
    app.indexer = indexer(category_no, max_num_items)
    app.indexer.load_category(database_filename)
    logging.info('Initialize indexer done')
    # get parser_utils
    app.parser_utils = parser_utils()
    app.korean_url_handler = korean_url_handler() 

    # start web server
    web_server.__init__(self, app, port)
Example #4
0
  def __init__(self, port):

    util_root = '/works/demon_11st/utils'
    sys.path.insert(0, util_root)
    from exifutil import exifutil
    app.exifutils = exifutil()

    #import pdb; pdb.set_trace()
    agent_root = '/works/demon_11st/agent/detection'
    sys.path.insert(0, agent_root)
    import _init_paths
    from conf import conf
    from agent import agent
    yaml_file = '/storage/product/detection/11st_All/cfg/faster_rcnn_end2end_test.yml'
    conf = conf(yaml_file, 0)
    app.agent = agent()

    from korean_url_handler import korean_url_handler
    app.korean_url_handler = korean_url_handler()

    # start web server
    web_server.__init__(self, app, port)
 def __init__(self, port):
   # start web server
   web_server.__init__(self, app, port)
 def __init__(self, port):
     # start web server
     web_server.__init__(self, app, port)