Keyword consistency
- [ ]
imgandimgs-
img:(C, H, W) -
imgs:(B, C, H, W)or list/tuple of(C, H, W)
-
- [ ]
bb,bboxandbboxes-
bb:(4,) -
bbox:(R, 4) -
bboxes:(B, R, 4)or list/tuple of(R, 4).
-
- [ ]
lb,labelandlabels-
lb:() -
label:(R,) -
labels:(B, R)or list/tuple of(R,).
-
- [ ]
n_nounandn_nouns->n_nounFor the number of something, we usen_noun. For example,n_classandn_bbox(notn_classesandn_bboxes). - [ ]
labelandclass-> mainlylabelWe uselabelfor label/class information. The usage ofclass(cls) is under discussion #130. - [ ]
confandscore->scoreWe usescorefor an array of confidence scores. - [ ]
pred_nounandgt_nounIn functions which require both prediction and ground truth, we mark them by adding prefixes,pred_andgt_. For example,pred_bboxesandgt_bboxes. - [ ]
thresholdandthresh->threshFor threshold values, we usethresh. If we use more than one thresholds, we distinguish them by prefixes. For example,nms_threshandscore_thresh. - [ ]
IoUandJaccard index->IoUIn documents, we usethe Intersection over Union (IoU)orIou. - [ ]
splitandsubset#131 The name of parameter which determines the subset to use. This is under discussion. - [ ] For a name of a function or a class,
imageis used. As a name of a variable inside a function,imgis used. For example,FooImageandfunc_image(img). - [ ]
roisroisis a(R', 4)which consists of bounding boxes for multiple images. Assuming that there are B images each containingR_ibounding 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. - [ ] In extensions, models are named as
target.
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.
- For a name of a function or a class,
imageis used. As a name of a variable inside a function,imgis used. - In extensions, models are named as
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.
-
bbis a(R,) -
bboxis a(R, 4) -
bboxesis a(B, R, 4)or list of(R_i, 4) i=1, ..., B. -
roisis a(R', 4)which consists of bounding boxes for multiple images. Assuming that there are B images each containingR_ibounding boxes,R' = \sum R_i.roiscomes together with a(R',)array calledbatch_indices, which contains batch indices of images to which bounding boxes correspond to.
For images, a similar rule applies like below.
-
imgis a(C, H, W). -
imgsis a(B, C, H, W)or a list of(C, H, W).
@yuyu2172 Thank you. I merged them.
I think there is another rule.
-
xis 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.
-
probis used for probability. If this indicates multi-class probability,cls_probis also acceptable. For conveniencecls_can be omitted. -
roi_nounsrepresents values associated torois. The shape is(R', ...).- In the case when the
batchsize=1, variables can be renamed asnoun = roi_nouns.
- In the case when the
Rules specific to instance segmentation should also be documented.
I think this naming conventions should be included in the documentation.
:+1:
Another rule
-
cls_nounsis a multi-class version ofnouns.- ex:
cls_locsis(B, R, L, 4)andlocsis(B, R, 4).
- ex: