Upload 2 files
Browse files
deeplabv3plus_r101_512x512_face-occlusion-93ec6695.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ee938da54fe72f34916ec1456192c81efe40e846c03ad0a78cb460a3420f6a0
|
| 3 |
+
size 251071621
|
deeplabv3plus_r101_512x512_face-occlusion.py
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
norm_cfg = dict(type="SyncBN", requires_grad=True)
|
| 2 |
+
|
| 3 |
+
data_preprocessor = dict(
|
| 4 |
+
bgr_to_rgb=True,
|
| 5 |
+
mean=[123.675, 116.28, 103.53],
|
| 6 |
+
pad_val=0,
|
| 7 |
+
seg_pad_val=255,
|
| 8 |
+
size=(512, 512),
|
| 9 |
+
std=[58.395, 57.12, 57.375],
|
| 10 |
+
type="SegDataPreProcessor",
|
| 11 |
+
)
|
| 12 |
+
|
| 13 |
+
test_pipeline = [
|
| 14 |
+
dict(type="LoadImageFromNDArray"),
|
| 15 |
+
dict(type="Resize", scale=(512, 512), keep_ratio=True),
|
| 16 |
+
dict(type="LoadAnnotations", reduce_zero_label=True),
|
| 17 |
+
dict(type="PackSegInputs"),
|
| 18 |
+
]
|
| 19 |
+
|
| 20 |
+
img_ratios = [0.5, 0.75, 1.0, 1.25, 1.5, 1.75]
|
| 21 |
+
tta_model = dict(type="SegTTAModel")
|
| 22 |
+
tta_pipeline = [
|
| 23 |
+
dict(type="LoadImageFromNDArray", backend_args=None),
|
| 24 |
+
dict(
|
| 25 |
+
type="TestTimeAug",
|
| 26 |
+
transforms=[
|
| 27 |
+
[dict(type="Resize", scale_factor=r, keep_ratio=True) for r in img_ratios],
|
| 28 |
+
[
|
| 29 |
+
dict(type="RandomFlip", prob=0.0, direction="horizontal"),
|
| 30 |
+
dict(type="RandomFlip", prob=1.0, direction="horizontal"),
|
| 31 |
+
],
|
| 32 |
+
[dict(type="LoadAnnotations")],
|
| 33 |
+
[dict(type="PackSegInputs")],
|
| 34 |
+
],
|
| 35 |
+
),
|
| 36 |
+
]
|
| 37 |
+
|
| 38 |
+
model = dict(
|
| 39 |
+
type="EncoderDecoder",
|
| 40 |
+
data_preprocessor=data_preprocessor,
|
| 41 |
+
pretrained="open-mmlab://resnet101_v1c",
|
| 42 |
+
backbone=dict(
|
| 43 |
+
type="ResNetV1c",
|
| 44 |
+
depth=101,
|
| 45 |
+
num_stages=4,
|
| 46 |
+
out_indices=(0, 1, 2, 3),
|
| 47 |
+
dilations=(1, 1, 2, 4),
|
| 48 |
+
strides=(1, 2, 1, 1),
|
| 49 |
+
norm_cfg=norm_cfg,
|
| 50 |
+
norm_eval=False,
|
| 51 |
+
style="pytorch",
|
| 52 |
+
contract_dilation=True,
|
| 53 |
+
),
|
| 54 |
+
decode_head=dict(
|
| 55 |
+
type="DepthwiseSeparableASPPHead",
|
| 56 |
+
in_channels=2048,
|
| 57 |
+
in_index=3,
|
| 58 |
+
channels=512,
|
| 59 |
+
dilations=(1, 12, 24, 36),
|
| 60 |
+
c1_in_channels=256,
|
| 61 |
+
c1_channels=48,
|
| 62 |
+
dropout_ratio=0.1,
|
| 63 |
+
num_classes=2,
|
| 64 |
+
norm_cfg=norm_cfg,
|
| 65 |
+
align_corners=False,
|
| 66 |
+
loss_decode=dict(type="CrossEntropyLoss", use_sigmoid=False, loss_weight=1.0),
|
| 67 |
+
sampler=dict(type="OHEMPixelSampler", thresh=0.7, min_kept=10000),
|
| 68 |
+
),
|
| 69 |
+
auxiliary_head=dict(
|
| 70 |
+
type="FCNHead",
|
| 71 |
+
in_channels=1024,
|
| 72 |
+
in_index=2,
|
| 73 |
+
channels=256,
|
| 74 |
+
num_convs=1,
|
| 75 |
+
concat_input=False,
|
| 76 |
+
dropout_ratio=0.1,
|
| 77 |
+
num_classes=2,
|
| 78 |
+
norm_cfg=norm_cfg,
|
| 79 |
+
align_corners=False,
|
| 80 |
+
loss_decode=dict(type="CrossEntropyLoss", use_sigmoid=False, loss_weight=0.4),
|
| 81 |
+
),
|
| 82 |
+
train_cfg=dict(),
|
| 83 |
+
test_cfg=dict(mode="whole"),
|
| 84 |
+
)
|