4 Commits
master ... test

Author SHA1 Message Date
b3b7171c8b testupdate 2022-12-14 15:23:09 +08:00
0f3433ece9 update 2022-12-05 17:55:50 +08:00
3d6223e1da update 2022-12-05 16:21:01 +08:00
b224d1bbfa test push 2022-11-30 08:59:03 +08:00
2 changed files with 18 additions and 17 deletions

View File

@ -51,8 +51,9 @@ _C.fgbgmask_old = '../module/ieemoo-ai-searchv2/model/now/ori_old.jpg'
_C.URL = 'https://api.ieemoo.com/emoo-api/intelligence' #online
#_C.URL = 'http://api.test.ieemoo.com/emoo-api/intelligence'
#_C.Vre = 'http://api.test2.ieemoo.cn/emoo-api/intelligence/queryVideoCompareResult.do'
_C.Vre = 'https://api.ieemoo.com/emoo-api/intelligence/queryVideoCompareResult.do' #online
_C.VreTest = 'http://api.test.ieemoo.cn/emoo-api/intelligence/queryVideoCompareResult.do'
_C.VreTest2 = 'http://api.test2.ieemoo.cn/emoo-api/intelligence/queryVideoCompareResult.do'
#_C.Vre = 'https://api.ieemoo.com/emoo-api/intelligence/queryVideoCompareResult.do' #online
_C.Ocrimg = '../module/ieemoo-ai-assist/imgs'#post ocr img
_C.Ocrtxt = '../module/ieemoo-ai-assist/document'#post ocr txts

View File

@ -17,6 +17,8 @@ def AddObs(file_path, status):
with lock:
if not cfg.flag:
addobs(file_path, status)
os.remove(file_path)
else:
if status == '02':
addobs(file_path, status)
@ -26,22 +28,20 @@ def AddObs(file_path, status):
shutil.move(file_path, f_dst)
def addobs(file_path, status): #save videos
ti.sleep(3)
num = 0
ti.sleep(5)
videoUuid = os.path.basename(file_path).split('_')[1]
json_data = {'videoUuid': videoUuid}
resp = requests.post(url=cfg.Vre,
data=json_data)
status = resp.json()
if not 'data' in status:#延迟设置
while num < 20:
ti.sleep(2)
num += 1
resp = requests.post(url=cfg.Vre, data=json_data)
status = resp.json()
if not 'data' in status:
continue
else:break
for vre in [cfg.VreTest, cfg.VreTest2]:
resp = requests.post(url=vre, data=json_data)
status = resp.json()
if not 'data' in status:#延迟设置
ti.sleep(10)
resp = requests.post(url=cfg.Vre, data=json_data)
status = resp.json()
if 'data' in status:
break
else:
break
status = status['data']
objectkey = os.path.basename(file_path)
@ -49,7 +49,7 @@ def addobs(file_path, status): #save videos
if objectkey.split('.')[-1] in ['avi','mp4']:
objectkey = 'videos/'+time+'/'+status+'/'+status+'_'+objectkey
resp = obsClient.putFile(bucketName, objectkey, file_path)
os.remove(file_path)
#os.remove(file_path)
def Addimg(uuid_barcode):
time = uuid_barcode.split('-')[0].split('_')[-1]