edgeupdate
This commit is contained in:
@ -25,7 +25,7 @@ if SW_SERVER and SW_SERVICE_NAME:
|
|||||||
config.init() #采集服务的地址,给自己的服务起个名称
|
config.init() #采集服务的地址,给自己的服务起个名称
|
||||||
#config.init(collector="123.60.56.51:11800", service='ieemoo-ai-search') #采集服务的地址,给自己的服务起个名称
|
#config.init(collector="123.60.56.51:11800", service='ieemoo-ai-search') #采集服务的地址,给自己的服务起个名称
|
||||||
agent.start()
|
agent.start()
|
||||||
os.environ["CUDA_VISIBLE_DEVICES"] = '0'
|
os.environ["CUDA_VISIBLE_DEVICES"] = '1'
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@ -51,8 +51,8 @@ _C.fgbgmask_old = '../module/ieemoo-ai-searchv2/model/now/ori_old.jpg'
|
|||||||
_C.URL = 'https://api.ieemoo.com/emoo-api/intelligence' #online
|
_C.URL = 'https://api.ieemoo.com/emoo-api/intelligence' #online
|
||||||
#_C.URL = 'http://api.test.ieemoo.com/emoo-api/intelligence'
|
#_C.URL = 'http://api.test.ieemoo.com/emoo-api/intelligence'
|
||||||
|
|
||||||
_C.VreTest = 'http://api.test.ieemoo.cn/emoo-api/intelligence/queryVideoCompareResult.do'
|
_C.VreTest = 'http://api.test.ieemoo.cn/emoo-api/intelligence/queryVideoCompareResult.do' #test
|
||||||
_C.VreTest2 = 'http://api.test2.ieemoo.cn/emoo-api/intelligence/queryVideoCompareResult.do'
|
_C.VreTest2 = 'http://api.test2.ieemoo.cn/emoo-api/intelligence/queryVideoCompareResult.do' #test2
|
||||||
_C.Vre = 'https://api.ieemoo.com/emoo-api/intelligence/queryVideoCompareResult.do' #online
|
_C.Vre = 'https://api.ieemoo.com/emoo-api/intelligence/queryVideoCompareResult.do' #online
|
||||||
|
|
||||||
_C.backups = '../module/output/videos'
|
_C.backups = '../module/output/videos'
|
||||||
|
@ -30,12 +30,12 @@ def addobs(file_path, status): #save videos
|
|||||||
ti.sleep(5)
|
ti.sleep(5)
|
||||||
videoUuid = os.path.basename(file_path).split('_')[1]
|
videoUuid = os.path.basename(file_path).split('_')[1]
|
||||||
json_data = {'videoUuid': videoUuid}
|
json_data = {'videoUuid': videoUuid}
|
||||||
for vre in [cfg.Vre]:#[cfg.VreTest, cfg.VreTest2, cfg.Vre]:
|
for vre in [cfg.VreTest, cfg.VreTest2, cfg.Vre]:
|
||||||
resp = requests.post(url=vre, data=json_data)
|
resp = requests.post(url=vre, data=json_data)
|
||||||
status = resp.json()
|
status = resp.json()
|
||||||
if not 'data' in status:#延迟设置
|
if not 'data' in status:#延迟设置
|
||||||
ti.sleep(15)
|
ti.sleep(15)
|
||||||
resp = requests.post(url=cfg.Vre, data=json_data)
|
resp = requests.post(url=Vre, data=json_data)
|
||||||
status = resp.json()
|
status = resp.json()
|
||||||
if 'data' in status:
|
if 'data' in status:
|
||||||
break
|
break
|
||||||
@ -53,6 +53,7 @@ def addobs(file_path, status): #save videos
|
|||||||
objectkey = 'videos/'+time+'/'+status+'/'+status+'_'+objectkey
|
objectkey = 'videos/'+time+'/'+status+'/'+status+'_'+objectkey
|
||||||
if status == '02' or status_:
|
if status == '02' or status_:
|
||||||
resp = obsClient.putFile(bucketName, objectkey, file_path)
|
resp = obsClient.putFile(bucketName, objectkey, file_path)
|
||||||
|
#print('>>>>>>>>>>>>>>', file_path, backups_path)
|
||||||
shutil.move(file_path, backups_path)
|
shutil.move(file_path, backups_path)
|
||||||
#os.remove(file_path)
|
#os.remove(file_path)
|
||||||
|
|
||||||
@ -76,7 +77,8 @@ def Addimg_content(uuid_barcode, context):
|
|||||||
def get_weightStatus(uuid):
|
def get_weightStatus(uuid):
|
||||||
uuid = uuid.split('_')[1]
|
uuid = uuid.split('_')[1]
|
||||||
resp = requests.post(url = cfg.riskControl)
|
resp = requests.post(url = cfg.riskControl)
|
||||||
up_uuid = resp['data']
|
up_uuid = resp.json()['data']
|
||||||
|
#print('>>>>>>>>>>>>>',up_uuid)
|
||||||
if uuid in up_uuid:
|
if uuid in up_uuid:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
Reference in New Issue
Block a user