Ejemplo n.º 1
0
 def startup(self, args={}):
     print('无锡所应用...')
     MMongoDb._initialize()
     run_mode = 1
     if 1 == run_mode:
         #WxsDsm.generate_txt_by_wxs_tds_ok_images()
         WxsDsm.generate_ds_from_wxs_tds_ibc()
     elif 2 == run_mode:
         WxsDsm.generate_wxs_tds_for_integration_test()
Ejemplo n.º 2
0
def main(args):
    MMongoDb._initialize()
    print('细粒度图像识别系统')
    mode = MODE_WXS_BID
    if MODE_DRAW_ACCS_CURVE == mode:
        #du.draw_accs_curve()
        pass
    elif MODE_WXS_BID == mode:
        app = WxsApp()
        app.startup(args)
    elif MODE_DRAW_CAM == mode:
        app = CamApp()
        app.startup(args)
    elif MODE_SIAMESE_NETWORK == mode:
        app = SiameseApp()
        app.startup(args)
    elif MODE_TRAIN_WEB_SERVER == mode:
        print('训练过程...')
    elif MODE_RUN_WEB_SERVER == mode:
        '''
        web_server = WebServer()
        web_server.setDaemon(True)
        web_server.start()
        web_server.join()
        '''
        pass
    elif MODE_TRAIN_MONITOR == mode:
        '''
        web_server = WebServer()
        web_server.setDaemon(True)
        web_server.start()
        # start training process
        for i in range(100):
            try:
                time.sleep(3)
            except:
                print('exceptions... stop thread')
                break
            print('loop_{0}: lr={1};'.format(i, app_store.vars['lr']))
        '''
        pass
    elif MODE_GET_BEST_CHPTS == mode:
        get_best_chpts()
    elif MODE_CREATE_ST_CAR_DS == mode:
        #du.prepare_st_car_ds()
        pass
    elif MODE_VAO_TEST == mode:
        VaoTest.startup()
    elif MODE_DATA_PREPROCESSOR == mode:
        DataPreprocessor.startup()
    elif MODE_DS_MANAGER == mode:
        DsManager.startup()
    elif MODE_CLUSTER_IMAGE == mode:
        app = ClusterApp()
        app.startup()
    elif MODE_LOCAL_STANFORD_CARS == mode:
        DataPreprocessor.startup()
    elif MODE_TEST_MONGODB == mode:
        app = VbgApp()
        app.startup()
    elif MODE_TEST_ADMIN == mode:
        AdminApp.startup()
    elif MODE_TEST_WEB_API == mode:
        test_web_api()
    else:
        print('临时测试程序...')
        temp_func()