Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
疯人忠
Cvat
提交
3f9ab7cf
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,发现更多精彩内容 >>
未验证
提交
3f9ab7cf
编写于
12月 05, 2022
作者:
A
Anastasia Yasakova
提交者:
GitHub
12月 05, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix loss of rotation in CVAT format (#5407)
Fix
https://github.com/opencv/cvat/issues/4378
上级
cacb9973
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
87 addition
and
22 deletion
+87
-22
CHANGELOG.md
CHANGELOG.md
+1
-0
cvat/apps/dataset_manager/formats/cvat.py
cvat/apps/dataset_manager/formats/cvat.py
+3
-0
tests/python/rest_api/test_projects.py
tests/python/rest_api/test_projects.py
+36
-0
tests/python/shared/assets/annotations.json
tests/python/shared/assets/annotations.json
+10
-10
tests/python/shared/assets/cvat_db/cvat_data.tar.bz2
tests/python/shared/assets/cvat_db/cvat_data.tar.bz2
+0
-0
tests/python/shared/assets/cvat_db/data.json
tests/python/shared/assets/cvat_db/data.json
+33
-8
tests/python/shared/assets/jobs.json
tests/python/shared/assets/jobs.json
+1
-1
tests/python/shared/assets/projects.json
tests/python/shared/assets/projects.json
+1
-1
tests/python/shared/assets/tasks.json
tests/python/shared/assets/tasks.json
+1
-1
tests/python/shared/assets/users.json
tests/python/shared/assets/users.json
+1
-1
未找到文件。
CHANGELOG.md
浏览文件 @
3f9ab7cf
...
...
@@ -90,6 +90,7 @@ non-ascii paths while adding files from "Connected file share" (issue #4428)
-
Fixed FBRS serverless function runtime error on images with alpha channel (
<https://github.com/opencv/cvat/pull/5384>
)
-
Attaching manifest with custom name (
<https://github.com/opencv/cvat/pull/5377>
)
-
Uploading non-zip annotaion files (
<https://github.com/opencv/cvat/pull/5386>
)
-
Loss of rotation in CVAT format (
<https://github.com/opencv/cvat/pull/5407>
)
-
A permission problem with interactive model launches for workers in orgs (
<https://github.com/opencv/cvat/issues/4996>
)
-
Fix chart not being upgradable (
<https://github.com/opencv/cvat/pull/5371>
)
-
Broken helm chart - if using custom release name (
<https://github.com/opencv/cvat/pull/5403>
)
...
...
cvat/apps/dataset_manager/formats/cvat.py
浏览文件 @
3f9ab7cf
...
...
@@ -254,6 +254,7 @@ class CvatExtractor(Extractor):
shape
[
'type'
]
=
el
.
tag
shape
[
'occluded'
]
=
(
el
.
attrib
.
get
(
'occluded'
)
==
'1'
)
shape
[
'z_order'
]
=
int
(
el
.
attrib
.
get
(
'z_order'
,
0
))
shape
[
'rotation'
]
=
float
(
el
.
attrib
.
get
(
'rotation'
,
0
))
if
el
.
tag
==
'box'
:
shape
[
'points'
]
=
list
(
map
(
float
,
[
...
...
@@ -440,6 +441,8 @@ class CvatExtractor(Extractor):
attributes
[
'keyframe'
]
=
ann
[
'keyframe'
]
if
'track_id'
in
ann
:
attributes
[
'track_id'
]
=
ann
[
'track_id'
]
if
'rotation'
in
ann
:
attributes
[
'rotation'
]
=
ann
[
'rotation'
]
group
=
ann
.
get
(
'group'
)
...
...
tests/python/rest_api/test_projects.py
浏览文件 @
3f9ab7cf
...
...
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: MIT
import
io
import
json
import
xml.etree.ElementTree
as
ET
import
zipfile
from
copy
import
deepcopy
...
...
@@ -402,6 +403,14 @@ class TestImportExportDatasetProject:
if
response
.
status
==
HTTPStatus
.
CREATED
:
break
def
_test_get_annotations_from_task
(
self
,
username
,
task_id
):
with
make_api_client
(
username
)
as
api_client
:
(
_
,
response
)
=
api_client
.
tasks_api
.
retrieve_annotations
(
task_id
)
assert
response
.
status
==
HTTPStatus
.
OK
response_data
=
json
.
loads
(
response
.
data
)
return
response_data
def
test_can_import_dataset_in_org
(
self
,
admin_user
):
project_id
=
4
...
...
@@ -546,6 +555,33 @@ class TestImportExportDatasetProject:
content
=
zip_file
.
read
(
anno_file_name
)
check_func
(
content
,
values_to_be_checked
)
def
test_can_import_export_annotations_with_rotation
(
self
):
# https://github.com/opencv/cvat/issues/4378
username
=
"admin1"
project_id
=
4
response
=
self
.
_test_export_project
(
username
,
project_id
,
"CVAT for images 1.1"
)
tmp_file
=
io
.
BytesIO
(
response
.
data
)
tmp_file
.
name
=
"dataset.zip"
import_data
=
{
"dataset_file"
:
tmp_file
,
}
self
.
_test_import_project
(
username
,
project_id
,
"CVAT 1.1"
,
import_data
)
response
=
get_method
(
username
,
f
"/projects/
{
project_id
}
/tasks"
)
assert
response
.
status_code
==
HTTPStatus
.
OK
tasks
=
response
.
json
()[
"results"
]
response_data
=
self
.
_test_get_annotations_from_task
(
username
,
tasks
[
0
][
"id"
])
task1_rotation
=
response_data
[
"shapes"
][
0
][
"rotation"
]
response_data
=
self
.
_test_get_annotations_from_task
(
username
,
tasks
[
1
][
"id"
])
task2_rotation
=
response_data
[
"shapes"
][
0
][
"rotation"
]
assert
task1_rotation
==
task2_rotation
@
pytest
.
mark
.
usefixtures
(
"restore_db_per_function"
)
class
TestPatchProjectLabel
:
...
...
tests/python/shared/assets/annotations.json
浏览文件 @
3f9ab7cf
...
...
@@ -376,12 +376,12 @@
"occluded"
:
false
,
"outside"
:
false
,
"points"
:
[
106.36
066411239153
,
85.15
15964240134
,
240.083
52490421748
,
241.26
526181354166
106.36
1328125
,
85.15
0390625
,
240.083
984375
,
241.26
3671875
],
"rotation"
:
0.0
,
"rotation"
:
45.9
,
"source"
:
"manual"
,
"type"
:
"rectangle"
,
"z_order"
:
0
...
...
@@ -1121,12 +1121,12 @@
"occluded"
:
false
,
"outside"
:
false
,
"points"
:
[
106.36
066411239153
,
85.15
15964240134
,
240.083
52490421748
,
241.26
526181354166
106.36
1328125
,
85.15
0390625
,
240.083
984375
,
241.26
3671875
],
"rotation"
:
0.0
,
"rotation"
:
45.9
,
"source"
:
"manual"
,
"type"
:
"rectangle"
,
"z_order"
:
0
...
...
tests/python/shared/assets/cvat_db/cvat_data.tar.bz2
浏览文件 @
3f9ab7cf
无法预览此类型文件
tests/python/shared/assets/cvat_db/data.json
浏览文件 @
3f9ab7cf
...
...
@@ -36,7 +36,7 @@
"pk"
:
1
,
"fields"
:
{
"password"
:
"pbkdf2_sha256$260000$DevmxlmLwciP1P6sZs2Qag$U9DFtjTWx96Sk95qY6UXVcvpdQEP2LcoFBftk5D2RKY="
,
"last_login"
:
"2022-12-0
1T12:52:15.631
Z"
,
"last_login"
:
"2022-12-0
5T07:46:24.795
Z"
,
"is_superuser"
:
true
,
"username"
:
"admin1"
,
"first_name"
:
"Admin"
,
...
...
@@ -455,6 +455,14 @@
"user_permissions"
:
[]
}
},
{
"model"
:
"sessions.session"
,
"pk"
:
"3p7i7jibc6g827i39r8e0ce5i9f1orzp"
,
"fields"
:
{
"session_data"
:
".eJxVjDEOAiEQAP9CbQiwgGBp7xsIC6ycGkiOu8r4d0NyhbYzk3mzEPethn2UNSyZXZhkp1-GMT1LmyI_Yrt3nnrb1gX5TPhhB7_1XF7Xo_0b1Djq3AoglJTJACKS9zGB0eAdopNkz6TIWq2LLQ611gkEgjFJCTIChFPs8wX0UDee:1p26BE:nXJF4Fl6fGAvhi1ZZfLr4WJSgvc53poHLXXAM5V6NdU"
,
"expire_date"
:
"2022-12-19T07:46:24.799Z"
}
},
{
"model"
:
"sessions.session"
,
"pk"
:
"5x9v6r58e4l9if78anupog0ittsq2w3j"
,
...
...
@@ -625,12 +633,12 @@
},
{
"model"
:
"authtoken.token"
,
"pk"
:
"
4f057576712c65d30847e77456aea605a9df5965
"
,
"pk"
:
"
2dcf8d2ff5032c3cf7d276549af3a50edb4f11c8
"
,
"fields"
:
{
"user"
:
[
"admin1"
],
"created"
:
"2022-
09-28T12:20:48.631
Z"
"created"
:
"2022-
12-05T07:46:24.792
Z"
}
},
{
...
...
@@ -2279,7 +2287,7 @@
"assignee"
:
null
,
"bug_tracker"
:
""
,
"created_date"
:
"2022-06-08T08:32:45.521Z"
,
"updated_date"
:
"2022-1
0-17T17:09:36.526
Z"
,
"updated_date"
:
"2022-1
2-05T07:47:01.518
Z"
,
"status"
:
"annotation"
,
"organization"
:
2
,
"source_storage"
:
null
,
...
...
@@ -2587,7 +2595,7 @@
"assignee"
:
null
,
"bug_tracker"
:
""
,
"created_date"
:
"2022-06-08T08:33:06.505Z"
,
"updated_date"
:
"2022-1
0-17T17:09:36.570
Z"
,
"updated_date"
:
"2022-1
2-05T07:47:01.633
Z"
,
"overlap"
:
0
,
"segment_size"
:
5
,
"status"
:
"annotation"
,
...
...
@@ -3671,7 +3679,7 @@
"fields"
:
{
"segment"
:
17
,
"assignee"
:
null
,
"updated_date"
:
"2022-1
0-17T17:09:36.571
Z"
,
"updated_date"
:
"2022-1
2-05T07:47:01.633
Z"
,
"status"
:
"annotation"
,
"stage"
:
"annotation"
,
"state"
:
"in progress"
...
...
@@ -4991,6 +4999,23 @@
"job"
:
19
}
},
{
"model"
:
"engine.jobcommit"
,
"pk"
:
81
,
"fields"
:
{
"scope"
:
"create"
,
"owner"
:
[
"admin1"
],
"timestamp"
:
"2022-12-05T07:47:01.635Z"
,
"data"
:
{
"stage"
:
"annotation"
,
"state"
:
"in progress"
,
"assignee"
:
null
},
"job"
:
17
}
},
{
"model"
:
"engine.labeledimage"
,
"pk"
:
1
,
...
...
@@ -5206,8 +5231,8 @@
"occluded"
:
false
,
"outside"
:
false
,
"z_order"
:
0
,
"points"
:
"[106.36
066411239153, 85.1515964240134, 240.08352490421748, 241.26526181354166
]"
,
"rotation"
:
0.0
,
"points"
:
"[106.36
1328125, 85.150390625, 240.083984375, 241.263671875
]"
,
"rotation"
:
45.9
,
"parent"
:
null
}
},
...
...
tests/python/shared/assets/jobs.json
浏览文件 @
3f9ab7cf
...
...
@@ -273,7 +273,7 @@
"status"
:
"annotation"
,
"stop_frame"
:
4
,
"task_id"
:
13
,
"updated_date"
:
"2022-1
0-17T17:09:36.571
000Z"
,
"updated_date"
:
"2022-1
2-05T07:47:01.633
000Z"
,
"url"
:
"http://localhost:8080/api/jobs/17"
},
{
...
...
tests/python/shared/assets/projects.json
浏览文件 @
3f9ab7cf
...
...
@@ -406,7 +406,7 @@
"tasks"
:
[
13
],
"updated_date"
:
"2022-1
0-17T17:09:36.526
000Z"
,
"updated_date"
:
"2022-1
2-05T07:47:01.518
000Z"
,
"url"
:
"http://localhost:8080/api/projects/4"
},
{
...
...
tests/python/shared/assets/tasks.json
浏览文件 @
3f9ab7cf
...
...
@@ -379,7 +379,7 @@
"status"
:
"annotation"
,
"subset"
:
""
,
"target_storage"
:
null
,
"updated_date"
:
"2022-1
0-17T17:09:36.570
000Z"
,
"updated_date"
:
"2022-1
2-05T07:47:01.633
000Z"
,
"url"
:
"http://localhost:8080/api/tasks/13"
},
{
...
...
tests/python/shared/assets/users.json
浏览文件 @
3f9ab7cf
...
...
@@ -310,7 +310,7 @@
"is_active"
:
true
,
"is_staff"
:
true
,
"is_superuser"
:
true
,
"last_login"
:
"2022-12-0
1T12:52:15.631000
Z"
,
"last_login"
:
"2022-12-0
5T07:46:24.795659
Z"
,
"last_name"
:
"First"
,
"url"
:
"http://localhost:8080/api/users/1"
,
"username"
:
"admin1"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录