Skip to content

Commit

Permalink
update fastreid V1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
L1aoXingyu committed Jan 18, 2021
1 parent 15213dd commit 15e1729
Show file tree
Hide file tree
Showing 177 changed files with 3,827 additions and 1,666 deletions.
4 changes: 2 additions & 2 deletions configs/Base-AGW.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
_BASE_: "Base-bagtricks.yml"
_BASE_: Base-bagtricks.yml

MODEL:
BACKBONE:
WITH_NL: True

HEADS:
POOL_LAYER: "gempool"
POOL_LAYER: gempool

LOSSES:
NAME: ("CrossEntropyLoss", "TripletLoss")
Expand Down
19 changes: 3 additions & 16 deletions configs/Base-MGN.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
_BASE_: "Base-SBS.yml"
_BASE_: Base-SBS.yml

MODEL:
META_ARCHITECTURE: 'MGN'
META_ARCHITECTURE: MGN

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

BACKBONE:
WITH_NL: False

HEADS:
EMBEDDING_DIM: 256

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

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

27 changes: 14 additions & 13 deletions configs/Base-SBS.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
_BASE_: "Base-bagtricks.yml"
_BASE_: Base-bagtricks.yml

MODEL:
FREEZE_LAYERS: ["backbone"]
FREEZE_LAYERS: [ backbone ]

BACKBONE:
WITH_NL: True

HEADS:
NECK_FEAT: "after"
POOL_LAYER: "gempoolP"
CLS_LAYER: "circleSoftmax"
NECK_FEAT: after
POOL_LAYER: gempoolP
CLS_LAYER: circleSoftmax
SCALE: 64
MARGIN: 0.35

Expand All @@ -26,8 +26,8 @@ MODEL:
SCALE: 1.0

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

DO_AUTOAUG: True
AUTOAUG_PROB: 0.1
Expand All @@ -36,27 +36,28 @@ DATALOADER:
NUM_INSTANCE: 16

SOLVER:
OPT: "Adam"
FP16_ENABLED: False
OPT: Adam
MAX_EPOCH: 60
BASE_LR: 0.00035
BIAS_LR_FACTOR: 1.
WEIGHT_DECAY: 0.0005
WEIGHT_DECAY_BIAS: 0.0005
IMS_PER_BATCH: 64

SCHED: "CosineAnnealingLR"
SCHED: CosineAnnealingLR
DELAY_EPOCHS: 30
ETA_MIN_LR: 0.00000077
ETA_MIN_LR: 0.0000007

WARMUP_FACTOR: 0.1
WARMUP_ITERS: 2000
WARMUP_EPOCHS: 10

FREEZE_ITERS: 2000
FREEZE_ITERS: 1000

CHECKPOINT_PERIOD: 20

TEST:
EVAL_PERIOD: 20
EVAL_PERIOD: 10
IMS_PER_BATCH: 128

CUDNN_BENCHMARK: True
31 changes: 15 additions & 16 deletions configs/Base-bagtricks.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
MODEL:
META_ARCHITECTURE: "Baseline"
META_ARCHITECTURE: Baseline

BACKBONE:
NAME: "build_resnet_backbone"
NORM: "BN"
DEPTH: "50x"
NAME: build_resnet_backbone
NORM: BN
DEPTH: 50x
LAST_STRIDE: 1
FEAT_DIM: 2048
WITH_IBN: False
PRETRAIN: True
PRETRAIN_PATH: "/export/home/lxy/.cache/torch/checkpoints/resnet50-19c8e357.pth"

HEADS:
NAME: "EmbeddingHead"
NORM: "BN"
NAME: EmbeddingHead
NORM: BN
WITH_BNNECK: True
POOL_LAYER: "avgpool"
NECK_FEAT: "before"
CLS_LAYER: "linear"
POOL_LAYER: avgpool
NECK_FEAT: before
CLS_LAYER: linear

LOSSES:
NAME: ("CrossEntropyLoss", "TripletLoss",)
Expand All @@ -33,8 +32,8 @@ MODEL:
SCALE: 1.

INPUT:
SIZE_TRAIN: [256, 128]
SIZE_TEST: [256, 128]
SIZE_TRAIN: [ 256, 128 ]
SIZE_TEST: [ 256, 128 ]
REA:
ENABLED: True
PROB: 0.5
Expand All @@ -48,20 +47,20 @@ DATALOADER:

SOLVER:
FP16_ENABLED: True
OPT: "Adam"
OPT: Adam
MAX_EPOCH: 120
BASE_LR: 0.00035
BIAS_LR_FACTOR: 2.
WEIGHT_DECAY: 0.0005
WEIGHT_DECAY_BIAS: 0.0005
IMS_PER_BATCH: 64

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

WARMUP_FACTOR: 0.1
WARMUP_ITERS: 2000
WARMUP_EPOCHS: 10

CHECKPOINT_PERIOD: 30

Expand Down
6 changes: 3 additions & 3 deletions configs/DukeMTMC/AGW_R101-ibn.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
_BASE_: "../Base-AGW.yml"
_BASE_: ../Base-AGW.yml

MODEL:
BACKBONE:
DEPTH: "101x"
DEPTH: 101x
WITH_IBN: True

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

OUTPUT_DIR: "logs/dukemtmc/agw_R101-ibn"
OUTPUT_DIR: logs/dukemtmc/agw_R101-ibn
4 changes: 2 additions & 2 deletions configs/DukeMTMC/AGW_R50-ibn.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_BASE_: "../Base-AGW.yml"
_BASE_: ../Base-AGW.yml

MODEL:
BACKBONE:
Expand All @@ -8,4 +8,4 @@ DATASETS:
NAMES: ("DukeMTMC",)
TESTS: ("DukeMTMC",)

OUTPUT_DIR: "logs/dukemtmc/agw_R50-ibn"
OUTPUT_DIR: logs/dukemtmc/agw_R50-ibn
4 changes: 2 additions & 2 deletions configs/DukeMTMC/AGW_R50.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
_BASE_: "../Base-AGW.yml"
_BASE_: ../Base-AGW.yml

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

OUTPUT_DIR: "logs/dukemtmc/agw_R50"
OUTPUT_DIR: logs/dukemtmc/agw_R50
6 changes: 3 additions & 3 deletions configs/DukeMTMC/AGW_S50.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
_BASE_: "../Base-AGW.yml"
_BASE_: ../Base-AGW.yml

MODEL:
BACKBONE:
NAME: "build_resnest_backbone"
NAME: build_resnest_backbone

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

OUTPUT_DIR: "logs/dukemtmc/agw_S50"
OUTPUT_DIR: logs/dukemtmc/agw_S50
6 changes: 3 additions & 3 deletions configs/DukeMTMC/bagtricks_R101-ibn.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
_BASE_: "../Base-bagtricks.yml"
_BASE_: ../Base-bagtricks.yml

MODEL:
BACKBONE:
DEPTH: "101x"
DEPTH: 101x
WITH_IBN: True

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

OUTPUT_DIR: "logs/dukemtmc/bagtricks_R101-ibn"
OUTPUT_DIR: logs/dukemtmc/bagtricks_R101-ibn
4 changes: 2 additions & 2 deletions configs/DukeMTMC/bagtricks_R50-ibn.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_BASE_: "../Base-bagtricks.yml"
_BASE_: ../Base-bagtricks.yml

MODEL:
BACKBONE:
Expand All @@ -8,4 +8,4 @@ DATASETS:
NAMES: ("DukeMTMC",)
TESTS: ("DukeMTMC",)

OUTPUT_DIR: "logs/dukemtmc/bagtricks_R50-ibn"
OUTPUT_DIR: logs/dukemtmc/bagtricks_R50-ibn
4 changes: 2 additions & 2 deletions configs/DukeMTMC/bagtricks_R50.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
_BASE_: "../Base-bagtricks.yml"
_BASE_: ../Base-bagtricks.yml

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

OUTPUT_DIR: "logs/dukemtmc/bagtricks_R50"
OUTPUT_DIR: logs/dukemtmc/bagtricks_R50
6 changes: 3 additions & 3 deletions configs/DukeMTMC/bagtricks_S50.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
_BASE_: "../Base-bagtricks.yml"
_BASE_: ../Base-bagtricks.yml

MODEL:
BACKBONE:
NAME: "build_resnest_backbone"
NAME: build_resnest_backbone

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

OUTPUT_DIR: "logs/dukemtmc/bagtricks_S50"
OUTPUT_DIR: logs/dukemtmc/bagtricks_S50
4 changes: 2 additions & 2 deletions configs/DukeMTMC/mgn_R50-ibn.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_BASE_: "../Base-MGN.yml"
_BASE_: ../Base-MGN.yml

MODEL:
BACKBONE:
Expand All @@ -8,4 +8,4 @@ DATASETS:
NAMES: ("DukeMTMC",)
TESTS: ("DukeMTMC",)

OUTPUT_DIR: "logs/dukemtmc/mgn_R50-ibn"
OUTPUT_DIR: logs/dukemtmc/mgn_R50-ibn
6 changes: 3 additions & 3 deletions configs/DukeMTMC/sbs_R101-ibn.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
_BASE_: "../Base-SBS.yml"
_BASE_: ../Base-SBS.yml

MODEL:
BACKBONE:
DEPTH: "101x"
DEPTH: 101x
WITH_IBN: True

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

OUTPUT_DIR: "logs/dukemtmc/sbs_R101-ibn"
OUTPUT_DIR: logs/dukemtmc/sbs_R101-ibn
4 changes: 2 additions & 2 deletions configs/DukeMTMC/sbs_R50-ibn.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_BASE_: "../Base-SBS.yml"
_BASE_: ../Base-SBS.yml

MODEL:
BACKBONE:
Expand All @@ -8,4 +8,4 @@ DATASETS:
NAMES: ("DukeMTMC",)
TESTS: ("DukeMTMC",)

OUTPUT_DIR: "logs/dukemtmc/sbs_R50-ibn"
OUTPUT_DIR: logs/dukemtmc/sbs_R50-ibn
4 changes: 2 additions & 2 deletions configs/DukeMTMC/sbs_R50.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
_BASE_: "../Base-SBS.yml"
_BASE_: ../Base-SBS.yml

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

OUTPUT_DIR: "logs/dukemtmc/sbs_R50"
OUTPUT_DIR: logs/dukemtmc/sbs_R50
6 changes: 3 additions & 3 deletions configs/DukeMTMC/sbs_S50.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
_BASE_: "../Base-SBS.yml"
_BASE_: ../Base-SBS.yml

MODEL:
BACKBONE:
NAME: "build_resnest_backbone"
NAME: build_resnest_backbone

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

OUTPUT_DIR: "logs/dukemtmc/sbs_S50"
OUTPUT_DIR: logs/dukemtmc/sbs_S50
6 changes: 3 additions & 3 deletions configs/MSMT17/AGW_R101-ibn.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
_BASE_: "../Base-AGW.yml"
_BASE_: ../Base-AGW.yml

MODEL:
BACKBONE:
DEPTH: "101x"
DEPTH: 101x
WITH_IBN: True

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

OUTPUT_DIR: "logs/msmt17/agw_R101-ibn"
OUTPUT_DIR: logs/msmt17/agw_R101-ibn
4 changes: 2 additions & 2 deletions configs/MSMT17/AGW_R50-ibn.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_BASE_: "../Base-AGW.yml"
_BASE_: ../Base-AGW.yml

MODEL:
BACKBONE:
Expand All @@ -8,4 +8,4 @@ DATASETS:
NAMES: ("MSMT17",)
TESTS: ("MSMT17",)

OUTPUT_DIR: "logs/msmt17/agw_R50-ibn"
OUTPUT_DIR: logs/msmt17/agw_R50-ibn
4 changes: 2 additions & 2 deletions configs/MSMT17/AGW_R50.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
_BASE_: "../Base-AGW.yml"
_BASE_: ../Base-AGW.yml

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

OUTPUT_DIR: "logs/msmt17/agw_R50"
OUTPUT_DIR: logs/msmt17/agw_R50
Loading

0 comments on commit 15e1729

Please sign in to comment.