edgeupdate
This commit is contained in:
@ -56,6 +56,7 @@ _C.VreTest2 = 'http://api.test2.ieemoo.cn/emoo-api/intelligence/queryVideoCompar
|
|||||||
_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'
|
||||||
|
_C.riskControl = 'http://api.test.ieemoo.com/emoo-api/riskControl/shoporder/checkUploadAiImages?storeId=32001001'
|
||||||
|
|
||||||
_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
|
||||||
|
@ -46,11 +46,12 @@ def addobs(file_path, status): #save videos
|
|||||||
return 'can not get the status'
|
return 'can not get the status'
|
||||||
status = status['data']
|
status = status['data']
|
||||||
objectkey = os.path.basename(file_path)
|
objectkey = os.path.basename(file_path)
|
||||||
|
status_ = get_weightStatus(objectkey)
|
||||||
backups_path = os.sep.join([cfg.backups, status+'_'+objectkey])
|
backups_path = os.sep.join([cfg.backups, status+'_'+objectkey])
|
||||||
time = os.path.basename(file_path).split('-')[0]
|
time = os.path.basename(file_path).split('-')[0]
|
||||||
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
|
||||||
if status == '02':
|
if status == '02' or status_:
|
||||||
resp = obsClient.putFile(bucketName, objectkey, file_path)
|
resp = obsClient.putFile(bucketName, objectkey, file_path)
|
||||||
shutil.move(file_path, backups_path)
|
shutil.move(file_path, backups_path)
|
||||||
#os.remove(file_path)
|
#os.remove(file_path)
|
||||||
@ -72,6 +73,14 @@ def Addimg_content(uuid_barcode, context):
|
|||||||
objectkey = 'imgs/'+time+'/'+uuid_barcode+'.jpg'
|
objectkey = 'imgs/'+time+'/'+uuid_barcode+'.jpg'
|
||||||
resp = obsClient.putContent(bucketName, objectkey, context)
|
resp = obsClient.putContent(bucketName, objectkey, context)
|
||||||
|
|
||||||
|
def get_weightStatus(uuid):
|
||||||
|
uuid = uuid.split('_')[1]
|
||||||
|
resp = requests.post(url = cfg.riskControl)
|
||||||
|
up_uuid = resp['data']
|
||||||
|
if uuid in up_uuid:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import cv2
|
import cv2
|
||||||
context = cv2.imread('/home/lc/project/ieemoo-ai-search/data/imgs/20230625-094651_37dd99b0-520d-457b-8615-efdb7f53b5b4_6907992825762.jpg')
|
context = cv2.imread('/home/lc/project/ieemoo-ai-search/data/imgs/20230625-094651_37dd99b0-520d-457b-8615-efdb7f53b5b4_6907992825762.jpg')
|
||||||
|
Reference in New Issue
Block a user