Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DA-Platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
文档服务地址:
http://47.92.0.57:3000/
周报索引地址:
http://47.92.0.57:3000/s/NruNXRYmV
Open sidebar
Berlin
DA-Platform
Commits
2e17db84
Commit
2e17db84
authored
Sep 28, 2020
by
王腾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
image
parent
97bd2c8e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
77 additions
and
19 deletions
+77
-19
imageAnnotiation.vue
...front/src/components/imageAnnotation/imageAnnotiation.vue
+1
-0
imageCheck.vue
...tform-front/src/components/imageAnnotation/imageCheck.vue
+18
-5
layerAnnotation.vue
...-front/src/components/imageAnnotation/layerAnnotation.vue
+3
-0
layerCheck.vue
...tform-front/src/components/imageAnnotation/layerCheck.vue
+52
-13
Table-before.vue
...form-front/src/components/textAnnotation/Table-before.vue
+0
-0
app.py
DAPlatform/app.py
+1
-1
nano.save
nano.save
+2
-0
No files found.
DAPlatform-front/src/components/imageAnnotation/imageAnnotiation.vue
View file @
2e17db84
...
...
@@ -868,6 +868,7 @@ export default {
const
newLabel
=
{
labelId
:
currentLabelId
,
labelName
:
labelName
,
correct
:
0
,
pointList
:
pointList
}
this
.
data
[
currentImageId
].
children
.
push
(
newLabel
)
...
...
DAPlatform-front/src/components/imageAnnotation/imageCheck.vue
View file @
2e17db84
...
...
@@ -204,7 +204,7 @@ export default {
let
baseURL
=
this
.
baseURL
// 获取图片列表并转换格式
let
imageList
=
await
this
.
getLabelList
()
//
console.log(imageList)
console
.
log
(
imageList
)
this
.
imageList
=
imageList
.
imageList
// 加载第一张图片
...
...
@@ -276,6 +276,7 @@ export default {
// 还原数据库里的标注记录
let
id
=
_this
.
pictureId
// console.log('id = ' + id)
// console.log(_this.data)
_this
.
data
.
forEach
(
function
(
element
,
index
)
{
var
indexPic
=
index
...
...
@@ -286,8 +287,13 @@ export default {
num
.
push
(
element1
.
Y
)
})
_this
.
canvasAll
[
indexPic
].
push
(
num
)
_this
.
canvasAllCheck
.
push
(
0
)
_this
.
canvasAllCheck
.
push
(
element
.
correct
)
if
(
element
.
correct
==
0
){
_this
.
value
.
push
(
false
)
}
else
{
_this
.
value
.
push
(
true
)
}
})
})
// 还原标注
...
...
@@ -332,14 +338,19 @@ export default {
watch
:
{
value
:
function
fn
()
{
var
tmp
=
this
.
canvasAllCheck
;
let
_this
=
this
this
.
value
.
forEach
((
e
,
index
)
=>
{
if
(
tmp
[
index
]
==
0
)
{
if
(
e
==
true
)
{
_this
.
data
[
0
].
children
[
index
].
correct
=
2
;
tmp
[
index
]
=
2
;
console
.
log
(
_this
.
data
)
}
}
else
if
(
tmp
[
index
]
==
2
)
{
if
(
e
==
false
)
{
_this
.
data
[
0
].
children
[
index
].
correct
=
0
;
tmp
[
index
]
=
0
;
console
.
log
(
_this
.
data
)
}
}
})
...
...
@@ -882,6 +893,7 @@ export default {
}
// pointList完成
const
newLabel
=
{
correct
:
1
,
labelId
:
currentLabelId
,
labelName
:
labelName
,
pointList
:
pointList
...
...
@@ -1053,6 +1065,7 @@ export default {
// _this.ctx.clearRect(0, 0, _this.canvas.width, _this.canvas.height)
_this
.
canvasAll
[
id
].
push
(
num
)
_this
.
canvasAllCheck
.
push
(
1
)
_this
.
value
.
push
(
false
)
_this
.
restoreCanvas
()
...
...
@@ -1153,9 +1166,9 @@ export default {
var
tmp
=
[]
for
(
var
i
=
0
;
i
<
element
.
children
.
length
;
i
++
)
{
// console.log(this.canvasAllCheck[i])
if
(
this
.
canvasAllCheck
[
i
]
==
1
||
this
.
canvasAllCheck
[
i
]
==
2
)
{
//
if (this.canvasAllCheck[i] == 1 || this.canvasAllCheck[i] == 2) {
tmp
.
push
(
element
.
children
[
i
])
}
//
}
}
// console.log(element.children)
// console.log(tmp)
...
...
@@ -1168,7 +1181,7 @@ export default {
})
// console.log('outputdata')
//
console.log(outputData)
console
.
log
(
outputData
)
this
.
submit
()
...
...
DAPlatform-front/src/components/imageAnnotation/layerAnnotation.vue
View file @
2e17db84
...
...
@@ -601,6 +601,7 @@ export default {
X
:
position
.
X
,
Y
:
position
.
Y
,
landmarkId
:
currentId
,
correct
:
0
,
landmarkName
:
landmarkName
}
this
.
landmarkData
.
push
(
newlandmark
)
...
...
@@ -688,6 +689,7 @@ export default {
const
newLabel
=
{
labelId
:
currentId
,
labelName
:
labelName
,
correct
:
0
,
pointList
:
pointList
}
this
.
layerData
.
push
(
newLabel
)
...
...
@@ -751,6 +753,7 @@ export default {
const
newLabel
=
{
labelId
:
currentId
,
labelName
:
labelName
,
correct
:
0
,
pointList
:
pointList
}
this
.
layerData
.
push
(
newLabel
)
...
...
DAPlatform-front/src/components/imageAnnotation/layerCheck.vue
View file @
2e17db84
...
...
@@ -209,8 +209,12 @@ export default {
data
()
{
return
{
computeScore
:
0
,
value
:
[],
value2
:
[],
value
:
[],
// 地标checkbox
value2
:
[],
// 区域标注checkbox
checkLayer
:
[],
// 区域标注审核结果
checkLand
:
[],
// 地标标注审核结果
layerData
:
null
,
// layerdata存放标注数据
landmarkData
:
null
,
// 存放地标数据
activeName
:
'first'
,
isPoint
:
true
,
centerX
:
0
,
...
...
@@ -226,10 +230,7 @@ export default {
radio1
:
'地标'
,
activeIndex1
:
1
,
hasSaved
:
1
,
// 保存标志
checkLayer
:
[],
checkLand
:
[],
layerData
:
null
,
// layerdata存放标注数据
landmarkData
:
null
,
// 存放地标数据
relationId
:
null
,
// 当前任务的relationID
clickedPosition
:
null
,
// 保存最新一次点击的结果,没有使用
map
:
null
,
...
...
@@ -258,19 +259,34 @@ export default {
// 避免第一次标注时数据库中没有内容的情况
if
(
res
.
layerInfo
!=
null
)
{
this
.
layerData
=
res
.
layerInfo
.
labelList
;
console
.
log
(
'this.layerData'
)
console
.
log
(
this
.
layerData
)
for
(
let
i
=
0
;
i
<
this
.
layerData
.
length
;
i
++
)
{
this
.
checkLayer
.
push
(
0
)
let
tmpCorrect
=
this
.
layerData
[
i
].
correct
this
.
checkLayer
.
push
(
tmpCorrect
)
if
(
tmpCorrect
!=
0
)
{
this
.
value2
.
push
(
true
)
}
else
{
this
.
value2
.
push
(
false
)
}
}
}
else
{
this
.
layerData
=
[]
}
// console.log(this.layerData)
if
(
res
.
landmarkList
!=
null
)
{
this
.
landmarkData
=
res
.
landmarkList
.
landmarkEntityList
;
console
.
log
(
'this.landmarkData'
)
console
.
log
(
this
.
landmarkData
)
for
(
let
i
=
0
;
i
<
this
.
landmarkData
.
length
;
i
++
)
{
this
.
checkLand
.
push
(
0
)
let
tmpCorrect
=
this
.
landmarkData
[
i
].
correct
// alert(tmpCorrect)
this
.
checkLand
.
push
(
tmpCorrect
)
if
(
tmpCorrect
!=
0
)
{
this
.
value
.
push
(
true
)
}
else
{
this
.
value
.
push
(
false
)
}
}
}
else
{
this
.
landmarkData
=
[]
}
// console.log(this.landmarkData)
...
...
@@ -312,14 +328,26 @@ export default {
watch
:
{
value
:
function
fn
()
{
var
tmp
=
this
.
checkLand
;
this
.
value
.
forEach
((
e
,
index
)
=>
{
console
.
log
(
'tmp'
)
console
.
log
(
tmp
[
index
])
console
.
log
(
e
)
if
(
tmp
[
index
]
==
0
)
{
if
(
e
==
true
)
{
tmp
[
index
]
=
2
;
this
.
landmarkData
[
index
].
correct
=
2
;
console
.
log
(
'this.landmarkData[index]'
)
console
.
log
(
this
.
landmarkData
[
index
])
}
}
else
if
(
tmp
[
index
]
==
2
)
{
if
(
e
==
false
)
{
tmp
[
index
]
=
0
;
this
.
landmarkData
[
index
].
correct
=
0
;
console
.
log
(
'this.landmarkData[index]'
)
console
.
log
(
this
.
landmarkData
[
index
])
}
}
})
...
...
@@ -332,10 +360,17 @@ export default {
if
(
tmp
[
index
]
==
0
)
{
if
(
e
==
true
)
{
tmp
[
index
]
=
2
;
this
.
layerData
[
index
].
correct
=
2
;
console
.
log
(
'this.layerData[index]'
)
console
.
log
(
this
.
layerData
[
index
])
}
}
else
if
(
tmp
[
index
]
==
2
)
{
if
(
e
==
false
)
{
tmp
[
index
]
=
0
;
this
.
layerData
[
index
].
correct
=
0
;
console
.
log
(
'this.layerData[index]'
)
console
.
log
(
this
.
layerData
[
index
])
}
}
})
...
...
@@ -632,7 +667,8 @@ export default {
if
(
res
.
code
===
1
)
{
let
layerInfo
=
res
.
data
.
layerInfo
let
landmarkList
=
res
.
data
.
landmarkList
// console.log(res.data)
console
.
log
(
res
.
data
)
// 0是标注者标注错误的,1是标注者标注正确的,2是审核者自己添加的
return
{
layerInfo
:
layerInfo
,
landmarkList
:
landmarkList
...
...
@@ -680,6 +716,7 @@ export default {
let
newlandmark
=
{
X
:
position
.
X
,
Y
:
position
.
Y
,
correct
:
1
,
landmarkId
:
currentId
,
landmarkName
:
landmarkName
}
...
...
@@ -770,7 +807,8 @@ export default {
const
newLabel
=
{
labelId
:
currentId
,
labelName
:
labelName
,
pointList
:
pointList
pointList
:
pointList
,
correct
:
1
}
this
.
layerData
.
push
(
newLabel
)
this
.
checkLayer
.
push
(
1
)
...
...
@@ -835,7 +873,8 @@ export default {
const
newLabel
=
{
labelId
:
currentId
,
labelName
:
labelName
,
pointList
:
pointList
pointList
:
pointList
,
correct
:
1
}
this
.
layerData
.
push
(
newLabel
)
this
.
checkLayer
.
push
(
1
)
...
...
@@ -917,7 +956,7 @@ export default {
// console.log(this.checkLayer)
var
tmpLabel
=
[]
for
(
var
i
=
0
;
i
<
this
.
layerData
.
length
;
i
++
)
{
if
(
this
.
checkLayer
[
i
]
==
2
||
this
.
checkLayer
[
i
]
==
1
)
//
if(this.checkLayer[i] == 2 || this.checkLayer[i] == 1)
tmpLabel
.
push
(
this
.
layerData
[
i
])
}
let
outputLayerInfo
=
{
...
...
@@ -928,7 +967,7 @@ export default {
// 拿出正确的地标信息
var
tmpLandmark
=
[]
for
(
var
i
=
0
;
i
<
this
.
landmarkData
.
length
;
i
++
)
{
if
(
this
.
checkLand
[
i
]
==
2
||
this
.
checkLand
[
i
]
==
1
)
//
if(this.checkLand[i] == 2 || this.checkLand[i] == 1)
tmpLandmark
.
push
(
this
.
landmarkData
[
i
])
}
let
outputlandmarkInfo
=
{
...
...
DAPlatform-front/src/components/textAnnotation/Table-before.vue
deleted
100644 → 0
View file @
97bd2c8e
This diff is collapsed.
Click to expand it.
DAPlatform/app.py
View file @
2e17db84
...
...
@@ -28,7 +28,7 @@ app.register_blueprint(data)
app
.
register_blueprint
(
image
)
if
__name__
==
'__main__'
:
app
.
run
(
debug
=
True
,
host
=
'
127.0.0.1
'
,
port
=
9100
)
app
.
run
(
debug
=
True
,
host
=
'
47.92.1.107
'
,
port
=
9100
)
@app.route
(
'/'
)
...
...
nano.save
0 → 100644
View file @
2e17db84
cel
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment