diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index c08061c..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.idea
-__pycache__
-.DS_Store
diff --git a/.idea/deployment.xml b/.idea/deployment.xml
new file mode 100644
index 0000000..9c831a3
--- /dev/null
+++ b/.idea/deployment.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..c23ecac
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..3839421
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..58a09c1
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/reid_baseline_for_opensource.iml b/.idea/reid_baseline_for_opensource.iml
new file mode 100644
index 0000000..b0a0eaa
--- /dev/null
+++ b/.idea/reid_baseline_for_opensource.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/webServers.xml b/.idea/webServers.xml
new file mode 100644
index 0000000..5673dbe
--- /dev/null
+++ b/.idea/webServers.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..00d9730
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,957 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cfg
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ DEFINITION_ORDER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1552715946759
+
+
+ 1552715946759
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Experiment-all_tricks-tri_center-duke.sh b/Experiment-all_tricks-tri_center-duke.sh
new file mode 100644
index 0000000..65b2444
--- /dev/null
+++ b/Experiment-all_tricks-tri_center-duke.sh
@@ -0,0 +1,11 @@
+# Experiment all tricks with center loss : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005
+# Dataset 2: dukemtmc
+# imagesize: 256x128
+# batchsize: 16x4
+# warmup_step 10
+# random erase prob 0.5
+# labelsmooth: on
+# last stride 1
+# bnneck on
+# with center loss
+python3 tools/train.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('3')" DATASETS.NAMES "('dukemtmc')" OUTPUT_DIR "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/dukemtmc/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005')"
\ No newline at end of file
diff --git a/Experiment-all_tricks-tri_center-market.sh b/Experiment-all_tricks-tri_center-market.sh
new file mode 100644
index 0000000..92389f5
--- /dev/null
+++ b/Experiment-all_tricks-tri_center-market.sh
@@ -0,0 +1,11 @@
+# Experiment all tricks with center loss : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005
+# Dataset 1: market1501
+# imagesize: 256x128
+# batchsize: 16x4
+# warmup_step 10
+# random erase prob 0.5
+# labelsmooth: on
+# last stride 1
+# bnneck on
+# with center loss
+python3 tools/train.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('2')" DATASETS.NAMES "('market1501')" OUTPUT_DIR "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/market1501/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005')"
\ No newline at end of file
diff --git a/Experiment-all_tricks-duke.sh b/Experiment-all_tricks-without_center-duke.sh
similarity index 61%
rename from Experiment-all_tricks-duke.sh
rename to Experiment-all_tricks-without_center-duke.sh
index bc34944..06ba3cc 100644
--- a/Experiment-all_tricks-duke.sh
+++ b/Experiment-all_tricks-without_center-duke.sh
@@ -1,4 +1,4 @@
-# Experiment 6 : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on (=raw all trick, softmax_triplet.yml)
+# Experiment all tricks without center loss : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on
# Dataset 2: dukemtmc
# imagesize: 256x128
# batchsize: 16x4
@@ -7,6 +7,5 @@
# labelsmooth: on
# last stride 1
# bnneck on
-# SOLVER.WARMUP_ITERS 10 MODEL.LAST_STRIDE 1 INPUT.RE_PROB 0.5 MODEL.NECK "('bnneck')"
-
+# without center loss
python3 tools/train.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('1')" DATASETS.NAMES "('dukemtmc')" OUTPUT_DIR "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/dukemtmc/Experiment-all-tricks-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on')"
\ No newline at end of file
diff --git a/Experiment-all_tricks-market.sh b/Experiment-all_tricks-without_center-market.sh
similarity index 69%
rename from Experiment-all_tricks-market.sh
rename to Experiment-all_tricks-without_center-market.sh
index eb36fbe..7577246 100644
--- a/Experiment-all_tricks-market.sh
+++ b/Experiment-all_tricks-without_center-market.sh
@@ -1,4 +1,4 @@
-# Experiment parameters : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on (=raw all trick, softmax_triplet.yml)
+# Experiment all tricks without center loss : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on
# Dataset 1: market1501
# imagesize: 256x128
# batchsize: 16x4
@@ -7,5 +7,5 @@
# labelsmooth: on
# last stride 1
# bnneck on
-
+# without center loss
python3 tools/train.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('market1501')" OUTPUT_DIR "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/market1501/Experiment-all-tricks-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on')"
\ No newline at end of file
diff --git a/Experiment-all_trickts-tri_center-duke.sh b/Experiment-all_trickts-tri_center-duke.sh
deleted file mode 100644
index 0aa1b5b..0000000
--- a/Experiment-all_trickts-tri_center-duke.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Experiment 9-4 : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005
-# Dataset 2: dukemtmc
-# imagesize: 256x128
-# batchsize: 16x4
-# warmup_step 10
-# random erase prob 0.5
-# labelsmooth: on
-# last stride 1
-# bnneck on
-
-python3 tools/train.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('3')" DATASETS.NAMES "('dukemtmc')" MODEL.IF_WITH_CENTER "('yes')" MODEL.METRIC_LOSS_TYPE "('triplet_center')" OUTPUT_DIR "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/dukemtmc/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005')"
\ No newline at end of file
diff --git a/Experiment-all_trickts-tri_center-market.sh b/Experiment-all_trickts-tri_center-market.sh
deleted file mode 100644
index 191e5af..0000000
--- a/Experiment-all_trickts-tri_center-market.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Experiment 9-4 : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005
-# Dataset 1: market1501
-# imagesize: 256x128
-# batchsize: 16x4
-# warmup_step 10
-# random erase prob 0.5
-# labelsmooth: on
-# last stride 1
-# bnneck on
-
-python3 tools/train.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('2')" DATASETS.NAMES "('market1501')" MODEL.IF_WITH_CENTER "('yes')" MODEL.METRIC_LOSS_TYPE "('triplet_center')" OUTPUT_DIR "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/market1501/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005')"
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 33c3781..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2019 Hao Luo
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/README.md b/README.md
index 6e66bf0..5e1de8f 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-# ReID Strong Baseline
-Paper:Bags of Tricks and A Strong Baseline for Deep Person Re-identiļ¬cation.
+# Bags of Tricks and A Strong ReID Baseline
+Paper:
The codes are expanded on a [ReID-baseline](https://github.com/L1aoXingyu/reid_baseline) , which is open sourced by our co-author Xingyu Liao.
We support
@@ -83,7 +83,7 @@ python3 tools/train.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_
```bash
-python3 tools/train.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('dukemtmc')" MODEL.IF_WITH_CENTER "('yes')" MODEL.METRIC_LOSS_TYPE "('triplet_center')" OUTPUT_DIR "('your path to save checkpoints and logs')"
+python3 tools/train.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('dukemtmc')" OUTPUT_DIR "('your path to save checkpoints and logs')"
```
## Test
@@ -92,17 +92,17 @@ You can test your model's performance directly by running these commands in `.sh
1. Test with Euclidean distance using feature before BN without re-ranking,.
```bash
-python3 tools/test.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('market1501')" MODEL.IF_WITH_CENTER "('yes')" MODEL.METRIC_LOSS_TYPE "('triplet_center')" TEST.NECK_FEAT "('before')" TEST.FEAT_NORM "('no')" TEST.WEIGHT "('your path to trained checkpoints')"
+python3 tools/test.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('market1501')" TEST.NECK_FEAT "('before')" TEST.FEAT_NORM "('no')" TEST.WEIGHT "('your path to trained checkpoints')"
```
2. Test with Cosine distance using feature after BN without re-ranking,.
```bash
-python3 tools/test.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('market1501')" MODEL.IF_WITH_CENTER "('yes')" MODEL.METRIC_LOSS_TYPE "('triplet_center')" TEST.NECK_FEAT "('after')" TEST.FEAT_NORM "('yes')" TEST.WEIGHT "('your path to trained checkpoints')"
+python3 tools/test.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('market1501')" TEST.NECK_FEAT "('after')" TEST.FEAT_NORM "('yes')" TEST.WEIGHT "('your path to trained checkpoints')"
```
3. Test with Cosine distance using feature after BN with re-ranking
```bash
-python3 tools/test.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('dukemtmc')" MODEL.IF_WITH_CENTER "('yes')" MODEL.METRIC_LOSS_TYPE "('triplet_center')" TEST.NECK_FEAT "('after')" TEST.FEAT_NORM "('yes')" TEST.RE_RANKING "('yes')" TEST.WEIGHT "('your path to trained checkpoints')"
+python3 tools/test.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('dukemtmc')" TEST.NECK_FEAT "('after')" TEST.FEAT_NORM "('yes')" TEST.RE_RANKING "('yes')" TEST.WEIGHT "('your path to trained checkpoints')"
```
## Results
diff --git a/Test-all_tricks-duke.sh b/Test-all_tricks-duke.sh
deleted file mode 100644
index 43e01ce..0000000
--- a/Test-all_tricks-duke.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Experiment 6 : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on (=raw all trick, softmax_triplet.yml)
-# Dataset 2: dukemtmc
-# imagesize: 256x128
-# batchsize: 16x4
-# warmup_step 10
-# random erase prob 0.5
-# labelsmooth: on
-# last stride 1
-# bnneck on
-
-python3 tools/test.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('1')" DATASETS.NAMES "('dukemtmc')" TEST.NECK_FEAT "('after')" TEST.FEAT_NORM "('yes')" TEST.WEIGHT "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/dukemtmc/Experiment-all-tricks-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on/resnet50_model_120.pth')"
\ No newline at end of file
diff --git a/Test-all_tricks-market.sh b/Test-all_tricks-market.sh
deleted file mode 100644
index 321b85b..0000000
--- a/Test-all_tricks-market.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Experiment 6 : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on (=raw all trick, softmax_triplet.yml)
-# Dataset 1: market1501
-# imagesize: 256x128
-# batchsize: 16x4
-# warmup_step 10
-# random erase prob 0.5
-# labelsmooth: on
-# last stride 1
-# bnneck on
-
-python3 tools/test.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('market1501')" TEST.NECK_FEAT "('after')" TEST.FEAT_NORM "('yes')" TEST.WEIGHT "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/market1501/Experiment-all-tricks-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on/resnet50_model_120.pth')"
\ No newline at end of file
diff --git a/Test-all_tricks-tri_center-duke.sh b/Test-all_tricks-tri_center-duke.sh
deleted file mode 100644
index d5eb650..0000000
--- a/Test-all_tricks-tri_center-duke.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Experiment 9-4 : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005
-# Dataset 2: dukemtmc
-# imagesize: 256x128
-# batchsize: 16x4
-# warmup_step 10
-# random erase prob 0.5
-# labelsmooth: on
-# last stride 1
-# bnneck on
-
-python3 tools/test.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('1')" DATASETS.NAMES "('dukemtmc')" MODEL.IF_WITH_CENTER "('yes')" MODEL.METRIC_LOSS_TYPE "('triplet_center')" TEST.NECK_FEAT "('after')" TEST.FEAT_NORM "('yes')" TEST.WEIGHT "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/dukemtmc/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005/resnet50_model_120.pth')"
\ No newline at end of file
diff --git a/Test-all_tricks-tri_center-feat_after_bn-cos-duke.sh b/Test-all_tricks-tri_center-feat_after_bn-cos-duke.sh
new file mode 100644
index 0000000..0dac9b6
--- /dev/null
+++ b/Test-all_tricks-tri_center-feat_after_bn-cos-duke.sh
@@ -0,0 +1,12 @@
+# Experiment all tricks without center loss without re-ranking: 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on
+# Dataset 2: dukemtmc
+# imagesize: 256x128
+# batchsize: 16x4
+# warmup_step 10
+# random erase prob 0.5
+# labelsmooth: on
+# last stride 1
+# bnneck on
+# with center loss
+# without re-ranking
+python3 tools/test.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('1')" DATASETS.NAMES "('dukemtmc')" TEST.WEIGHT "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/dukemtmc/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005/resnet50_model_120.pth')"
\ No newline at end of file
diff --git a/Test-all_tricks-tri_center-feat_after_bn-cos-market.sh b/Test-all_tricks-tri_center-feat_after_bn-cos-market.sh
new file mode 100644
index 0000000..b3db9a6
--- /dev/null
+++ b/Test-all_tricks-tri_center-feat_after_bn-cos-market.sh
@@ -0,0 +1,12 @@
+# Experiment all tricks without center loss : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on
+# Dataset 1: market1501
+# imagesize: 256x128
+# batchsize: 16x4
+# warmup_step 10
+# random erase prob 0.5
+# labelsmooth: on
+# last stride 1
+# bnneck on
+# with center loss
+# without re-ranking
+python3 tools/test.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('market1501')" TEST.WEIGHT "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/market1501/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005/resnet50_model_120.pth')"
\ No newline at end of file
diff --git a/Test-all_tricks-without_center-feat_after_bn-cos-duke.sh b/Test-all_tricks-without_center-feat_after_bn-cos-duke.sh
new file mode 100644
index 0000000..9d98f8e
--- /dev/null
+++ b/Test-all_tricks-without_center-feat_after_bn-cos-duke.sh
@@ -0,0 +1,12 @@
+# Experiment all tricks without center loss without re-ranking: 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on
+# Dataset 2: dukemtmc
+# imagesize: 256x128
+# batchsize: 16x4
+# warmup_step 10
+# random erase prob 0.5
+# labelsmooth: on
+# last stride 1
+# bnneck on
+# without center loss
+# without re-ranking
+python3 tools/test.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('1')" DATASETS.NAMES "('dukemtmc')" TEST.WEIGHT "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/dukemtmc/Experiment-all-tricks-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on/resnet50_model_120.pth')"
\ No newline at end of file
diff --git a/Test-all_tricks-without_center-feat_after_bn-cos-market.sh b/Test-all_tricks-without_center-feat_after_bn-cos-market.sh
new file mode 100644
index 0000000..a641d53
--- /dev/null
+++ b/Test-all_tricks-without_center-feat_after_bn-cos-market.sh
@@ -0,0 +1,12 @@
+# Experiment all tricks without center loss without re-ranking: 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on (=raw all trick, softmax_triplet.yml)
+# Dataset 1: market1501
+# imagesize: 256x128
+# batchsize: 16x4
+# warmup_step 10
+# random erase prob 0.5
+# labelsmooth: on
+# last stride 1
+# bnneck on
+# without center loss
+# without re-ranking
+python3 tools/test.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('market1501')" TEST.WEIGHT "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/market1501/Experiment-all-tricks-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on/resnet50_model_120.pth')"
\ No newline at end of file
diff --git a/Test-reranking-all_tricks-tri_center-feat_after_bn-cos-duke.sh b/Test-reranking-all_tricks-tri_center-feat_after_bn-cos-duke.sh
new file mode 100644
index 0000000..c4c35d5
--- /dev/null
+++ b/Test-reranking-all_tricks-tri_center-feat_after_bn-cos-duke.sh
@@ -0,0 +1,12 @@
+# Experiment all tricks without center loss with re-ranking : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005
+# Dataset 2: dukemtmc
+# imagesize: 256x128
+# batchsize: 16x4
+# warmup_step 10
+# random erase prob 0.5
+# labelsmooth: on
+# last stride 1
+# bnneck on
+# with center loss
+# with re-ranking
+python3 tools/test.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('1')" DATASETS.NAMES "('dukemtmc')" TEST.RE_RANKING "('yes')" TEST.WEIGHT "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/dukemtmc/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005/resnet50_model_120.pth')"
\ No newline at end of file
diff --git a/Test-reranking-all_tricks-tri_center-feat_after_bn-cos-market.sh b/Test-reranking-all_tricks-tri_center-feat_after_bn-cos-market.sh
new file mode 100644
index 0000000..845f43f
--- /dev/null
+++ b/Test-reranking-all_tricks-tri_center-feat_after_bn-cos-market.sh
@@ -0,0 +1,12 @@
+# Experiment all tricks without center loss with re-ranking : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005
+# Dataset 1: market1501
+# imagesize: 256x128
+# batchsize: 16x4
+# warmup_step 10
+# random erase prob 0.5
+# labelsmooth: on
+# last stride 1
+# bnneck on
+# with center loss
+# with re-ranking
+python3 tools/test.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('market1501')" TEST.RE_RANKING "('yes')" TEST.WEIGHT "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/market1501/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005/resnet50_model_120.pth')"
\ No newline at end of file
diff --git a/Test_feat_after_bn-9-4-1_with_norm.sh b/Test_feat_after_bn-9-4-1_with_norm.sh
deleted file mode 100644
index ce8b7aa..0000000
--- a/Test_feat_after_bn-9-4-1_with_norm.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Experiment 9-4 : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005
-# Dataset 1: market1501
-# imagesize: 256x128
-# batchsize: 16x4
-# warmup_step 10
-# random erase prob 0.5
-# labelsmooth: on
-# last stride 1
-# bnneck on
-
-python3 tools/test.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('market1501')" MODEL.IF_WITH_CENTER "('yes')" MODEL.METRIC_LOSS_TYPE "('triplet_center')" TEST.NECK_FEAT "('after')" TEST.FEAT_NORM "('yes')" TEST.WEIGHT "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/market1501/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005/resnet50_model_120.pth')"
\ No newline at end of file
diff --git a/Test_reranking_feat_after_bn-9-4-1_with_norm.sh b/Test_reranking_feat_after_bn-9-4-1_with_norm.sh
deleted file mode 100644
index 4964e2b..0000000
--- a/Test_reranking_feat_after_bn-9-4-1_with_norm.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Experiment 9-4 : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005
-# Dataset 1: market1501
-# imagesize: 256x128
-# batchsize: 16x4
-# warmup_step 10
-# random erase prob 0.5
-# labelsmooth: on
-# last stride 1
-# bnneck on
-
-python3 tools/test.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('market1501')" MODEL.IF_WITH_CENTER "('yes')" MODEL.METRIC_LOSS_TYPE "('triplet_center')" TEST.NECK_FEAT "('after')" TEST.FEAT_NORM "('yes')" TEST.RE_RANKING "('yes')" TEST.WEIGHT "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/market1501/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005/resnet50_model_120.pth')"
\ No newline at end of file
diff --git a/Test_reranking_feat_after_bn-9-4-2_with_norm.sh b/Test_reranking_feat_after_bn-9-4-2_with_norm.sh
deleted file mode 100644
index 0db15b0..0000000
--- a/Test_reranking_feat_after_bn-9-4-2_with_norm.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Experiment 9-4 : 256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005
-# Dataset 2: dukemtmc
-# imagesize: 256x128
-# batchsize: 16x4
-# warmup_step 10
-# random erase prob 0.5
-# labelsmooth: on
-# last stride 1
-# bnneck on
-
-python3 tools/test.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('1')" DATASETS.NAMES "('dukemtmc')" MODEL.IF_WITH_CENTER "('yes')" MODEL.METRIC_LOSS_TYPE "('triplet_center')" TEST.NECK_FEAT "('after')" TEST.FEAT_NORM "('yes')" TEST.RE_RANKING "('yes')" TEST.WEIGHT "('/home/haoluo/log/gu/reid_baseline_review/Opensource_test/dukemtmc/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005/resnet50_model_120.pth')"
\ No newline at end of file
diff --git a/config/__pycache__/__init__.cpython-36.pyc b/config/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..650eb12
Binary files /dev/null and b/config/__pycache__/__init__.cpython-36.pyc differ
diff --git a/config/__pycache__/defaults.cpython-36.pyc b/config/__pycache__/defaults.cpython-36.pyc
new file mode 100644
index 0000000..55356b3
Binary files /dev/null and b/config/__pycache__/defaults.cpython-36.pyc differ
diff --git a/configs/softmax_triplet_with_center.yml b/configs/softmax_triplet_with_center.yml
new file mode 100644
index 0000000..5d5fcf2
--- /dev/null
+++ b/configs/softmax_triplet_with_center.yml
@@ -0,0 +1,66 @@
+MODEL:
+ PRETRAIN_PATH: '/home/haoluo/.torch/models/resnet50-19c8e357.pth'
+ METRIC_LOSS_TYPE: 'triplet_center'
+ IF_LABELSMOOTH: 'on'
+ IF_WITH_CENTER: 'yes'
+
+
+
+
+INPUT:
+ SIZE_TRAIN: [256, 128]
+ SIZE_TEST: [256, 128]
+ PROB: 0.5 # random horizontal flip
+ RE_PROB: 0.5 # random erasing
+ PADDING: 10
+
+DATASETS:
+ NAMES: ('market1501')
+
+DATALOADER:
+ SAMPLER: 'softmax_triplet'
+ NUM_INSTANCE: 4
+ NUM_WORKERS: 8
+
+SOLVER:
+ OPTIMIZER_NAME: 'Adam'
+ MAX_EPOCHS: 120
+ BASE_LR: 0.00035
+
+ CLUSTER_MARGIN: 0.3
+
+ CENTER_LR: 0.5
+ CENTER_LOSS_WEIGHT: 0.0005
+
+ RANGE_K: 2
+ RANGE_MARGIN: 0.3
+ RANGE_ALPHA: 0
+ RANGE_BETA: 1
+ RANGE_LOSS_WEIGHT: 1
+
+ BIAS_LR_FACTOR: 1
+ WEIGHT_DECAY: 0.0005
+ WEIGHT_DECAY_BIAS: 0.0005
+ IMS_PER_BATCH: 64
+
+ STEPS: [40, 70]
+ GAMMA: 0.1
+
+ WARMUP_FACTOR: 0.01
+ WARMUP_ITERS: 10
+ WARMUP_METHOD: 'linear'
+
+ CHECKPOINT_PERIOD: 40
+ LOG_PERIOD: 20
+ EVAL_PERIOD: 40
+
+TEST:
+ IMS_PER_BATCH: 128
+ RE_RANKING: 'no'
+ WEIGHT: "path"
+ NECK_FEAT: 'after'
+ FEAT_NORM: 'yes'
+
+OUTPUT_DIR: "/home/haoluo/log/gu/reid_baseline_review/Opensource_test/market1501/Experiment-all-tricks-tri_center-256x128-bs16x4-warmup10-erase0_5-labelsmooth_on-laststride1-bnneck_on-triplet_centerloss0_0005"
+
+
diff --git a/data/__pycache__/__init__.cpython-36.pyc b/data/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..481d977
Binary files /dev/null and b/data/__pycache__/__init__.cpython-36.pyc differ
diff --git a/data/__pycache__/build.cpython-36.pyc b/data/__pycache__/build.cpython-36.pyc
new file mode 100644
index 0000000..18d00f6
Binary files /dev/null and b/data/__pycache__/build.cpython-36.pyc differ
diff --git a/data/__pycache__/collate_batch.cpython-36.pyc b/data/__pycache__/collate_batch.cpython-36.pyc
new file mode 100644
index 0000000..efcd466
Binary files /dev/null and b/data/__pycache__/collate_batch.cpython-36.pyc differ
diff --git a/data/datasets/__pycache__/__init__.cpython-36.pyc b/data/datasets/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..abd64c6
Binary files /dev/null and b/data/datasets/__pycache__/__init__.cpython-36.pyc differ
diff --git a/data/datasets/__pycache__/bases.cpython-36.pyc b/data/datasets/__pycache__/bases.cpython-36.pyc
new file mode 100644
index 0000000..eca78ce
Binary files /dev/null and b/data/datasets/__pycache__/bases.cpython-36.pyc differ
diff --git a/data/datasets/__pycache__/cuhk03.cpython-36.pyc b/data/datasets/__pycache__/cuhk03.cpython-36.pyc
new file mode 100644
index 0000000..a198341
Binary files /dev/null and b/data/datasets/__pycache__/cuhk03.cpython-36.pyc differ
diff --git a/data/datasets/__pycache__/dataset_loader.cpython-36.pyc b/data/datasets/__pycache__/dataset_loader.cpython-36.pyc
new file mode 100644
index 0000000..c7cc944
Binary files /dev/null and b/data/datasets/__pycache__/dataset_loader.cpython-36.pyc differ
diff --git a/data/datasets/__pycache__/dukemtmcreid.cpython-36.pyc b/data/datasets/__pycache__/dukemtmcreid.cpython-36.pyc
new file mode 100644
index 0000000..89ac13e
Binary files /dev/null and b/data/datasets/__pycache__/dukemtmcreid.cpython-36.pyc differ
diff --git a/data/datasets/__pycache__/eval_reid.cpython-36.pyc b/data/datasets/__pycache__/eval_reid.cpython-36.pyc
new file mode 100644
index 0000000..945e138
Binary files /dev/null and b/data/datasets/__pycache__/eval_reid.cpython-36.pyc differ
diff --git a/data/datasets/__pycache__/market1501.cpython-36.pyc b/data/datasets/__pycache__/market1501.cpython-36.pyc
new file mode 100644
index 0000000..62dc7c2
Binary files /dev/null and b/data/datasets/__pycache__/market1501.cpython-36.pyc differ
diff --git a/data/datasets/__pycache__/msmt17.cpython-36.pyc b/data/datasets/__pycache__/msmt17.cpython-36.pyc
new file mode 100644
index 0000000..23af486
Binary files /dev/null and b/data/datasets/__pycache__/msmt17.cpython-36.pyc differ
diff --git a/data/samplers/__pycache__/__init__.cpython-36.pyc b/data/samplers/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..dbe29cb
Binary files /dev/null and b/data/samplers/__pycache__/__init__.cpython-36.pyc differ
diff --git a/data/samplers/__pycache__/triplet_sampler.cpython-36.pyc b/data/samplers/__pycache__/triplet_sampler.cpython-36.pyc
new file mode 100644
index 0000000..40473ad
Binary files /dev/null and b/data/samplers/__pycache__/triplet_sampler.cpython-36.pyc differ
diff --git a/data/transforms/__pycache__/__init__.cpython-36.pyc b/data/transforms/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..8badfe9
Binary files /dev/null and b/data/transforms/__pycache__/__init__.cpython-36.pyc differ
diff --git a/data/transforms/__pycache__/build.cpython-36.pyc b/data/transforms/__pycache__/build.cpython-36.pyc
new file mode 100644
index 0000000..ffdbfe7
Binary files /dev/null and b/data/transforms/__pycache__/build.cpython-36.pyc differ
diff --git a/data/transforms/__pycache__/transforms.cpython-36.pyc b/data/transforms/__pycache__/transforms.cpython-36.pyc
new file mode 100644
index 0000000..623ac7a
Binary files /dev/null and b/data/transforms/__pycache__/transforms.cpython-36.pyc differ
diff --git a/engine/__pycache__/inference.cpython-36.pyc b/engine/__pycache__/inference.cpython-36.pyc
new file mode 100644
index 0000000..0d3f1b6
Binary files /dev/null and b/engine/__pycache__/inference.cpython-36.pyc differ
diff --git a/engine/__pycache__/trainer.cpython-36.pyc b/engine/__pycache__/trainer.cpython-36.pyc
new file mode 100644
index 0000000..e30a38d
Binary files /dev/null and b/engine/__pycache__/trainer.cpython-36.pyc differ
diff --git a/layers/__pycache__/__init__.cpython-36.pyc b/layers/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..bd686a3
Binary files /dev/null and b/layers/__pycache__/__init__.cpython-36.pyc differ
diff --git a/layers/__pycache__/center_loss.cpython-36.pyc b/layers/__pycache__/center_loss.cpython-36.pyc
new file mode 100644
index 0000000..53ced23
Binary files /dev/null and b/layers/__pycache__/center_loss.cpython-36.pyc differ
diff --git a/layers/__pycache__/cluster_loss.cpython-36.pyc b/layers/__pycache__/cluster_loss.cpython-36.pyc
new file mode 100644
index 0000000..841f759
Binary files /dev/null and b/layers/__pycache__/cluster_loss.cpython-36.pyc differ
diff --git a/layers/__pycache__/range_loss.cpython-36.pyc b/layers/__pycache__/range_loss.cpython-36.pyc
new file mode 100644
index 0000000..511ced7
Binary files /dev/null and b/layers/__pycache__/range_loss.cpython-36.pyc differ
diff --git a/layers/__pycache__/triplet_loss.cpython-36.pyc b/layers/__pycache__/triplet_loss.cpython-36.pyc
new file mode 100644
index 0000000..2ff0df0
Binary files /dev/null and b/layers/__pycache__/triplet_loss.cpython-36.pyc differ
diff --git a/modeling/__pycache__/__init__.cpython-36.pyc b/modeling/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..2a4aa1a
Binary files /dev/null and b/modeling/__pycache__/__init__.cpython-36.pyc differ
diff --git a/modeling/__pycache__/baseline.cpython-36.pyc b/modeling/__pycache__/baseline.cpython-36.pyc
new file mode 100644
index 0000000..ea4b0e7
Binary files /dev/null and b/modeling/__pycache__/baseline.cpython-36.pyc differ
diff --git a/modeling/backbones/__pycache__/__init__.cpython-36.pyc b/modeling/backbones/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..f12f47c
Binary files /dev/null and b/modeling/backbones/__pycache__/__init__.cpython-36.pyc differ
diff --git a/modeling/backbones/__pycache__/resnet.cpython-36.pyc b/modeling/backbones/__pycache__/resnet.cpython-36.pyc
new file mode 100644
index 0000000..e8ffa12
Binary files /dev/null and b/modeling/backbones/__pycache__/resnet.cpython-36.pyc differ
diff --git a/solver/__pycache__/__init__.cpython-36.pyc b/solver/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..3f94541
Binary files /dev/null and b/solver/__pycache__/__init__.cpython-36.pyc differ
diff --git a/solver/__pycache__/build.cpython-36.pyc b/solver/__pycache__/build.cpython-36.pyc
new file mode 100644
index 0000000..cd83225
Binary files /dev/null and b/solver/__pycache__/build.cpython-36.pyc differ
diff --git a/solver/__pycache__/lr_scheduler.cpython-36.pyc b/solver/__pycache__/lr_scheduler.cpython-36.pyc
new file mode 100644
index 0000000..ac56d26
Binary files /dev/null and b/solver/__pycache__/lr_scheduler.cpython-36.pyc differ
diff --git a/utils/__pycache__/__init__.cpython-36.pyc b/utils/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..99041a6
Binary files /dev/null and b/utils/__pycache__/__init__.cpython-36.pyc differ
diff --git a/utils/__pycache__/iotools.cpython-36.pyc b/utils/__pycache__/iotools.cpython-36.pyc
new file mode 100644
index 0000000..3cefa53
Binary files /dev/null and b/utils/__pycache__/iotools.cpython-36.pyc differ
diff --git a/utils/__pycache__/logger.cpython-36.pyc b/utils/__pycache__/logger.cpython-36.pyc
new file mode 100644
index 0000000..1a5073e
Binary files /dev/null and b/utils/__pycache__/logger.cpython-36.pyc differ
diff --git a/utils/__pycache__/re_ranking.cpython-36.pyc b/utils/__pycache__/re_ranking.cpython-36.pyc
new file mode 100644
index 0000000..941e5f8
Binary files /dev/null and b/utils/__pycache__/re_ranking.cpython-36.pyc differ
diff --git a/utils/__pycache__/reid_metric.cpython-36.pyc b/utils/__pycache__/reid_metric.cpython-36.pyc
new file mode 100644
index 0000000..9b244e0
Binary files /dev/null and b/utils/__pycache__/reid_metric.cpython-36.pyc differ