Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
jianzhnie committed Sep 21, 2020
1 parent f896910 commit 7b83090
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Template repositories
# Template repositories

Templates Repository 是由 Apulis 算法研发团队维护的代码仓库模板, 可以帮助大家在所有项目中重用文件结构和部分代码。

## How to use
应用非常简单,该repo 已经被标记为 template,大家进入到此 Repo 主页, 点击`Use this template`就可以基于此生成新的 repo,且新 repo 具备 template repo 的所有文件和文件夹。下面是 template 的文件结构:
```sh
.github (文件夹): github action 的相关配置
configs(文件夹):相关的参数配置文件
data(文件夹): 相关数据以及标注文件,如测试图片,可视化样例(不存放训练数据)
models(文件夹):训练的网络配置,建议每个不同的网络分开写
Expand All @@ -20,14 +21,14 @@ README.md
### Git主要分支说明


| 分支名称 |功能描述|
| ----------- | -------------------------------------------------------------------- |
| 分支名称 |功能描述|
| ----------- | -------------------------------------------------------------------- |
|Master | 主分支,维护发布产品的代码,存储了正式发布的历史|
|Develop |开发分支,作为功能的集成分支,维护开发中的代码,代码最终要合入Master分支|
|Feature |开自 Develop分支,主要用于开发新功能,开发者根据自己负责模块自行维护,模块开发完成并自测通过后,代码合入Develop分支,新功能提交应该从不直接与master分支交互, 命名规范为:feature/#...,每一个功能都应对应一个issue,...即为issue号. |
| Bugfix | 开自Develop分支或者Release分支,主要用于修复当前开发中的功能的已知bug;每一个已发现的bug都应该在gitlab中记录issue,并定期更新当前解决进展,如有有价值的思考或独特的解决方法, 命名规范为:bugfix/#...|
| Hotfix | 开自Master分支,主要用于修复当前已发布版本的已知bug;解决bug时注意事项参考Bugfix。这是唯一可以直接从master分支fork出来的分支。修复完成,修改应该马上合并回master分支和develop分支(当前的发布分支),master分支应该用新的版本号打好Tag。为Bug修复使用专门分支,让团队可以处理掉问题而不用打断其它工作或是等待下一个发布循环。你可以把它想成是一个直接在master分支上处理的临时发布。命名规范为:hotfix/#... |
| Release | 开自Develop分支,主要用于发布版本,一旦develop分支上有了做一次发布(或者说快到了既定的发布日)的足够功能,就从develop分支上fork一个发布分支。新建的分支用于开始发布循环,所以从这个时间点开始之后新的功能不能再加到这个分支上 —— 这个分支只应该做Bug修复、文档生成和其它面向发布任务。一旦对外发布的工作都完成了,执行以下三个操作:合并Release分支到Master; 给Master打上对应版本的标签tag; Release回归,这些从新建发布分支以来的做的修改要合并回develop分支。 命名规范为:release/...,...为版本号|
| Release | 开自Develop分支,主要用于发布版本,一旦develop分支上有了做一次发布(或者说快到了既定的发布日)的足够功能,就从develop分支上fork一个发布分支。新建的分支用于开始发布循环,所以从这个时间点开始之后新的功能不能再加到这个分支上 —— 这个分支只应该做Bug修复、文档生成和其它面向发布任务。一旦对外发布的工作都完成了,执行以下三个操作:合并Release分支到Master; 给Master打上对应版本的标签tag; Release回归,这些从新建发布分支以来的做的修改要合并回develop分支。 命名规范为:release/...,...为版本号|


### Git commit 规范
Expand Down
111 changes: 111 additions & 0 deletions configs/models/faster_rcnn_r50_fpn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
model = dict(
type='FasterRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style='pytorch'),
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
num_outs=5),
rpn_head=dict(
type='RPNHead',
in_channels=256,
feat_channels=256,
anchor_generator=dict(
type='AnchorGenerator',
scales=[8],
ratios=[0.5, 1.0, 2.0],
strides=[4, 8, 16, 32, 64]),
bbox_coder=dict(
type='DeltaXYWHBBoxCoder',
target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0]),
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
roi_head=dict(
type='StandardRoIHead',
bbox_roi_extractor=dict(
type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
out_channels=256,
featmap_strides=[4, 8, 16, 32]),
bbox_head=dict(
type='Shared2FCBBoxHead',
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=80,
bbox_coder=dict(
type='DeltaXYWHBBoxCoder',
target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2]),
reg_class_agnostic=False,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='L1Loss', loss_weight=1.0))))
# model training and testing settings
train_cfg = dict(
rpn=dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.3,
min_pos_iou=0.3,
match_low_quality=True,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=256,
pos_fraction=0.5,
neg_pos_ub=-1,
add_gt_as_proposals=False),
allowed_border=-1,
pos_weight=-1,
debug=False),
rpn_proposal=dict(
nms_across_levels=False,
nms_pre=2000,
nms_post=1000,
max_num=1000,
nms_thr=0.7,
min_bbox_size=0),
rcnn=dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.5,
neg_iou_thr=0.5,
min_pos_iou=0.5,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
pos_weight=-1,
debug=False))
test_cfg = dict(
rpn=dict(
nms_across_levels=False,
nms_pre=1000,
nms_post=1000,
max_num=1000,
nms_thr=0.7,
min_bbox_size=0),
rcnn=dict(
score_thr=0.05,
nms=dict(type='nms', iou_threshold=0.5),
max_per_img=100)
# soft-nms is also supported for rcnn testing
# e.g., nms=dict(type='soft_nms', iou_threshold=0.5, min_score=0.05)
)

0 comments on commit 7b83090

Please sign in to comment.