Open Hakuyume opened 7 years ago
I think it is better to unify keywords. I guessed current rules from the codes.
@yuyu2172 How do think of it? Do you know other implicit rules?
Thanks for summarizing this.
I have no complaint for everything, but the second one. I think we were discussing on the usage of cls
inside eval_detection
. I think this is under discussion.
Other than that, here are some that I came up.
image
is used. As a name of a variable inside a function, img
is used.target
.@yuyu2172 thank you. I merged the rules you suggested. I changed the state of usage of class
to "under discussion".
Copied from #163, these are rules for bounding boxes.
bb
is a (R,)
bbox
is a (R, 4)
bboxes
is a (B, R, 4)
or list of (R_i, 4) i=1, ..., B
.rois
is a (R', 4)
which consists of bounding boxes for multiple images. Assuming that there are B images each containing R_i
bounding boxes, R' = \sum R_i
. rois
comes together with a (R',)
array called batch_indices
, which contains batch indices of images to which bounding boxes correspond to.For images, a similar rule applies like below.
img
is a (C, H, W)
.imgs
is a (B, C, H, W)
or a list of (C, H, W)
.@yuyu2172 Thank you. I merged them.
I think there is another rule.
x
is a variable whose shape can be inferred from context. It can be used only when there is no confusion on its shape. I think this naming conventions should be included in the documentation.
Here are some rules I found used in ChainerCV.
prob
is used for probability. If this indicates multi-class probability, cls_prob
is also acceptable. For convenience cls_
can be omitted.roi_nouns
represents values associated to rois
. The shape is (R', ...)
.
batchsize=1
, variables can be renamed as noun = roi_nouns
.Rules specific to instance segmentation should also be documented.
I think this naming conventions should be included in the documentation.
:+1:
Another rule
cls_nouns
is a multi-class version of nouns
.
cls_locs
is (B, R, L, 4)
and locs
is (B, R, 4)
.
img
andimgs
img
:(C, H, W)
imgs
:(B, C, H, W)
or list/tuple of(C, H, W)
bb
,bbox
andbboxes
bb
:(4,)
bbox
:(R, 4)
bboxes
:(B, R, 4)
or list/tuple of(R, 4)
.lb
,label
andlabels
lb
:()
label
:(R,)
labels
:(B, R)
or list/tuple of(R,)
.n_noun
andn_nouns
->n_noun
For the number of something, we usen_noun
. For example,n_class
andn_bbox
(notn_classes
andn_bboxes
).label
andclass
-> mainlylabel
We uselabel
for label/class information. The usage ofclass
(cls
) is under discussion #130.conf
andscore
->score
We usescore
for an array of confidence scores.pred_noun
andgt_noun
In functions which require both prediction and ground truth, we mark them by adding prefixes,pred_
andgt_
. For example,pred_bboxes
andgt_bboxes
.threshold
andthresh
->thresh
For threshold values, we usethresh
. If we use more than one thresholds, we distinguish them by prefixes. For example,nms_thresh
andscore_thresh
.IoU
andJaccard index
->IoU
In documents, we usethe Intersection over Union (IoU)
orIou
.split
andsubset
#131 The name of parameter which determines the subset to use. This is under discussion.image
is used. As a name of a variable inside a function,img
is used. For example,FooImage
andfunc_image(img)
.rois
rois
is a(R', 4)
which consists of bounding boxes for multiple images. Assuming that there are B images each containingR_i
bounding boxes,R' = \sum R_i
. rois comes together with a(R',)
array called batch_indices, which contains batch indices of images to which bounding boxes correspond to.target
.