-
Notifications
You must be signed in to change notification settings - Fork 82
model
model provides all building blocks for network structures. LFD and FCOS are both implemented here. We only introduce LFD here. (As for FCOS, our version can only reach 35.4 MAP in COCO vs 36.4 MAP in original FCOS paper. So we have to check our code for bugs further) Conventionally, the network structures are composed of backbones, necks and heads. For losses, we adopt most popular classification and regression losses, mainly ported from mmdetection. Utils currently only contains nms, also ported from mmdetection.
backbone provides resnet and lfd_resnet. Everyone should be familiar with resnet, so we omit the description here.
lfd resnet is actually similar with resnet. The main differences lie in two aspects: 1) the stems of different down-sample strides; 2) three types of blocks ---- FastBlock, FasterBlock and FastestBlock. Backbone determines the most of time cost in inference, so carefully design your backbone.
Our implemented backbones support acquiring feature maps of any blocks in any stages by setting out_indices
.
neck provides three types of structures: fpn, simple fpn and simple neck.
fpn implements standard FPN structure. Check the code for reference directly.
simple fpn simplifies fpn by reducing output convs and offering neighbouring_mode
for feature fusion. Check the code for reference directly.
simple neck is not really a 'neck', because it does not perform feature fusion. Only one conv is applied to each incoming feature map to align the number of output feature channels.
We implement two types of heads: fcos head and lfd head. fcos head is easy to understand, so we omit the details.
lfd head is also easy to understand. It has two extra options: 1) share_head_flag
determines whether to share head weights or not across all heads; 2) merge_path_flag
determines whether to share weights or not for both classification path and regression path.
We list all losses supported in lfd
- BCE
- Focal Loss
- CE
- MSE
- Smooth L1
- IOU loss, GIOU loss, CIOU loss, DIOU loss
To fully understand LFD, please move the LFD introduction [page].