Skip to content

Commit 9893b38

Browse files
solderzzcaxiado-zz
authored andcommitted
This commit is trying to fix issue #70
1 parent 3969c6a commit 9893b38

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/detector/deepeye.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,9 @@ function classify_task(task_info, cb) {
483483
json.result['url'] = task_info.url
484484
post_recognition_result_to_api_server(json,task_info.url)
485485
} else {
486-
json.result['url'] = upload.getAccessUrl(json.result.key)
487-
upload.putFile(json.result.key,task_info.path,function(error,accessUrl){
488-
console.log('error=',error,'accessUrl=',accessUrl)
486+
json.result['url'] = upload.getAccessUrl(json.result.key)+'.png'
487+
upload.putFile(json.result.key+'.png',task_info.path,function(error,accessUrl){
488+
ON_DEBUG && console.log('error=',error,'accessUrl=',accessUrl)
489489
if(!error){
490490
post_recognition_result_to_api_server(json,accessUrl)
491491
}

src/embedding/upload_api-v2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@ def _updateDataSet(url, objId, group_id, device_id, drop, img_type, sqlId, style
12991299
OBJ_COUNT += 1
13001300

13011301
# 这里需要把老图从本地目录删除掉
1302-
old_img_path = infile.replace(str(new_train_set.id)+'.jpg', str(old_train_set.id)+'.jpg')
1302+
old_img_path = infile.replace(str(new_train_set.id)+'.png', str(old_train_set.id)+'.png')
13031303
os.remove(old_img_path)
13041304
elif SVM_CLASSIFIER_ENABLED is True:
13051305
img_path = save_embedding.download_img_for_svm(url, group_id, face_id, style=style)
@@ -1323,7 +1323,7 @@ def _updateDataSet(url, objId, group_id, device_id, drop, img_type, sqlId, style
13231323
print('update: {} style face count, url={}'.format(FACE_COUNT[style], url))
13241324

13251325
# 这里需要把老图从本地目录删除掉
1326-
old_img_path = img_path.replace(str(new_train_set.id) + '.jpg', str(old_train_set.id) + '.jpg')
1326+
old_img_path = img_path.replace(str(new_train_set.id) + '.png', str(old_train_set.id) + '.png')
13271327
os.remove(old_img_path)
13281328
else:
13291329
print('face')
@@ -1338,7 +1338,7 @@ def _updateDataSet(url, objId, group_id, device_id, drop, img_type, sqlId, style
13381338
print('{} style face count'.format((FACE_COUNT[style])))
13391339

13401340
# 这里需要把老图从本地目录删除掉
1341-
old_img_path = img_path.replace(str(new_train_set.id) + '.jpg', str(old_train_set.id) + '.jpg')
1341+
old_img_path = img_path.replace(str(new_train_set.id) + '.png', str(old_train_set.id) + '.png')
13421342
os.remove(old_img_path)
13431343

13441344
else:

0 commit comments

Comments
 (0)