Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
b3b7171c8b | |||
0f3433ece9 | |||
3d6223e1da | |||
b224d1bbfa |
@ -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 = '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.Vre = 'http://api.test2.ieemoo.cn/emoo-api/intelligence/queryVideoCompareResult.do'
|
_C.VreTest = 'http://api.test.ieemoo.cn/emoo-api/intelligence/queryVideoCompareResult.do'
|
||||||
_C.Vre = 'https://api.ieemoo.com/emoo-api/intelligence/queryVideoCompareResult.do' #online
|
_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.Ocrimg = '../module/ieemoo-ai-assist/imgs'#post ocr img
|
||||||
_C.Ocrtxt = '../module/ieemoo-ai-assist/document'#post ocr txts
|
_C.Ocrtxt = '../module/ieemoo-ai-assist/document'#post ocr txts
|
||||||
|
@ -17,6 +17,8 @@ def AddObs(file_path, status):
|
|||||||
with lock:
|
with lock:
|
||||||
if not cfg.flag:
|
if not cfg.flag:
|
||||||
addobs(file_path, status)
|
addobs(file_path, status)
|
||||||
|
os.remove(file_path)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if status == '02':
|
if status == '02':
|
||||||
addobs(file_path, status)
|
addobs(file_path, status)
|
||||||
@ -26,22 +28,20 @@ def AddObs(file_path, status):
|
|||||||
shutil.move(file_path, f_dst)
|
shutil.move(file_path, f_dst)
|
||||||
|
|
||||||
def addobs(file_path, status): #save videos
|
def addobs(file_path, status): #save videos
|
||||||
ti.sleep(3)
|
ti.sleep(5)
|
||||||
num = 0
|
|
||||||
videoUuid = os.path.basename(file_path).split('_')[1]
|
videoUuid = os.path.basename(file_path).split('_')[1]
|
||||||
json_data = {'videoUuid': videoUuid}
|
json_data = {'videoUuid': videoUuid}
|
||||||
resp = requests.post(url=cfg.Vre,
|
for vre in [cfg.VreTest, cfg.VreTest2]:
|
||||||
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:#延迟设置
|
||||||
while num < 20:
|
ti.sleep(10)
|
||||||
ti.sleep(2)
|
resp = requests.post(url=cfg.Vre, data=json_data)
|
||||||
num += 1
|
status = resp.json()
|
||||||
resp = requests.post(url=cfg.Vre, data=json_data)
|
if 'data' in status:
|
||||||
status = resp.json()
|
break
|
||||||
if not 'data' in status:
|
else:
|
||||||
continue
|
break
|
||||||
else:break
|
|
||||||
status = status['data']
|
status = status['data']
|
||||||
|
|
||||||
objectkey = os.path.basename(file_path)
|
objectkey = os.path.basename(file_path)
|
||||||
@ -49,7 +49,7 @@ def addobs(file_path, status): #save videos
|
|||||||
if objectkey.split('.')[-1] in ['avi','mp4']:
|
if objectkey.split('.')[-1] in ['avi','mp4']:
|
||||||
objectkey = 'videos/'+time+'/'+status+'/'+status+'_'+objectkey
|
objectkey = 'videos/'+time+'/'+status+'/'+status+'_'+objectkey
|
||||||
resp = obsClient.putFile(bucketName, objectkey, file_path)
|
resp = obsClient.putFile(bucketName, objectkey, file_path)
|
||||||
os.remove(file_path)
|
#os.remove(file_path)
|
||||||
|
|
||||||
def Addimg(uuid_barcode):
|
def Addimg(uuid_barcode):
|
||||||
time = uuid_barcode.split('-')[0].split('_')[-1]
|
time = uuid_barcode.split('-')[0].split('_')[-1]
|
||||||
|
Reference in New Issue
Block a user