Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 08e42ac

Browse files
CVAuto: 解决总计指标计算错误
1 parent b829813 commit 08e42ac

File tree

2 files changed

+40
-33
lines changed

2 files changed

+40
-33
lines changed

‎APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/cv/js/main.js

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7122,13 +7122,10 @@ https://github.com/Tencent/APIJSON/issues
71227122
var tr2 = rand.TestRecord;
71237123
if (tr2 == null) {
71247124
allImgMiss ++;
7125-
if (isAfter) {
7126-
sameImgMiss ++;
7127-
}
71287125
continue;
71297126
}
71307127

7131-
var isAfter = sameIds.includes(rand.id);
7128+
var isAfter = tr2.reportId != this.reportId && sameIds.includes(tr2.id);
71327129
if (isAfter) {
71337130
sameImgTotal ++;
71347131
}
@@ -7268,7 +7265,7 @@ https://github.com/Tencent/APIJSON/issues
72687265
"TestRecord:beforeSame": {
72697266
// "reportId{}@": "TestRecord-reportId:ids2[]",
72707267
// 'randomId{}': beforeIds.length <= 0 ? null : beforeIds,
7271-
'id{}': beforeIds.length <= 0 ? null : beforeIds,
7268+
'id{}': beforeIds,
72727269
'documentId': did,
72737270
"@column": "sum(total):allTotal;sum(correct):allCorrect;sum(wrong):allWrong;sum(miss):allMiss;count(*):imgTotal;sum(wrong + miss <= 0):imgCorrect;sum(wrong > 0):imgWrong;sum(miss > 0):imgMiss",
72747271
"@raw": "@column",
@@ -7311,12 +7308,12 @@ https://github.com/Tencent/APIJSON/issues
73117308
const extra = extras[i] || {};
73127309
const imgTotal = detection[stage + 'ImgTotal'] = +(tr.imgTotal || tr.imgCorrect || 0) + +(extra.imgTotal || 0);
73137310
const imgWrong = detection[stage + 'ImgWrong'] = +(tr.imgWrong || 0) + +(extra.imgWrong || 0);
7314-
const imgCorrect = detection[stage + 'ImgCorrect'] = (+(tr.imgCorrect || 0) + +(extra.imgCorrect || 0)) || (imgTotal - imgWrong);
7311+
const imgCorrect = detection[stage + 'ImgCorrect'] = (+(tr.imgCorrect || 0) + +(extra.imgCorrect || 0)); // 前面为 0 会导致后面的计算 || (imgTotal - imgWrong);
73157312
const imgMiss = detection[stage + 'ImgMiss'] = (+(tr.imgMiss || 0) + +(extra.imgMiss || 0)) || (imgTotal - imgCorrect);
73167313

73177314
const allTotal = detection[stage + 'AllTotal'] = +(tr.allTotal || tr.allCorrect || 0) + +(extra.allTotal || 0);
73187315
const allWrong = detection[stage + 'AllWrong'] = +(tr.allWrong || 0) + +(extra.allWrong || 0);
7319-
const allCorrect = detection[stage + 'AllCorrect'] = (+(tr.allCorrect || 0) + +(extra.allCorrect || 0)) || (allTotal - allWrong);
7316+
const allCorrect = detection[stage + 'AllCorrect'] = (+(tr.allCorrect || 0) + +(extra.allCorrect || 0)); // 前面为 0 会导致后面的计算 || (allTotal - allWrong);
73207317
const allMiss = detection[stage + 'AllMiss'] = (+(tr.allMiss || 0) + +(extra.allMiss || 0)) || (allTotal - allCorrect);
73217318

73227319
const imgRecall = detection[stage + 'ImgRecall'] = imgCorrect / imgTotal; // allImgCorrect / allImgTotal;
@@ -12065,6 +12062,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
1206512062
tr.compare = cmp
1206612063
var status = res == null ? null : res.status
1206712064

12065+
var isSame = false
1206812066
it = it || {}
1206912067
var p = cmp.path
1207012068
it.compareType = cmp.code;
@@ -12107,20 +12105,29 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
1210712105
default:
1210812106
it.compareColor = 'white'
1210912107
it.hintMessage = '结果正确'
12110-
if (isRandom && tr.id != null) {
12111-
var sameIds = this.sameIds || [];
12112-
if (! sameIds.includes(tr.id)) {
12113-
sameIds.push(tr.id);
12114-
this.sameIds = sameIds;
12115-
}
12116-
}
12108+
isSame = tr.reportId != this.reportId
1211712109
break;
1211812110
}
1211912111

1212012112
if (isRandom) {
1212112113
r = r || {}
1212212114
it.Random = r
1212312115

12116+
if (tr.id != null) {
12117+
var sameIds = this.sameIds || []
12118+
var ind = sameIds.indexOf(tr.id)
12119+
if (isSame) {
12120+
if (ind < 0) {
12121+
sameIds.push(tr.id)
12122+
}
12123+
} else {
12124+
if (ind >= 0) {
12125+
sameIds.splice(ind, 1)
12126+
}
12127+
}
12128+
this.sameIds = sameIds;
12129+
}
12130+
1212412131
this.updateToRandomSummary(it, 1, accountIndex)
1212512132
}
1212612133
else {
@@ -12607,7 +12614,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
1260712614
delete obj["time:start|duration|end"]
1260812615
delete obj["time:start|duration|end|parse|sql"]
1260912616
delete obj["time:start|duration|end|parse|sql|model"]
12610-
delete obj["detect-time:start|duration|end"]
12617+
delete obj["det-time:start|duration|end"]
1261112618
delete obj["pose-time:start|duration|end"]
1261212619
delete obj["seg-time:start|duration|end"]
1261312620
delete obj["obb-time:start|duration|end"]
@@ -12886,12 +12893,12 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
1288612893

1288712894
if (isRandom) {
1288812895
App.updateToRandomSummary(item, -1, App.currentAccountIndex)
12889-
if (App.compareRandomIds instanceof Array) {
12890-
var ind = App.compareRandomIds.indexOf(random.id);
12891-
if (ind >= 0) {
12892-
App.compareRandomIds.splice(ind, 1)
12893-
}
12894-
}
12896+
// if (App.compareRandomIds instanceof Array) {
12897+
// var ind = App.compareRandomIds.indexOf(random.id);
12898+
// if (ind >= 0) {
12899+
// App.compareRandomIds.splice(ind, 1)
12900+
// }
12901+
// }
1289512902
} else {
1289612903
App.updateToSummary(item, -1, App.currentAccountIndex)
1289712904
}
@@ -12908,7 +12915,8 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
1290812915
item.TestRecord = null
1290912916
}
1291012917

12911-
App.updateTestRecord(0, list, index, item, rawRspStr == null ? null : parseJSON(rawRspStr), isRandom, true, App.currentAccountIndex, isCross)
12918+
App.updateTestRecord(0, list, index, item, rawRspStr == null ? null : parseJSON(rawRspStr), isRandom, true, App.currentAccountIndex, isCross, true)
12919+
App.summary();
1291212920
})
1291312921
}
1291412922
else { //上传新的校验标准
@@ -12981,7 +12989,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
1298112989
// userId: userId,
1298212990
chainGroupId: cgId,
1298312991
chainId: cId,
12984-
documentId: random.documentId,
12992+
documentId: random.documentId || document.id,
1298512993
name: random.name,
1298612994
count: random.count,
1298712995
config: random.config
@@ -13002,7 +13010,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
1300213010
// userId: userId,
1300313011
chainGroupId: cgId,
1300413012
chainId: cId,
13005-
documentId: isNewRandom ? null : (isRandom ? random.documentId : document.id),
13013+
documentId: isNewRandom ? null : (isRandom ? (random.documentId || document.id) : document.id),
1300613014
randomId: isRandom && ! isNewRandom ? random.id : null,
1300713015
reportId: this.reportId,
1300813016
host: baseUrl,
@@ -13088,14 +13096,14 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
1308813096
}
1308913097
}
1309013098

13091-
var rid = random.id || r.id || testRecord.randomId;
13092-
if (rid != null && rid > 0) {
13093-
if (App.compareRandomIds == null) {
13094-
App.compareRandomIds = [rid]
13095-
} else {
13096-
App.compareRandomIds.push(rid)
13097-
}
13098-
}
13099+
// var rid = random.id || r.id || testRecord.randomId;
13100+
// if (rid != null && rid > 0) {
13101+
// if (App.compareRandomIds == null) {
13102+
// App.compareRandomIds = [rid]
13103+
// } else {
13104+
// App.compareRandomIds.push(rid)
13105+
// }
13106+
// }
1309913107
}
1310013108
item.TestRecord = testRecord
1310113109

‎APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/cv/webon.log.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /