Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
疯人忠
Cvat
提交
3fd43011
C
Cvat
项目概览
疯人忠
/
Cvat
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Cvat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3fd43011
编写于
8月 10, 2023
作者:
K
klakhov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added quality report checks
上级
b44f6c53
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
106 addition
and
4 deletion
+106
-4
tests/cypress/e2e/quality/ground_truth_jobs.js
tests/cypress/e2e/quality/ground_truth_jobs.js
+106
-4
未找到文件。
tests/cypress/e2e/quality/ground_truth_jobs.js
浏览文件 @
3fd43011
...
...
@@ -28,7 +28,7 @@ context('Ground truth jobs', () => {
fromTaskPage
:
true
,
};
const
r
ectangles
=
[
const
groundTruthR
ectangles
=
[
{
id
:
1
,
points
:
'
By 2 Points
'
,
...
...
@@ -61,8 +61,41 @@ context('Ground truth jobs', () => {
},
];
const
rectangles
=
[
{
points
:
'
By 2 Points
'
,
type
:
'
Shape
'
,
labelName
,
firstX
:
270
,
firstY
:
350
,
secondX
:
370
,
secondY
:
450
,
},
{
id
:
2
,
points
:
'
By 2 Points
'
,
type
:
'
Shape
'
,
labelName
,
firstX
:
350
,
firstY
:
450
,
secondX
:
450
,
secondY
:
550
,
},
{
points
:
'
By 2 Points
'
,
type
:
'
Shape
'
,
labelName
,
firstX
:
130
,
firstY
:
200
,
secondX
:
150
,
secondY
:
250
,
},
];
let
groundTruthJobID
=
null
;
let
jobID
=
null
;
let
taskID
=
null
;
let
qualityReportID
=
null
;
// With seed = 1, frameCount = 3, totalFrames = 10 - predifined ground truth frames are:
const
groundTruthFrames
=
[
1
,
6
,
7
];
...
...
@@ -97,6 +130,26 @@ context('Ground truth jobs', () => {
.
should
(
'
be.visible
'
);
}
function
waitForReport
(
authKey
,
rqID
)
{
cy
.
request
({
method
:
'
POST
'
,
url
:
`/api/quality/reports?rq_id=
${
rqID
}
`
,
headers
:
{
Authorization
:
`Token
${
authKey
}
`
,
},
body
:
{
task_id
:
taskID
,
},
}).
then
((
response
)
=>
{
if
(
response
.
status
===
201
)
{
qualityReportID
=
response
.
body
.
id
;
console
.
log
(
response
.
body
,
response
.
body
.
id
,
qualityReportID
);
return
;
}
waitForReport
(
authKey
,
rqID
);
});
}
before
(()
=>
{
cy
.
visit
(
'
auth/login
'
);
cy
.
login
();
...
...
@@ -105,6 +158,9 @@ context('Ground truth jobs', () => {
cy
.
createZipArchive
(
directoryToArchive
,
archivePath
);
cy
.
createAnnotationTask
(
taskName
,
labelName
,
attrName
,
textDefaultValue
,
archiveName
);
cy
.
openTask
(
taskName
);
cy
.
url
().
then
((
url
)
=>
{
taskID
=
Number
(
url
.
split
(
'
/
'
).
slice
(
-
1
)[
0
].
split
(
'
?
'
)[
0
]);
});
cy
.
get
(
'
.cvat-job-item
'
).
first
().
invoke
(
'
attr
'
,
'
data-row-id
'
).
then
((
val
)
=>
{
jobID
=
val
;
});
...
...
@@ -179,10 +235,13 @@ context('Ground truth jobs', () => {
groundTruthFrames
.
forEach
((
frame
,
index
)
=>
{
cy
.
goCheckFrameNumber
(
frame
);
cy
.
createRectangle
(
r
ectangles
[
index
]);
cy
.
createRectangle
(
groundTruthR
ectangles
[
index
]);
});
cy
.
saveJob
();
cy
.
interactMenu
(
'
Open the task
'
);
cy
.
interactMenu
(
'
Finish the job
'
);
cy
.
get
(
'
.cvat-modal-content-finish-job
'
).
within
(()
=>
{
cy
.
contains
(
'
button
'
,
'
Continue
'
).
click
();
});
cy
.
get
(
'
.cvat-job-item
'
).
contains
(
'
a
'
,
`Job #
${
jobID
}
`
).
click
();
cy
.
changeWorkspace
(
'
Review
'
);
...
...
@@ -190,8 +249,51 @@ context('Ground truth jobs', () => {
cy
.
get
(
'
.cvat-objects-sidebar-show-ground-truth
'
).
click
();
groundTruthFrames
.
forEach
((
frame
,
index
)
=>
{
cy
.
goCheckFrameNumber
(
frame
);
checkRectangle
(
rectangles
[
index
]);
checkRectangle
(
groundTruthRectangles
[
index
]);
});
});
it
(
'
Add annotations to regular job, check quality report
'
,
()
=>
{
cy
.
changeWorkspace
(
'
Standard
'
);
groundTruthFrames
.
forEach
((
frame
,
index
)
=>
{
cy
.
goCheckFrameNumber
(
frame
);
cy
.
createRectangle
(
rectangles
[
index
]);
});
cy
.
saveJob
();
cy
.
interactMenu
(
'
Open the task
'
);
cy
.
logout
();
cy
.
getAuthKey
().
then
((
res
)
=>
{
const
authKey
=
res
.
body
.
key
;
cy
.
request
({
method
:
'
POST
'
,
url
:
'
/api/quality/reports
'
,
headers
:
{
Authorization
:
`Token
${
authKey
}
`
,
},
body
:
{
task_id
:
taskID
,
},
}).
then
((
response
)
=>
{
const
rqID
=
response
.
body
.
rq_id
;
waitForReport
(
authKey
,
rqID
);
});
});
cy
.
login
();
cy
.
visit
(
'
/tasks
'
);
cy
.
openTask
(
taskName
);
openQualityTab
();
cy
.
intercept
(
'
GET
'
,
'
/api/quality/reports**
'
).
as
(
'
getReport
'
);
cy
.
wait
(
'
@getReport
'
);
checkCardValue
(
'
.cvat-task-mean-annotation-quality
'
,
'
50.0%
'
);
checkCardValue
(
'
.cvat-task-gt-conflicts
'
,
'
3
'
);
checkCardValue
(
'
.cvat-task-issues
'
,
'
0
'
);
});
it
(
'
Check quality report is available for download
'
,
()
=>
{
cy
.
get
(
'
.cvat-analytics-download-report-button
'
).
click
();
cy
.
verifyDownload
(
`quality-report-task_
${
taskID
}
-
${
qualityReportID
}
.json`
);
});
});
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录