SkeletonGait
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
# SkeletonGait: Gait Recognition Using Skeleton Maps
|
||||
|
||||
This [paper](https://arxiv.org/abs/2311.13444) has been accepted by AAAI 2023.
|
||||
|
||||
## Step 1: Generating Heatmap
|
||||
Leveraging the power of Distributed Data Parallel (DDP), we've streamlined the heatmap generation process. Below is the script to initiate the generation:
|
||||
```
|
||||
CUDA_VISIBLE_DEVICES=0,1,2,3 \
|
||||
python -m torch.distributed.launch \
|
||||
--nproc_per_node=4 \
|
||||
datasets/pretreatment_heatmap.py \
|
||||
--pose_data_path=<your pose .pkl files path> \
|
||||
--save_root=<your_path> \
|
||||
--dataset_name=<dataset_name>
|
||||
```
|
||||
|
||||
Parameter Guide:
|
||||
- `--pose_data_path`: Specifies the directory containing the pose data files (`.pkl`, ID-Level). This is **required**.
|
||||
- `--save_root`: Designates the root directory for storing the generated heatmap files (`.pkl`, ID-Level). This is **required**.
|
||||
- `--dataset_name`: The name of the dataset undergoing preprocessing. This is required.
|
||||
- `--ext_name`: An **optional** suffix for the 'save_root' directory to facilitate identification. Defaults to an empty string.
|
||||
- `--heatmap_cfg_path`: Path to the configuration file of the heatmap generator. The default setting is `configs/skeletongait/pretreatment_heatmap.yaml`.
|
||||
|
||||
**Optional**
|
||||
|
||||
## Step 2: Creating Symbolic Links for Heatmap and Silhouette Data
|
||||
|
||||
The script to symlink heatmaps and silouettes is as follows:
|
||||
|
||||
```
|
||||
python datasets/ln_sil_heatmap.py \
|
||||
--heatmap_data_path=<path_to_your_heatmap_folder> \
|
||||
--silhouette_data_path=<path_to_your_silhouette_folder> \
|
||||
--output_path=<path_to_your_output_folder>
|
||||
```
|
||||
|
||||
Parameter Guide:
|
||||
- `--heatmap_data_path`: The **absolute** path to your heatmap data. This is **required**.
|
||||
- `--silhouette_data_path`: The **absolute** path to your silhouette data. This is **required**.
|
||||
- `--output_path`: Designates the directory for linked output data. This is **required**.
|
||||
- `--dataset_pkl_ext_name`: An **optional** parameter to specify the extension for `.pkl` silhouette files. Defaults to `.pkl`.
|
||||
|
||||
## Step3: Training SkeletonGait or SkeletonGait++
|
||||
|
||||
The script to SkeletonGait is as follows:
|
||||
|
||||
```
|
||||
CUDA_VISIBLE_DEVICES=0,1,2,3 \
|
||||
python -m torch.distributed.launch \
|
||||
--nproc_per_node=4 opengait/main.py \
|
||||
--cfgs ./configs/skeletongait/skeletongait_Gait3D.yaml \
|
||||
--phase train --log_to_file
|
||||
```
|
||||
|
||||
The script to SkeletonGait++ is as follows:
|
||||
|
||||
```
|
||||
CUDA_VISIBLE_DEVICES=0,1,2,3 \
|
||||
python -m torch.distributed.launch \
|
||||
--nproc_per_node=4 opengait/main.py \
|
||||
--cfgs ./configs/skeletongait/skeletongait++_Gait3D.yaml \
|
||||
--phase train --log_to_file
|
||||
```
|
||||
@@ -0,0 +1,25 @@
|
||||
coco18tococo17_args:
|
||||
transfer_to_coco17: False # OU-MVLP and CCPG is True, Other is False
|
||||
|
||||
padkeypoints_args:
|
||||
pad_method: knn # knn or simple
|
||||
use_conf: True # Indicates whether confidence scores.
|
||||
|
||||
norm_args:
|
||||
pose_format: coco # coco or openpose-x where 'x' can be either 18 or 25, indicating the number of keypoints used by the OpenPose model
|
||||
use_conf: ${padkeypoints_args.use_conf}
|
||||
heatmap_image_height: 128 # Sets the height (in pixels) for the heatmap images that will be normlization
|
||||
|
||||
heatmap_generator_args:
|
||||
sigma: 8.0 # The standard deviation of the Gaussian kernel used to generate the heatmaps
|
||||
use_score: ${padkeypoints_args.use_conf}
|
||||
img_h: ${norm_args.heatmap_image_height}
|
||||
img_w: ${norm_args.heatmap_image_height}
|
||||
with_limb: null # this auto set in the code
|
||||
with_kp: null # this auto set in the code
|
||||
|
||||
align_args:
|
||||
align: True # Indicates whether the images will be aligned
|
||||
final_img_size: 64 # Sets the size (in pixels) for the final images
|
||||
offset: 0
|
||||
heatmap_image_size: ${norm_args.heatmap_image_height}
|
||||
@@ -0,0 +1,98 @@
|
||||
data_cfg:
|
||||
dataset_name: CCPG
|
||||
dataset_root: your_path
|
||||
dataset_partition: ./datasets/CCPG/CCPG.json
|
||||
num_workers: 1
|
||||
data_in_use: [True, True] # heatmap, sil
|
||||
remove_no_gallery: false # Remove probe if no gallery for it
|
||||
test_dataset_name: CCPG
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 60000
|
||||
save_name: SkeletonGaitPP
|
||||
eval_func: evaluate_CCPG
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 4
|
||||
sample_type: all_ordered # all indicates whole sequence used to test, while ordered means input sequence by its natural order; Other options: fixed_unordered
|
||||
frames_all_limit: 720 # limit the number of sampled frames to prevent out of memory
|
||||
metric: euc # cos
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
|
||||
loss_cfg:
|
||||
- loss_term_weights: 1.0
|
||||
margin: 0.2
|
||||
type: TripletLoss
|
||||
log_prefix: triplet
|
||||
- loss_term_weights: 1.0
|
||||
scale: 16
|
||||
type: CrossEntropyLoss
|
||||
log_prefix: softmax
|
||||
log_accuracy: true
|
||||
|
||||
model_cfg:
|
||||
model: SkeletonGaitPP
|
||||
Backbone:
|
||||
in_channels: 3
|
||||
blocks:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
C: 2
|
||||
SeparateBNNecks:
|
||||
class_num: 100
|
||||
|
||||
optimizer_cfg:
|
||||
lr: 0.1
|
||||
momentum: 0.9
|
||||
solver: SGD
|
||||
weight_decay: 0.0005
|
||||
|
||||
scheduler_cfg:
|
||||
gamma: 0.1
|
||||
milestones: # Learning Rate Reduction at each milestones
|
||||
- 20000
|
||||
- 30000
|
||||
- 40000
|
||||
scheduler: MultiStepLR
|
||||
|
||||
trainer_cfg:
|
||||
enable_float16: true # half_percesion float for memory reduction and speedup
|
||||
fix_BN: false
|
||||
log_iter: 100
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 30000
|
||||
save_iter: 10000
|
||||
save_name: DeepGaitV2_P3D_GaitMap_B1C2_Sigma-8.0_Hot_False_Align-True_OpenGaitDA-True_ML_LowLevel
|
||||
sync_BN: true
|
||||
total_iter: 60000
|
||||
sampler:
|
||||
batch_shuffle: true
|
||||
batch_size:
|
||||
- 8 # TripletSampler, batch_size[0] indicates Number of Identity
|
||||
- 16 # batch_size[1] indicates Samples sequqnce for each Identity
|
||||
frames_num_fixed: 30 # fixed frames number for training
|
||||
frames_skip_num: 4
|
||||
sample_type: fixed_ordered # fixed control input frames number, unordered for controlling order of input tensor; Other options: unfixed_ordered or all_ordered
|
||||
type: TripletSampler
|
||||
transform:
|
||||
# - type: Compose
|
||||
# trf_cfg:
|
||||
# - type: BaseSilCuttingTransform
|
||||
# - type: RandomHorizontalFlip
|
||||
# prob: 0.5
|
||||
- type: Compose
|
||||
trf_cfg:
|
||||
- type: RandomPerspective
|
||||
prob: 0.2
|
||||
- type: BaseSilCuttingTransform
|
||||
- type: RandomHorizontalFlip
|
||||
prob: 0.2
|
||||
- type: RandomRotate
|
||||
prob: 0.2
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
data_cfg:
|
||||
dataset_name: GREW
|
||||
dataset_root: your_path
|
||||
dataset_partition: ./datasets/GREW/GREW.json
|
||||
num_workers: 1
|
||||
data_in_use: [True, True] # heatmap, sil
|
||||
remove_no_gallery: false # Remove probe if no gallery for it
|
||||
test_dataset_name: GREW
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 180000
|
||||
save_name: SkeletonGaitPP
|
||||
eval_func: GREW_submission
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 4
|
||||
sample_type: all_ordered # all indicates whole sequence used to test, while ordered means input sequence by its natural order; Other options: fixed_unordered
|
||||
frames_all_limit: 720 # limit the number of sampled frames to prevent out of memory
|
||||
metric: euc # cos
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
|
||||
loss_cfg:
|
||||
- loss_term_weights: 1.0
|
||||
margin: 0.2
|
||||
type: TripletLoss
|
||||
log_prefix: triplet
|
||||
- loss_term_weights: 1.0
|
||||
scale: 16
|
||||
type: CrossEntropyLoss
|
||||
log_prefix: softmax
|
||||
log_accuracy: true
|
||||
|
||||
model_cfg:
|
||||
model: SkeletonGaitPP
|
||||
Backbone:
|
||||
in_channels: 3
|
||||
blocks:
|
||||
- 1
|
||||
- 4
|
||||
- 4
|
||||
- 1
|
||||
C: 2
|
||||
SeparateBNNecks:
|
||||
class_num: 20000
|
||||
|
||||
optimizer_cfg:
|
||||
lr: 0.1
|
||||
momentum: 0.9
|
||||
solver: SGD
|
||||
weight_decay: 0.0005
|
||||
|
||||
scheduler_cfg:
|
||||
gamma: 0.1
|
||||
milestones: # Learning Rate Reduction at each milestones
|
||||
- 80000
|
||||
- 120000
|
||||
- 150000
|
||||
scheduler: MultiStepLR
|
||||
|
||||
trainer_cfg:
|
||||
enable_float16: true # half_percesion float for memory reduction and speedup
|
||||
fix_BN: false
|
||||
log_iter: 100
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 0
|
||||
save_iter: 30000
|
||||
save_name: SkeletonGaitPP
|
||||
sync_BN: true
|
||||
total_iter: 180000
|
||||
sampler:
|
||||
batch_shuffle: true
|
||||
batch_size:
|
||||
- 32 # TripletSampler, batch_size[0] indicates Number of Identity
|
||||
- 4 # batch_size[1] indicates Samples sequqnce for each Identity
|
||||
frames_num_fixed: 30 # fixed frames number for training
|
||||
frames_skip_num: 4
|
||||
sample_type: fixed_ordered # fixed control input frames number, unordered for controlling order of input tensor; Other options: unfixed_ordered or all_ordered
|
||||
type: TripletSampler
|
||||
transform:
|
||||
- type: Compose
|
||||
trf_cfg:
|
||||
- type: RandomPerspective
|
||||
prob: 0.2
|
||||
- type: BaseSilCuttingTransform
|
||||
- type: RandomHorizontalFlip
|
||||
prob: 0.2
|
||||
- type: RandomRotate
|
||||
prob: 0.2
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
data_cfg:
|
||||
dataset_name: Gait3D
|
||||
dataset_root: /data3/gait_heatmap_data/Gait3D/heatmap_sil
|
||||
dataset_partition: ./datasets/Gait3D/Gait3D.json
|
||||
num_workers: 1
|
||||
data_in_use: [True, True] # heatmap, sil
|
||||
remove_no_gallery: false # Remove probe if no gallery for it
|
||||
test_dataset_name: Gait3D
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 60000
|
||||
save_name: SkeletonGaitPP # LowLevel
|
||||
eval_func: evaluate_Gait3D
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 4
|
||||
sample_type: all_ordered # all indicates whole sequence used to test, while ordered means input sequence by its natural order; Other options: fixed_unordered
|
||||
frames_all_limit: 720 # limit the number of sampled frames to prevent out of memory
|
||||
metric: euc # cos
|
||||
transform:
|
||||
- type: BaseSilTransform
|
||||
|
||||
loss_cfg:
|
||||
- loss_term_weights: 1.0
|
||||
margin: 0.2
|
||||
type: TripletLoss
|
||||
log_prefix: triplet
|
||||
- loss_term_weights: 1.0
|
||||
scale: 16
|
||||
type: CrossEntropyLoss
|
||||
log_prefix: softmax
|
||||
log_accuracy: true
|
||||
|
||||
model_cfg:
|
||||
model: SkeletonGaitPP
|
||||
Backbone:
|
||||
in_channels: 3
|
||||
blocks:
|
||||
- 1
|
||||
- 4
|
||||
- 4
|
||||
- 1
|
||||
C: 2
|
||||
SeparateBNNecks:
|
||||
class_num: 3000
|
||||
|
||||
optimizer_cfg:
|
||||
lr: 0.1
|
||||
momentum: 0.9
|
||||
solver: SGD
|
||||
weight_decay: 0.0005
|
||||
|
||||
scheduler_cfg:
|
||||
gamma: 0.1
|
||||
milestones: # Learning Rate Reduction at each milestones
|
||||
- 20000
|
||||
- 30000
|
||||
- 40000
|
||||
scheduler: MultiStepLR
|
||||
|
||||
trainer_cfg:
|
||||
enable_float16: true # half_percesion float for memory reduction and speedup
|
||||
fix_BN: false
|
||||
log_iter: 100
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 0
|
||||
save_iter: 10000
|
||||
save_name: SkeletonGaitPP # LowLevel
|
||||
sync_BN: true
|
||||
total_iter: 60000
|
||||
sampler:
|
||||
batch_shuffle: true
|
||||
batch_size:
|
||||
- 4 # TripletSampler, batch_size[0] indicates Number of Identity
|
||||
- 4 # batch_size[1] indicates Samples sequqnce for each Identity
|
||||
frames_num_fixed: 30 # fixed frames number for training
|
||||
frames_skip_num: 4
|
||||
sample_type: fixed_ordered # fixed control input frames number, unordered for controlling order of input tensor; Other options: unfixed_ordered or all_ordered
|
||||
type: TripletSampler
|
||||
transform:
|
||||
- type: Compose
|
||||
trf_cfg:
|
||||
- type: RandomPerspective
|
||||
prob: 0.2
|
||||
- type: BaseSilTransform
|
||||
- type: RandomHorizontalFlip
|
||||
prob: 0.2
|
||||
- type: RandomRotate
|
||||
prob: 0.2
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
data_cfg:
|
||||
dataset_name: SUSTech1K
|
||||
dataset_root: your_path
|
||||
dataset_partition: ./datasets/SUSTech1K/SUSTech1K.json
|
||||
num_workers: 4
|
||||
data_in_use: [True, True] # heatmap, sil
|
||||
remove_no_gallery: false # Remove probe if no gallery for it
|
||||
test_dataset_name: SUSTech1K
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 50000
|
||||
save_name: SkeletonGaitPP
|
||||
eval_func: evaluate_indoor_dataset #evaluate_Gait3D
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 4
|
||||
sample_type: all_ordered # all indicates whole sequence used to test, while ordered means input sequence by its natural order; Other options: fixed_unordered
|
||||
frames_all_limit: 720 # limit the number of sampled frames to prevent out of memory
|
||||
metric: euc # cos
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
|
||||
loss_cfg:
|
||||
- loss_term_weight: 1.0
|
||||
margin: 0.2
|
||||
type: TripletLoss
|
||||
log_prefix: triplet
|
||||
- loss_term_weight: 1.0
|
||||
scale: 16
|
||||
type: CrossEntropyLoss
|
||||
log_prefix: softmax
|
||||
log_accuracy: true
|
||||
|
||||
model_cfg:
|
||||
model: SkeletonGaitPP
|
||||
Backbone:
|
||||
in_channels: 3
|
||||
blocks:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
C: 2
|
||||
SeparateBNNecks:
|
||||
class_num: 250
|
||||
|
||||
optimizer_cfg:
|
||||
lr: 0.1
|
||||
momentum: 0.9
|
||||
solver: SGD
|
||||
weight_decay: 0.0005
|
||||
|
||||
scheduler_cfg:
|
||||
gamma: 0.1
|
||||
milestones: # Learning Rate Reduction at each milestones
|
||||
- 20000
|
||||
- 30000
|
||||
- 40000
|
||||
scheduler: MultiStepLR
|
||||
|
||||
trainer_cfg:
|
||||
enable_float16: true # half_percesion float for memory reduction and speedup
|
||||
fix_BN: false
|
||||
with_test: false #true
|
||||
log_iter: 100
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 20000
|
||||
save_iter: 10000
|
||||
save_name: SkeletonGaitPP
|
||||
sync_BN: true
|
||||
total_iter: 50000
|
||||
sampler:
|
||||
batch_shuffle: true
|
||||
batch_size:
|
||||
- 8 # TripletSampler, batch_size[0] indicates Number of Identity
|
||||
- 8 # batch_size[1] indicates Samples sequqnce for each Identity
|
||||
frames_num_fixed: 10 # fixed frames number for training
|
||||
frames_skip_num: 4
|
||||
sample_type: fixed_ordered # fixed control input frames number, unordered for controlling order of input tensor; Other options: unfixed_ordered or all_ordered
|
||||
type: TripletSampler
|
||||
transform:
|
||||
- type: Compose
|
||||
trf_cfg:
|
||||
- type: RandomPerspective
|
||||
prob: 0.2
|
||||
- type: BaseSilCuttingTransform
|
||||
- type: RandomHorizontalFlip
|
||||
prob: 0.2
|
||||
- type: RandomRotate
|
||||
prob: 0.2
|
||||
@@ -0,0 +1,99 @@
|
||||
data_cfg:
|
||||
dataset_name: CCPG
|
||||
dataset_root: your_path
|
||||
dataset_partition: ./datasets/CCPG/CCPG.json
|
||||
num_workers: 1
|
||||
data_in_use: [True, False] # heatmap, sil
|
||||
remove_no_gallery: false # Remove probe if no gallery for it
|
||||
test_dataset_name: CCPG
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 60000
|
||||
save_name: SkeletonGait
|
||||
eval_func: evaluate_CCPG
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 4
|
||||
sample_type: all_ordered # all indicates whole sequence used to test, while ordered means input sequence by its natural order; Other options: fixed_unordered
|
||||
frames_all_limit: 720 # limit the number of sampled frames to prevent out of memory
|
||||
metric: euc # cos
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
|
||||
loss_cfg:
|
||||
- loss_term_weights: 1.0
|
||||
margin: 0.2
|
||||
type: TripletLoss
|
||||
log_prefix: triplet
|
||||
- loss_term_weights: 1.0
|
||||
scale: 16
|
||||
type: CrossEntropyLoss
|
||||
log_prefix: softmax
|
||||
log_accuracy: true
|
||||
|
||||
model_cfg:
|
||||
model: DeepGaitV2
|
||||
Backbone:
|
||||
in_channels: 2
|
||||
mode: p3d
|
||||
layers:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
channels:
|
||||
- 64
|
||||
- 128
|
||||
- 256
|
||||
- 512
|
||||
SeparateBNNecks:
|
||||
class_num: 100
|
||||
use_emb2: true
|
||||
|
||||
optimizer_cfg:
|
||||
lr: 0.1
|
||||
momentum: 0.9
|
||||
solver: SGD
|
||||
weight_decay: 0.0005
|
||||
|
||||
scheduler_cfg:
|
||||
gamma: 0.1
|
||||
milestones: # Learning Rate Reduction at each milestones
|
||||
- 20000
|
||||
- 30000
|
||||
- 40000
|
||||
scheduler: MultiStepLR
|
||||
|
||||
trainer_cfg:
|
||||
enable_float16: true # half_percesion float for memory reduction and speedup
|
||||
fix_BN: false
|
||||
log_iter: 100
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 0
|
||||
save_iter: 10000
|
||||
save_name: SkeletonGait
|
||||
sync_BN: true
|
||||
total_iter: 60000
|
||||
sampler:
|
||||
batch_shuffle: true
|
||||
batch_size:
|
||||
- 8 # TripletSampler, batch_size[0] indicates Number of Identity
|
||||
- 16 # batch_size[1] indicates Samples sequqnce for each Identity
|
||||
frames_num_fixed: 30 # fixed frames number for training
|
||||
frames_skip_num: 4
|
||||
sample_type: fixed_ordered # fixed control input frames number, unordered for controlling order of input tensor; Other options: unfixed_ordered or all_ordered
|
||||
type: TripletSampler
|
||||
transform:
|
||||
- type: Compose
|
||||
trf_cfg:
|
||||
- type: RandomPerspective
|
||||
prob: 0.2
|
||||
- type: BaseSilCuttingTransform
|
||||
- type: RandomHorizontalFlip
|
||||
prob: 0.2
|
||||
- type: RandomRotate
|
||||
prob: 0.2
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
data_cfg:
|
||||
dataset_name: GREW
|
||||
dataset_root: your_path
|
||||
dataset_partition: ./datasets/GREW/GREW.json
|
||||
num_workers: 1
|
||||
data_in_use: [True, False] # heatmap, sil
|
||||
remove_no_gallery: false # Remove probe if no gallery for it
|
||||
test_dataset_name: GREW
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 180000
|
||||
save_name: SkeletonGait
|
||||
eval_func: GREW_submission
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 4
|
||||
sample_type: all_ordered # all indicates whole sequence used to test, while ordered means input sequence by its natural order; Other options: fixed_unordered
|
||||
frames_all_limit: 720 # limit the number of sampled frames to prevent out of memory
|
||||
metric: euc # cos
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
|
||||
loss_cfg:
|
||||
- loss_term_weights: 1.0
|
||||
margin: 0.2
|
||||
type: TripletLoss
|
||||
log_prefix: triplet
|
||||
- loss_term_weights: 1.0
|
||||
scale: 16
|
||||
type: CrossEntropyLoss
|
||||
log_prefix: softmax
|
||||
log_accuracy: true
|
||||
|
||||
model_cfg:
|
||||
model: DeepGaitV2
|
||||
Backbone:
|
||||
in_channels: 2
|
||||
mode: p3d
|
||||
layers:
|
||||
- 1
|
||||
- 4
|
||||
- 4
|
||||
- 1
|
||||
channels:
|
||||
- 64
|
||||
- 128
|
||||
- 256
|
||||
- 512
|
||||
SeparateBNNecks:
|
||||
class_num: 20000
|
||||
|
||||
optimizer_cfg:
|
||||
lr: 0.1
|
||||
momentum: 0.9
|
||||
solver: SGD
|
||||
weight_decay: 0.0005
|
||||
|
||||
scheduler_cfg:
|
||||
gamma: 0.1
|
||||
milestones: # Learning Rate Reduction at each milestones
|
||||
- 80000
|
||||
- 120000
|
||||
- 150000
|
||||
scheduler: MultiStepLR
|
||||
|
||||
trainer_cfg:
|
||||
enable_float16: true # half_percesion float for memory reduction and speedup
|
||||
fix_BN: false
|
||||
log_iter: 100
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 90000
|
||||
save_iter: 30000
|
||||
save_name: SkeletonGait
|
||||
sync_BN: true
|
||||
total_iter: 180000
|
||||
sampler:
|
||||
batch_shuffle: true
|
||||
batch_size:
|
||||
- 32 # TripletSampler, batch_size[0] indicates Number of Identity
|
||||
- 4 # batch_size[1] indicates Samples sequqnce for each Identity
|
||||
frames_num_fixed: 30 # fixed frames number for training
|
||||
frames_skip_num: 4
|
||||
sample_type: fixed_ordered # fixed control input frames number, unordered for controlling order of input tensor; Other options: unfixed_ordered or all_ordered
|
||||
type: TripletSampler
|
||||
transform:
|
||||
- type: Compose
|
||||
trf_cfg:
|
||||
- type: RandomPerspective
|
||||
prob: 0.2
|
||||
- type: BaseSilCuttingTransform
|
||||
- type: RandomHorizontalFlip
|
||||
prob: 0.2
|
||||
- type: RandomRotate
|
||||
prob: 0.2
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
data_cfg:
|
||||
dataset_name: Gait3D
|
||||
dataset_root: /data3/gait_heatmap_data/Gait3D/heatmap_sil
|
||||
dataset_partition: ./datasets/Gait3D/Gait3D.json
|
||||
num_workers: 1
|
||||
data_in_use: [True, False] # heatmap, sil
|
||||
remove_no_gallery: false # Remove probe if no gallery for it
|
||||
test_dataset_name: Gait3D
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 60000
|
||||
save_name: SkeletonGait
|
||||
eval_func: evaluate_Gait3D
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 4
|
||||
sample_type: all_ordered # all indicates whole sequence used to test, while ordered means input sequence by its natural order; Other options: fixed_unordered
|
||||
frames_all_limit: 720 # limit the number of sampled frames to prevent out of memory
|
||||
metric: euc # cos
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
|
||||
loss_cfg:
|
||||
- loss_term_weights: 1.0
|
||||
margin: 0.2
|
||||
type: TripletLoss
|
||||
log_prefix: triplet
|
||||
- loss_term_weights: 1.0
|
||||
scale: 16
|
||||
type: CrossEntropyLoss
|
||||
log_prefix: softmax
|
||||
log_accuracy: true
|
||||
|
||||
model_cfg:
|
||||
model: DeepGaitV2
|
||||
Backbone:
|
||||
in_channels: 2
|
||||
mode: p3d
|
||||
layers:
|
||||
- 1
|
||||
- 4
|
||||
- 4
|
||||
- 1
|
||||
channels:
|
||||
- 64
|
||||
- 128
|
||||
- 256
|
||||
- 512
|
||||
SeparateBNNecks:
|
||||
class_num: 3000
|
||||
|
||||
optimizer_cfg:
|
||||
lr: 0.1
|
||||
momentum: 0.9
|
||||
solver: SGD
|
||||
weight_decay: 0.0005
|
||||
|
||||
scheduler_cfg:
|
||||
gamma: 0.1
|
||||
milestones: # Learning Rate Reduction at each milestones
|
||||
- 20000
|
||||
- 30000
|
||||
- 40000
|
||||
scheduler: MultiStepLR
|
||||
|
||||
trainer_cfg:
|
||||
enable_float16: true # half_percesion float for memory reduction and speedup
|
||||
fix_BN: false
|
||||
log_iter: 100
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 0
|
||||
save_iter: 10000
|
||||
save_name: SkeletonGait
|
||||
sync_BN: true
|
||||
total_iter: 60000
|
||||
sampler:
|
||||
batch_shuffle: true
|
||||
batch_size:
|
||||
- 4 # TripletSampler, batch_size[0] indicates Number of Identity
|
||||
- 4 # batch_size[1] indicates Samples sequqnce for each Identity
|
||||
frames_num_fixed: 30 # fixed frames number for training
|
||||
frames_skip_num: 4
|
||||
sample_type: fixed_ordered # fixed control input frames number, unordered for controlling order of input tensor; Other options: unfixed_ordered or all_ordered
|
||||
type: TripletSampler
|
||||
transform:
|
||||
- type: Compose
|
||||
trf_cfg:
|
||||
- type: RandomPerspective
|
||||
prob: 0.2
|
||||
- type: BaseSilCuttingTransform
|
||||
- type: RandomHorizontalFlip
|
||||
prob: 0.2
|
||||
- type: RandomRotate
|
||||
prob: 0.2
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
data_cfg:
|
||||
dataset_name: OUMVLP
|
||||
dataset_root: your_path
|
||||
dataset_partition: ./datasets/OUMVLP/OUMVLP.json
|
||||
num_workers: 1
|
||||
data_in_use: [True, False] # heatmap, sil
|
||||
remove_no_gallery: false # Remove probe if no gallery for it
|
||||
test_dataset_name: OUMVLP
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 120000
|
||||
save_name: SkeletonGait
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 4
|
||||
sample_type: all_ordered # all indicates whole sequence used to test, while ordered means input sequence by its natural order; Other options: fixed_unordered
|
||||
frames_all_limit: 720 # limit the number of sampled frames to prevent out of memory
|
||||
metric: euc # cos
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
|
||||
loss_cfg:
|
||||
- loss_term_weights: 1.0
|
||||
margin: 0.2
|
||||
type: TripletLoss
|
||||
log_prefix: triplet
|
||||
- loss_term_weights: 1.0
|
||||
scale: 16
|
||||
type: CrossEntropyLoss
|
||||
log_prefix: softmax
|
||||
log_accuracy: true
|
||||
|
||||
model_cfg:
|
||||
model: DeepGaitV2
|
||||
Backbone:
|
||||
in_channels: 2
|
||||
mode: p3d
|
||||
layers:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
channels:
|
||||
- 64
|
||||
- 128
|
||||
- 256
|
||||
- 512
|
||||
SeparateBNNecks:
|
||||
class_num: 5153
|
||||
|
||||
optimizer_cfg:
|
||||
lr: 0.1
|
||||
momentum: 0.9
|
||||
solver: SGD
|
||||
weight_decay: 0.0005
|
||||
|
||||
scheduler_cfg:
|
||||
gamma: 0.1
|
||||
milestones: # Learning Rate Reduction at each milestones
|
||||
- 60000
|
||||
- 80000
|
||||
- 100000
|
||||
scheduler: MultiStepLR
|
||||
|
||||
trainer_cfg:
|
||||
enable_float16: true # half_percesion float for memory reduction and speedup
|
||||
fix_BN: false
|
||||
log_iter: 100
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 0
|
||||
save_iter: 20000
|
||||
save_name: SkeletonGait
|
||||
sync_BN: true
|
||||
total_iter: 120000
|
||||
sampler:
|
||||
batch_shuffle: true
|
||||
batch_size:
|
||||
- 32 # TripletSampler, batch_size[0] indicates Number of Identity
|
||||
- 8 # batch_size[1] indicates Samples sequqnce for each Identity
|
||||
frames_num_fixed: 30 # fixed frames number for training
|
||||
frames_skip_num: 4
|
||||
sample_type: fixed_ordered # fixed control input frames number, unordered for controlling order of input tensor; Other options: unfixed_ordered or all_ordered
|
||||
type: TripletSampler
|
||||
transform:
|
||||
- type: Compose
|
||||
trf_cfg:
|
||||
- type: BaseSilCuttingTransform
|
||||
- type: RandomHorizontalFlip
|
||||
prob: 0.5
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
data_cfg:
|
||||
dataset_name: SUSTech1K
|
||||
dataset_root: your_path
|
||||
dataset_partition: ./datasets/SUSTech1K/SUSTech1K.json
|
||||
num_workers: 4
|
||||
data_in_use: [True, False] # heatmap, sil
|
||||
remove_no_gallery: false # Remove probe if no gallery for it
|
||||
test_dataset_name: SUSTech1K
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 50000
|
||||
save_name: SkeletonGait
|
||||
eval_func: evaluate_indoor_dataset #evaluate_Gait3D
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 4
|
||||
sample_type: all_ordered # all indicates whole sequence used to test, while ordered means input sequence by its natural order; Other options: fixed_unordered
|
||||
frames_all_limit: 720 # limit the number of sampled frames to prevent out of memory
|
||||
metric: euc # cos
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
|
||||
loss_cfg:
|
||||
- loss_term_weight: 1.0
|
||||
margin: 0.2
|
||||
type: TripletLoss
|
||||
log_prefix: triplet
|
||||
- loss_term_weight: 1.0
|
||||
scale: 16
|
||||
type: CrossEntropyLoss
|
||||
log_prefix: softmax
|
||||
log_accuracy: true
|
||||
|
||||
model_cfg:
|
||||
model: DeepGaitV2
|
||||
Backbone:
|
||||
in_channels: 2
|
||||
mode: p3d
|
||||
layers:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
channels:
|
||||
- 64
|
||||
- 128
|
||||
- 256
|
||||
- 512
|
||||
SeparateBNNecks:
|
||||
class_num: 250
|
||||
|
||||
optimizer_cfg:
|
||||
lr: 0.1
|
||||
momentum: 0.9
|
||||
solver: SGD
|
||||
weight_decay: 0.0005
|
||||
|
||||
scheduler_cfg:
|
||||
gamma: 0.1
|
||||
milestones: # Learning Rate Reduction at each milestones
|
||||
- 20000
|
||||
- 30000
|
||||
- 40000
|
||||
scheduler: MultiStepLR
|
||||
|
||||
trainer_cfg:
|
||||
enable_float16: true # half_percesion float for memory reduction and speedup
|
||||
fix_BN: false
|
||||
with_test: true #true
|
||||
log_iter: 100
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 0
|
||||
save_iter: 10000
|
||||
save_name: SkeletonGait
|
||||
sync_BN: true
|
||||
total_iter: 50000
|
||||
sampler:
|
||||
batch_shuffle: true
|
||||
batch_size:
|
||||
- 8 # TripletSampler, batch_size[0] indicates Number of Identity
|
||||
- 8 # batch_size[1] indicates Samples sequqnce for each Identity
|
||||
frames_num_fixed: 10 # fixed frames number for training
|
||||
sample_type: fixed_unordered # fixed control input frames number, unordered for controlling order of input tensor; Other options: unfixed_ordered or all_ordered
|
||||
type: TripletSampler
|
||||
transform:
|
||||
- type: Compose
|
||||
trf_cfg:
|
||||
- type: RandomPerspective
|
||||
prob: 0.2
|
||||
- type: BaseSilCuttingTransform
|
||||
- type: RandomHorizontalFlip
|
||||
prob: 0.2
|
||||
- type: RandomRotate
|
||||
prob: 0.2
|
||||
Reference in New Issue
Block a user