Search
🔵

cognet.1.4.1_3. [info] title: one-to-one, many-to-one, many-to-many 테스트 케이스 작성

🚀 prev note
♻️ prev note
🚀 next note
♻️ next note
17 more properties
조건
조건 설명
표기
(1)
IoU > 0.5
(2)
텍스트 일치
(3)
텍스트가 일치하지는 않지만 Pred 와 대응되는 GT 의 텍스트가 don’t care
python variable
meaning
implementation
n_words_pred
전체 예측의 수
len(preds)
n_words_matched_pred
(1): true 이고 (2): true → 정답값과 매칭 쌍이 생성된 예측의 수
n_words_passediou_but_dontcare_pred
매칭 쌍이 생성되지 않은 bbox 중, (1): true 이고 (2): false 이지만 (3): true 인 예측의 수
n_words_notdontcare
don’t care 에 대해서 예측을 수행한 것이 아닌 예측의 수
n_words_pred - n_words_passediou_but_dontcare_pred
n_words_gt
전체 정답의 수 - don’t care 이 아닌 정답의 수
len(gts) - len_dontcare
n_words_matched_gt
(1): true 이고 (2): true → 예측값과 매칭 쌍이 생성된 정답 bbox 의 수

one-to-one

perfect

x1y1
x2y2
x3y3
x4y4
text
bbox matched
e2e matched
label id
GT x1y1
x2y2
x3y3
x4y4
text
bbox matched
e2e matched
0,0
1,0
1,1
0,1
111
 a
 a
a
이하동일
111
 a
 a
1,0
2,0
2,1
1,1
111
 b
 b
b
111
 b
 b
2,0
3,0
3,1
2,1
111
 c
 c
c
222
 c
 c
3,0
4,0
4,1
3,1
111
 d
 d
d
222
 d
 d
4,0
5,0
5,1
4,1
111
e
###
5,0
6,0
6,1
5,1
222
f
###
bbox
e2e
precision
4(n_bboxs_matched_pred) / 4(n_bboxs_notdontcare) = 4/4
4(n_words_matched_pred) / 4(n_words_notdontcare) = 4/4
recall
4(n_bboxs_matched_gt) / 5(n_bboxs_gt=len(gts):gts6-dontcare:2) = 4/4
4(n_words_matched_gt) / 4(n_words_gt=len(gts):gts6-dontcare:2) = 4/4
f1

miss text

PRED x1y1
x2y2
x3y3
x4y4
text
bbox matched
e2e matched
label id
GT x1y1
x2y2
x3y3
x4y4
text
bbox matched
e2e matched
0,0
1,0
1,1
0,1
111
 a
 a
a
이하동일
111
 a
 a
1,0
2,0
2,1
1,1
111
 b
 b
b
111
 b
 b
2,0
3,0
3,1
2,1
000
 c
c
222
 c
3,0
4,0
4,1
3,1
000
 d
d
222
 d
4,0
5,0
5,1
4,1
111
e
###
5,0
6,0
6,1
5,1
222
f
###
g
6,0
7,0
7,1
6,1
111
h
7,0
8,0
8,1
7,1
###
bbox
e2e
precision
4(n_bboxs_matched_pred) / 4(n_bboxs_notdontcare) = 4/4
2(n_words_matched_pred) / 4(n_words_notdontcare) = 2/4
recall
4(n_bboxs_matched_gt) / 5(n_bboxs_gt=len(gts):gts8-dontcare:3) = 4/5
2(n_words_matched_gt) / 5(n_words_gt=len(gts):gts8-dontcare:3) = 2/5
f1
알아서 계산
알아서 계산

many-to-one

PRED x1y1
x2y2
x3y3
x4y4
text
bbox matched
e2e matched
label id
GT x1y1
x2y2
x3y3
x4y4
text
bbox matched
e2e matched
0,0
1,0
1,1
0,1
111
 a
 a
a
0,0
1,0
1,1
0,1
111
 a, b, c, d
 a, b
0,0
1,0
1,1
0,1
111
 a
 a
b
0,0
1,0
1,1
0,1
222
 a
c
0,0
1,0
1,1
0,1
333
 a
d
1,0
2,0
2,1
1,1
111
e
bbox
e2e
precision
4(n_bboxs_matched_pred) / 5(n_bboxs_notdontcare) = 4/5
2(n_words_matched_pred) / 5(n_words_notdontcare) = 2/5
recall
1(n_bboxs_matched_gt) / 1(n_bboxs_gt=len(gts):gts1-dontcare:0) = 1/1
1(n_words_matched_gt) / 1(n_words_gt=len(gts):gts1-dontcare:0) = 1/1
f1
알아서 계산
알아서 계산
PRED x1y1
x2y2
x3y3
x4y4
text
bbox matched
e2e matched
label id
GT x1y1
x2y2
x3y3
x4y4
text
bbox matched
e2e matched
0,0
1,0
1,1
0,1
111
a
3,3
4,3
4,4
3,4
111
0,0
1,0
1,1
0,1
111
b
0,0
1,0
1,1
0,1
###
0,0
1,0
1,1
0,1
222
c
0,0
1,0
1,1
0,1
333
d
bbox
e2e
precision
0(n_bboxs_matched_pred) / 0(n_bboxs_notdontcare) = 0/0 = 1
0(n_words_matched_pred) / 0(n_words_notdontcare) = 0/0 = 1
recall
0(n_bboxs_matched_gt) / 1(n_bboxs_gt=len(gts):gts2-dontcare:1) = 0/1 = 0
0(n_words_matched_gt) / 1(n_words_gt=len(gts):gts2-dontcare:1) = 0/1 = 0
f1
알아서 계산
0
정말 말 그대로 ‘조화로워야 가장 값이 높게 나와서’ 조화평균이다. 조화평균 정의식을 보면 a == b 일 때에만 산술평균과 동일한 값을 가질 수 있다. precision 이나 recall 둘 중 하나라도 0이 되면 F1 Score 은 0이 되어 버린다. 어떤 멍청한 모델이 precision 이나 recall 둘 중 하나라도 충분히 높일 자신이 없어서 예측을 무한 개 생성했다고 쳐 보자. 산술평균을 이용하면 precision 이 0 에 수렴해도 recall 이 1 이므로 평균은 0.5 가 된다. 하지만 조화평균을 이용해 구하면 0 이 된다. 조화평균으로 metric 으로 삼겠다는 것은 precision score 과 recall score, 둘 사이의 균형이 적절히 잡힌 모델을 좋다고 여기겠다는 것이다.

many-to-many

PRED x1y1
x2y2
x3y3
x4y4
text
bbox matched
e2e matched
label id
GT x1y1
x2y2
x3y3
x4y4
text
bbox matched
e2e matched
0,0
1,0
1,1
0,1
111
 a
 a
a
0,0
1,0
1,1
0,1
111
 a, b, c
 a, b
0,0
1,0
1,1
0,1
111
 a
 a
b
0,0
1,0
1,1
0,1
222
 a
c
1,0
2,0
2,1
1,1
111
d
1,0
2,0
2,1
1,1
###
1,0
2,0
2,1
1,1
222
e
2,0
3,1
3,2
2,2
111
 f, g
 f
f
2,0
3,1
3,2
2,2
111
 f, g, h
 f
2,0
3,1
3,2
2,2
333
 f, g
g
2,0
3,1
3,2
2,2
222
 f, g, h
2,0
3,1
3,2
2,2
444
 f, g
h
2,0
3,1
3,2
2,2
###
bbox
e2e
precision
6(n_bboxs_matched_pred) / 6(n_bboxs_notdontcare) = 6/6
3(n_words_matched_pred) / 4(n_words_notdontcare) = 3/4
recall
3(n_bboxs_matched_gt) / 3(n_bboxs_gt=len(gts):5-dontcare:2) = 3/3
2(n_words_matched_gt) / 3(n_words_gt=len(gts):5-dontcare:2) = 2/3
f1
알아서 계산
알아서 계산
parse me : 언젠가 이 글에 쓰이면 좋을 것 같은 재료들.
1.
None
from : 과거의 어떤 생각이 이 생각을 만들었는가?
supplementary : 어떤 새로운 생각이 이 문서에 작성된 생각을 뒷받침하는가?
1.
None
opposite : 어떤 새로운 생각이 이 문서에 작성된 생각과 대조되는가?
1.
None
to : 이 문서에 작성된 생각이 어떤 생각으로 발전되고 이어지는가?
1.
None
참고 : 레퍼런스
1.
None