Skip to content

Commit

Permalink
IMAG
Browse files Browse the repository at this point in the history
IMAG
  • Loading branch information
muzishen committed May 30, 2022
1 parent ba70dbb commit df37cac
Show file tree
Hide file tree
Showing 473 changed files with 75,227 additions and 0 deletions.
19 changes: 19 additions & 0 deletions configs/Base-AGW.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
_BASE_: Base-bagtricks.yml

MODEL:
BACKBONE:
WITH_NL: True

HEADS:
POOL_LAYER: GeneralizedMeanPooling

LOSSES:
NAME: ("CrossEntropyLoss", "TripletLoss")
CE:
EPSILON: 0.1
SCALE: 1.0

TRI:
MARGIN: 0.0
HARD_MINING: False
SCALE: 1.0
12 changes: 12 additions & 0 deletions configs/Base-MGN.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
_BASE_: Base-SBS.yml

MODEL:
META_ARCHITECTURE: MGN

FREEZE_LAYERS: [backbone, b1, b2, b3,]

BACKBONE:
WITH_NL: False

HEADS:
EMBEDDING_DIM: 256
63 changes: 63 additions & 0 deletions configs/Base-SBS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
_BASE_: Base-bagtricks.yml

MODEL:
FREEZE_LAYERS: [ backbone ]

BACKBONE:
WITH_NL: True

HEADS:
NECK_FEAT: after
POOL_LAYER: GeneralizedMeanPoolingP
CLS_LAYER: CircleSoftmax
SCALE: 64
MARGIN: 0.35

LOSSES:
NAME: ("CrossEntropyLoss", "TripletLoss",)
CE:
EPSILON: 0.1
SCALE: 1.0

TRI:
MARGIN: 0.0
HARD_MINING: True
NORM_FEAT: False
SCALE: 1.0

INPUT:
SIZE_TRAIN: [ 384, 128 ]
SIZE_TEST: [ 384, 128 ]

AUTOAUG:
ENABLED: True
PROB: 0.1

DATALOADER:
NUM_INSTANCE: 16

SOLVER:
AMP:
ENABLED: True
OPT: Adam
MAX_EPOCH: 60
BASE_LR: 0.00035
WEIGHT_DECAY: 0.0005
IMS_PER_BATCH: 64

SCHED: CosineAnnealingLR
DELAY_EPOCHS: 30
ETA_MIN_LR: 0.0000007

WARMUP_FACTOR: 0.1
WARMUP_ITERS: 2000

FREEZE_ITERS: 1000

CHECKPOINT_PERIOD: 20

TEST:
EVAL_PERIOD: 10
IMS_PER_BATCH: 128

CUDNN_BENCHMARK: True
76 changes: 76 additions & 0 deletions configs/Base-bagtricks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
MODEL:
META_ARCHITECTURE: Baseline

BACKBONE:
NAME: build_resnet_backbone
NORM: BN
DEPTH: 50x
LAST_STRIDE: 1
FEAT_DIM: 2048
WITH_IBN: False
PRETRAIN: True

HEADS:
NAME: EmbeddingHead
NORM: BN
WITH_BNNECK: True
POOL_LAYER: GlobalAvgPool
NECK_FEAT: before
CLS_LAYER: Linear

LOSSES:
NAME: ("CrossEntropyLoss", "TripletLoss",)

CE:
EPSILON: 0.1
SCALE: 1.

TRI:
MARGIN: 0.3
HARD_MINING: True
NORM_FEAT: False
SCALE: 1.

INPUT:
SIZE_TRAIN: [ 256, 128 ]
SIZE_TEST: [ 256, 128 ]

REA:
ENABLED: True
PROB: 0.5

FLIP:
ENABLED: True

PADDING:
ENABLED: True

DATALOADER:
SAMPLER_TRAIN: NaiveIdentitySampler
NUM_INSTANCE: 4
NUM_WORKERS: 8

SOLVER:
AMP:
ENABLED: True
OPT: Adam
MAX_EPOCH: 120
BASE_LR: 0.00035
WEIGHT_DECAY: 0.0005
WEIGHT_DECAY_NORM: 0.0005
IMS_PER_BATCH: 64

SCHED: MultiStepLR
STEPS: [ 40, 90 ]
GAMMA: 0.1

WARMUP_FACTOR: 0.1
WARMUP_ITERS: 2000

CHECKPOINT_PERIOD: 30

TEST:
EVAL_PERIOD: 30
IMS_PER_BATCH: 128

CUDNN_BENCHMARK: True
51 changes: 51 additions & 0 deletions configs/baseline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
_BASE_: Base-SBS.yml

MODEL:
BACKBONE:
NAME: build_resnet_backbone
WITH_IBN: True
DEPTH: 50x
FEAT_DIM: 2048
PRETRAIN: True
PRETRAIN_PATH: pretrain/resnet50_ibn_a-d9d0bb7b.pth


INPUT:
SIZE_TRAIN: [ 256, 256 ]
SIZE_TEST: [ 256, 256 ]


SOLVER:
MAX_EPOCH: 40
DELAY_EPOCHS: 5
BASE_LR: 0.00035
CHECKPOINT_PERIOD: 5
IMS_PER_BATCH: 64

WARMUP_FACTOR: 0.1
WARMUP_ITERS: 400

FREEZE_ITERS: 1000

DATALOADER:
SAMPLER_TRAIN: NaiveIdentitySampler
NUM_INSTANCE: 2
NUM_WORKERS: 8

TEST:
EVAL_PERIOD: 5

RERANK:
ENABLED: False
K1: 20
K2: 3
LAMBDA: 0.8

FLIP:
ENABLED: False

DATASETS:
NAMES: ("PetID",)
TESTS: ("PetID",)

OUTPUT_DIR: logs/baseline
131 changes: 131 additions & 0 deletions configs/baselinev1_s101_224.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
_BASE_: Base-SBS.yml

MODEL:
BACKBONE:
NAME: build_resnest_backbone
WITH_IBN: True
WITH_NL: True
WITH_SE: False
DEPTH: 101x
FEAT_DIM: 2048
PRETRAIN: True
PRETRAIN_PATH: 'pretrain/resnest101-22405ba7.pth'
NORM: BN

HEADS:
NECK_FEAT: after
POOL_LAYER: GeneralizedMeanPoolingP
CLS_LAYER: CosSoftmax
SCALE: 64
MARGIN: 0.35
NORM: BN


LOSSES:
NAME: ( "TripletLoss", "CircleLoss", "CrossEntropyLoss", )
CE:
EPSILON: 0.1
SCALE: 1.0

CIRCLE:
MARGIN: 0.35
GAMMA: 64
SCALE: 1.0


TRI:
MARGIN: 0.0
HARD_MINING: True
NORM_FEAT: False
SCALE: 1.0
INPUT:
SIZE_TRAIN: [224, 224]
SIZE_TEST: [224, 224]

CROP:
ENABLED: True
SIZE: [224, 224]
RATIO: [0.16, 1]
SCALE: [0.75, 1.33333]

REA:
ENABLED: False
PROB: 0.5
VALUE: [0, 0, 0]
RPT:
ENABLED: False
PROB: 0.5

BLUR:
ENABLED: True
KERNEL_SIZE : (5, 9)

FLIP:
ENABLED: True
PROB: 0.5

VFLIP:
ENABLED: False
PROB: 0.5

PADDING:
ENABLED: True
SIZE: 10

AUTOAUG:
ENABLED: True
PROB: 0.5

AUGMIX:
ENABLED: True
PROB: 0.5

AFFINE:
ENABLED: True

CJ:
ENABLED: True
BRIGHTNESS: 0.15
CONTRAST: 0.15
SATURATION: 0.1
HUE: 0.1
PROB: 0.5

SOLVER:
OPT: Adam
MAX_EPOCH: 35
DELAY_EPOCHS: 5
BASE_LR: 0.00035
HEADS_LR_FACTOR: 1.0
CHECKPOINT_PERIOD: 5
IMS_PER_BATCH: 80

WARMUP_FACTOR: 0.1
WARMUP_ITERS: 400

FREEZE_ITERS: 1000

DATALOADER:
SAMPLER_TRAIN: NaiveIdentitySampler
NUM_INSTANCE: 4
NUM_WORKERS: 8

TEST:
EVAL_PERIOD: 100000

METRIC: 'cosine'

RERANK:
ENABLED: False
K1: 20
K2: 3
LAMBDA: 0.8

FLIP:
ENABLED: False

DATASETS:
NAMES: ("PetID",)
TESTS: ("PetID",)

OUTPUT_DIR: logs/s101_224
13 changes: 13 additions & 0 deletions configs/baselinev1_s101_256.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
_BASE_: baselinev1_s101.yaml



INPUT:
SIZE_TRAIN: [256, 256]
SIZE_TEST: [256, 256]

CROP:
ENABLED: True
SIZE: [256, 256]

OUTPUT_DIR: logs/s101_256
12 changes: 12 additions & 0 deletions configs/baselinev1_s101_288.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
_BASE_: baselinev1_s101.yaml


INPUT:
SIZE_TRAIN: [288, 288]
SIZE_TEST: [288, 288]

CROP:
ENABLED: True
SIZE: [288, 288]

OUTPUT_DIR: logs/s101_288
Loading

0 comments on commit df37cac

Please sign in to comment.