import oss2, redis, platform baidu_api = { 'face': { 'app_id': '26878271', 'api_key': '01CQzxLCpGrLjGe2ClKTC8hx', 'secret_key': '56WHgdlEvGG4iA9KAEn51naiXy31ybKa', } } ali_oss = { 'access_key_id': 'LTAI5tSReWm8hz7dSYxxth8f', 'access_key_secret': '8ywTDF9upPAtvgXtLKALY2iMYHIxdS', 'facebody_endpoint': 'facebody.cn-shanghai.aliyuncs.com', 'endpoint': 'oss-cn-shanghai.aliyuncs.com', 'bucket_name': 'suwa3d-securedata', } oss_bucket = oss2.Bucket(oss2.Auth(ali_oss['access_key_id'], ali_oss['access_key_secret']), ali_oss['endpoint'], ali_oss['bucket_name']) redis_remote = redis.Redis(host='106.14.158.208', password='kcV2000', port=6379, db=6) redis_local = redis.Redis(host='172.31.1.254', password='', port=6379, db=0) redis_local_common = redis.Redis(host='172.31.1.254', password='', port=6379, db=1) mysql_local = { "host": '172.31.1.254',#"172.16.20.13", "port": 23306, "user": "pi", "password": "ph2008", "db": "suwa3d", "charset": "utf8mb4" } mysql_gpu = { "host": 'rm-uf64l0683d2t2jt1c3o.mysql.rds.aliyuncs.com', "port": 3306, "user": "airepair", "password": "Ai_repair@suwa3d", "db": "ai_repair", "charset": "utf8" } mysql_dong = { "host": "172.31.1.254", "port": 13306, "user": "api", "password": "api2022", "db": "new_suwa3d", "charset": "utf8mb4" } mysql_task_rc = { "host": '172.31.1.254',#"172.16.20.13", "port": 23306, "user": "pi", "password": "ph2008", "db": "suwa3d", "charset": "utf8mb4" } if platform.system() == 'Windows': workdir = 'D:\\' sharedir = 'E:\\' rcbin = '"C:\\Program Files\\Capturing Reality\\RealityCapture\\RealityCapture.exe"' else: workdir = '/data/datasets/' urls = { 'update_status_modeling_url': 'https://mp.api.suwa3d.com/api/customerP3dLog/toModeling', 'update_status_modelsuccess_url': 'https://repair.api.suwa3d.com/api/modelRepairOrder/toModelMakeSucceed', 'update_status_modelfailed_url': 'https://mp.api.suwa3d.com/api/customerP3dLog/toModelMakeFailed', 'get_psid_url': 'https://mp.api.suwa3d.com/api/customerP3dLog/photoStudio', 'get_printinfo_url': 'https://mp.api.suwa3d.com/api/customerP3dLog/printInfo', 'update_status_printstatus_url': 'https://mp.api.suwa3d.com/api/customerP3dLog/updateBuildPrintModelStatus', 'get_ps_adjust_photo_para_url': 'https://mp.api.suwa3d.com/api/equipment/configForColor', 'get_ps_type_url' : 'https://mp.api.suwa3d.com/api/takephotoOrder/photoStudioInfo', 'get_printsize_url' : 'https://mp.api.suwa3d.com/api/printOrder/info', 'upload_model_info_url' : 'https://mp.api.suwa3d.com/api/physical/add', } r = { "setTextureTrue" : "-selectAllImages -enableTexturingAndColoring true", "setTextureFalse" : "-selectAllImages -enableTexturingAndColoring false", } r1 = { "init" : "-disableOnlineCommunication -set \"sfmEnableCameraPrior=False\" -set \"sfmMaxFeaturesPerMpx=20000\" -set \"sfmMaxFeaturesPerImage=200000\" -set \"sfmImagesOverlap=High\" -set \"sfmMaxFeatureReprojectionError=1\"", } r2 = { "init" : "-disableOnlineCommunication -setProjectCoordinateSystem Local:1 -setOutputCoordinateSystem epsg:4326 -set \"sfmEnableCameraPrior=False\" -set \"sfmMaxFeaturesPerMpx=20000\" -set \"sfmMaxFeaturesPerImage=200000\" -set \"sfmImagesOverlap=High\" -set \"sfmMaxFeatureReprojectionError=1\"", "setRegion" : "-setReconstructionRegionOnCPs 36h11:001 36h11:002 36h11:003 2.1 -moveReconstructionRegion 0 0 -2.1 -rotateReconstructionRegion 180 0 180 -setGroundPlaneFromReconstructionRegion -scaleReconstructionRegion 1.8 1.6 2.1 absolute center -moveReconstructionRegion 0 0 0.0025" } #修改为走数据库配置 # 影棚地贴版本定义 # floor_sticker_distances = { # # 影棚地贴版本1:老圆形影棚,二维码排序1、2、3、4、1,间距1米 # "v1" : "36h11:001 36h11:002 1;36h11:002 36h11:003 1;36h11:003 36h11:004 1;36h11:004 36h11:001 1", # # 影棚地贴版本2:新方形影棚,二维码排序1、2、4、3、1,间距1米 default # "v2" : "36h11:001 36h11:002 1;36h11:002 36h11:004 1;36h11:004 36h11:003 1;36h11:003 36h11:001 1", # # 影棚地贴版本3:新圆形影棚,二维码排序1、2、4、3、1,间距1.5米 # "v3" : "36h11:001 36h11:002 1.5;36h11:002 36h11:004 1.5;36h11:004 36h11:003 1.5;36h11:003 36h11:001 1.5", # # 影棚地贴版本4:新方形影棚,二维码排序5、6,间距0.21米 # "v4" : "36h11:005 36h11:006 0.21", # # 影棚地贴版本5:新方形影棚,二维码排序7、8,间距0.21米 # "v5" : "36h11:007 36h11:008 0.21" # } #修改为走数据库配置 # 影棚与地贴版本配置关系 # ps_floor_sticker = { # "default" : floor_sticker_distances['v5'], # "29" : floor_sticker_distances['v1'], # "44" : floor_sticker_distances['v2'], # "54" : floor_sticker_distances['v2'], # "77" : floor_sticker_distances['v2'], # "79" : floor_sticker_distances['v2'], # "80" : floor_sticker_distances['v2'], # "85" : floor_sticker_distances['v4'], # } # 需要加入新建模系统的影棚 #new_make_psids = ['1', '17', '29', '44', '54', '55', '63', '65', '77', '79', '80', '85', '86'] #企业微信通知人员 notify_user_Ids = ["DongZhangXi"] #任务运行超时时间设定 ,单位秒 task_run_timeout = { "R11":{ "all":60*40, "step1":60*4, "step2":60*12, "step3":60*12, }, "R12":{ "all":60*40, "step1":60*4, "step2":60*12, "step3":60*12, }, "R13":{ "step2":60*12, "step3":60*12, }, "R14":{ "step2":60*12, "step3":60*12, }, "R15":{ "step2":60*12, "step3":60*12, }, "R16":{ "step2":60*12, "step3":60*12, }, "R17":{ "step2":60*12, "step3":60*12, }, } high_host = ["R11","R12"] low_host = ["R13","R14","R15","R16","R17"] #不参与贴图的照片,使用的时候还需要增加指令 python main_step1.py 123 no_texture noTextureColorPics = ["13", "23", "31", "52", "72", "82", "142", "173"] #["134","135","136","142","143","14","15","16","24","25","26","44","45"]