feat: add drf author checkpoint compatibility bundle
This commit is contained in:
BIN
Binary file not shown.
@@ -0,0 +1,62 @@
|
||||
# DRF Author Checkpoint Artifact
|
||||
|
||||
This artifact bundle archives the author-provided DRF checkpoint together with the compatibility configs that make it usable in this repo.
|
||||
|
||||
Files:
|
||||
- `DRF_118_unordered_iter2w_lr0.001_8830-08000.pt`
|
||||
- `author_original_config.yaml`
|
||||
- `eval_112_1gpu.yaml`
|
||||
- `eval_118_defaultroot_1gpu.yaml`
|
||||
- `eval_118_splitroot_1gpu.yaml`
|
||||
- `eval_118_aligned_1gpu.yaml`
|
||||
- `eval_118_paper_1gpu.yaml`
|
||||
|
||||
Best recovered path:
|
||||
- config: `configs/drf/drf_author_eval_118_aligned_1gpu.yaml`
|
||||
- result:
|
||||
- `80.24 Acc / 76.73 Prec / 76.40 Rec / 76.56 F1`
|
||||
|
||||
## Run Commands
|
||||
|
||||
Recommended eval:
|
||||
|
||||
```bash
|
||||
CUDA_VISIBLE_DEVICES=GPU-9cc7b26e-90d4-0c49-4d4c-060e528ffba6 \
|
||||
uv run torchrun --nproc_per_node=1 --master_port=29693 \
|
||||
opengait/main.py \
|
||||
--cfgs ./configs/drf/drf_author_eval_118_aligned_1gpu.yaml \
|
||||
--phase test
|
||||
```
|
||||
|
||||
Other compatibility checks:
|
||||
|
||||
```bash
|
||||
CUDA_VISIBLE_DEVICES=GPU-9cc7b26e-90d4-0c49-4d4c-060e528ffba6 \
|
||||
uv run torchrun --nproc_per_node=1 --master_port=29695 \
|
||||
opengait/main.py \
|
||||
--cfgs ./configs/drf/drf_author_eval_112_1gpu.yaml \
|
||||
--phase test
|
||||
|
||||
CUDA_VISIBLE_DEVICES=GPU-9cc7b26e-90d4-0c49-4d4c-060e528ffba6 \
|
||||
uv run torchrun --nproc_per_node=1 --master_port=29696 \
|
||||
opengait/main.py \
|
||||
--cfgs ./configs/drf/drf_author_eval_118_splitroot_1gpu.yaml \
|
||||
--phase test
|
||||
|
||||
CUDA_VISIBLE_DEVICES=GPU-9cc7b26e-90d4-0c49-4d4c-060e528ffba6 \
|
||||
uv run torchrun --nproc_per_node=1 --master_port=29697 \
|
||||
opengait/main.py \
|
||||
--cfgs ./configs/drf/drf_author_eval_118_paper_1gpu.yaml \
|
||||
--phase test
|
||||
```
|
||||
|
||||
## Paths To Change On Another Machine
|
||||
|
||||
If you move this artifact bundle or use a different dataset location, update:
|
||||
- `data_cfg.dataset_root`
|
||||
- `data_cfg.dataset_partition`
|
||||
- `evaluator_cfg.restore_hint`
|
||||
|
||||
In this repo, the checkpoint is archived at:
|
||||
- `artifact/scoliosis_drf_author_118_compat/DRF_118_unordered_iter2w_lr0.001_8830-08000.pt`
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
data_cfg:
|
||||
dataset_name: Scoliosis1K
|
||||
data_type: heatmap
|
||||
dataset_root: /home/kj666/project_temp/opengait/datasets/Scoliosis1K/Scoliosis1K-drf-pkl
|
||||
dataset_partition: ./datasets/Scoliosis1K/Scoliosis1K_112.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: Scoliosis1K
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: ./artifact/scoliosis_sconet_112_bodyonly_plaince_adamw_cosine/DRF_118_unordered_iter2w_lr0.001_8830-08000.pt
|
||||
save_name: DRF_118_unordered_iter2w_lr0.001_8830-08000.pt
|
||||
eval_func: evaluate_scoliosis
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 1
|
||||
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: DRF
|
||||
backbone_cfg:
|
||||
type: ResNet9
|
||||
block: BasicBlock
|
||||
in_channel: 2
|
||||
channels: # Layers configuration for automatically model construction
|
||||
- 64
|
||||
- 128
|
||||
- 256
|
||||
- 512
|
||||
layers:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
strides:
|
||||
- 1
|
||||
- 2
|
||||
- 2
|
||||
- 1
|
||||
maxpool: false
|
||||
SeparateFCs:
|
||||
in_channels: 512
|
||||
out_channels: 256
|
||||
parts_num: 16
|
||||
SeparateBNNecks:
|
||||
class_num: 3
|
||||
in_channels: 256
|
||||
parts_num: 16
|
||||
bin_num:
|
||||
- 16
|
||||
|
||||
optimizer_cfg:
|
||||
lr: 0.01
|
||||
momentum: 0.9
|
||||
solver: SGD
|
||||
weight_decay: 0.0005
|
||||
|
||||
scheduler_cfg:
|
||||
gamma: 0.1
|
||||
milestones: # Learning Rate Reduction at each milestones
|
||||
- 10000
|
||||
- 14000
|
||||
- 18000
|
||||
scheduler: MultiStepLR
|
||||
|
||||
trainer_cfg:
|
||||
find_unused_parameters: True
|
||||
enable_float16: true # half_percesion float for memory reduction and speedup
|
||||
fix_BN: false
|
||||
with_test: true
|
||||
log_iter: 100
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 0
|
||||
save_iter: 2000
|
||||
save_name: DRF_118_unordered_iter2w_lr0.001_8830-08000.pt
|
||||
total_iter: 20000
|
||||
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: 30 # fixed frames number for training
|
||||
frames_skip_num: 2
|
||||
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: BaseSilCuttingTransform
|
||||
@@ -0,0 +1,65 @@
|
||||
data_cfg:
|
||||
dataset_name: Scoliosis1K
|
||||
data_type: heatmap
|
||||
dataset_root: /mnt/public/data/Scoliosis1K/Scoliosis1K-drf-pkl
|
||||
dataset_partition: ./datasets/Scoliosis1K/Scoliosis1K_112.json
|
||||
num_workers: 1
|
||||
data_in_use: [true, true]
|
||||
remove_no_gallery: false
|
||||
test_dataset_name: Scoliosis1K
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: ./artifact/scoliosis_drf_author_118_compat/DRF_118_unordered_iter2w_lr0.001_8830-08000.pt
|
||||
save_name: DRF_author_eval_112_1gpu
|
||||
eval_func: evaluate_scoliosis
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 1
|
||||
sample_type: all_ordered
|
||||
type: InferenceSampler
|
||||
frames_all_limit: 720
|
||||
metric: euc
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
- type: NoOperation
|
||||
|
||||
model_cfg:
|
||||
model: DRF
|
||||
label_order:
|
||||
- negative
|
||||
- positive
|
||||
- neutral
|
||||
num_pairs: 8
|
||||
num_metrics: 3
|
||||
backbone_cfg:
|
||||
type: ResNet9
|
||||
block: BasicBlock
|
||||
in_channel: 2
|
||||
channels:
|
||||
- 64
|
||||
- 128
|
||||
- 256
|
||||
- 512
|
||||
layers:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
strides:
|
||||
- 1
|
||||
- 2
|
||||
- 2
|
||||
- 1
|
||||
maxpool: false
|
||||
SeparateFCs:
|
||||
in_channels: 512
|
||||
out_channels: 256
|
||||
parts_num: 16
|
||||
SeparateBNNecks:
|
||||
class_num: 3
|
||||
in_channels: 256
|
||||
parts_num: 16
|
||||
bin_num:
|
||||
- 16
|
||||
@@ -0,0 +1,65 @@
|
||||
data_cfg:
|
||||
dataset_name: Scoliosis1K
|
||||
data_type: heatmap
|
||||
dataset_root: /mnt/public/data/Scoliosis1K/Scoliosis1K-drf-pkl-118-aligned
|
||||
dataset_partition: ./datasets/Scoliosis1K/Scoliosis1K_118.json
|
||||
num_workers: 1
|
||||
data_in_use: [true, true]
|
||||
remove_no_gallery: false
|
||||
test_dataset_name: Scoliosis1K
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: ./artifact/scoliosis_drf_author_118_compat/DRF_118_unordered_iter2w_lr0.001_8830-08000.pt
|
||||
save_name: DRF_author_eval_118_aligned_1gpu
|
||||
eval_func: evaluate_scoliosis
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 1
|
||||
sample_type: all_ordered
|
||||
type: InferenceSampler
|
||||
frames_all_limit: 720
|
||||
metric: euc
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
- type: NoOperation
|
||||
|
||||
model_cfg:
|
||||
model: DRF
|
||||
label_order:
|
||||
- negative
|
||||
- positive
|
||||
- neutral
|
||||
num_pairs: 8
|
||||
num_metrics: 3
|
||||
backbone_cfg:
|
||||
type: ResNet9
|
||||
block: BasicBlock
|
||||
in_channel: 2
|
||||
channels:
|
||||
- 64
|
||||
- 128
|
||||
- 256
|
||||
- 512
|
||||
layers:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
strides:
|
||||
- 1
|
||||
- 2
|
||||
- 2
|
||||
- 1
|
||||
maxpool: false
|
||||
SeparateFCs:
|
||||
in_channels: 512
|
||||
out_channels: 256
|
||||
parts_num: 16
|
||||
SeparateBNNecks:
|
||||
class_num: 3
|
||||
in_channels: 256
|
||||
parts_num: 16
|
||||
bin_num:
|
||||
- 16
|
||||
@@ -0,0 +1,65 @@
|
||||
data_cfg:
|
||||
dataset_name: Scoliosis1K
|
||||
data_type: heatmap
|
||||
dataset_root: /mnt/public/data/Scoliosis1K/Scoliosis1K-drf-pkl
|
||||
dataset_partition: ./datasets/Scoliosis1K/Scoliosis1K_118.json
|
||||
num_workers: 1
|
||||
data_in_use: [true, true]
|
||||
remove_no_gallery: false
|
||||
test_dataset_name: Scoliosis1K
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: ./artifact/scoliosis_drf_author_118_compat/DRF_118_unordered_iter2w_lr0.001_8830-08000.pt
|
||||
save_name: DRF_author_eval_118_1gpu
|
||||
eval_func: evaluate_scoliosis
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 1
|
||||
sample_type: all_ordered
|
||||
type: InferenceSampler
|
||||
frames_all_limit: 720
|
||||
metric: euc
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
- type: NoOperation
|
||||
|
||||
model_cfg:
|
||||
model: DRF
|
||||
label_order:
|
||||
- negative
|
||||
- positive
|
||||
- neutral
|
||||
num_pairs: 8
|
||||
num_metrics: 3
|
||||
backbone_cfg:
|
||||
type: ResNet9
|
||||
block: BasicBlock
|
||||
in_channel: 2
|
||||
channels:
|
||||
- 64
|
||||
- 128
|
||||
- 256
|
||||
- 512
|
||||
layers:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
strides:
|
||||
- 1
|
||||
- 2
|
||||
- 2
|
||||
- 1
|
||||
maxpool: false
|
||||
SeparateFCs:
|
||||
in_channels: 512
|
||||
out_channels: 256
|
||||
parts_num: 16
|
||||
SeparateBNNecks:
|
||||
class_num: 3
|
||||
in_channels: 256
|
||||
parts_num: 16
|
||||
bin_num:
|
||||
- 16
|
||||
@@ -0,0 +1,65 @@
|
||||
data_cfg:
|
||||
dataset_name: Scoliosis1K
|
||||
data_type: heatmap
|
||||
dataset_root: /mnt/public/data/Scoliosis1K/Scoliosis1K-drf-pkl-118-paper
|
||||
dataset_partition: ./datasets/Scoliosis1K/Scoliosis1K_118.json
|
||||
num_workers: 1
|
||||
data_in_use: [true, true]
|
||||
remove_no_gallery: false
|
||||
test_dataset_name: Scoliosis1K
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: ./artifact/scoliosis_drf_author_118_compat/DRF_118_unordered_iter2w_lr0.001_8830-08000.pt
|
||||
save_name: DRF_author_eval_118_paper_1gpu
|
||||
eval_func: evaluate_scoliosis
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 1
|
||||
sample_type: all_ordered
|
||||
type: InferenceSampler
|
||||
frames_all_limit: 720
|
||||
metric: euc
|
||||
transform:
|
||||
- type: BaseSilTransform
|
||||
- type: NoOperation
|
||||
|
||||
model_cfg:
|
||||
model: DRF
|
||||
label_order:
|
||||
- negative
|
||||
- positive
|
||||
- neutral
|
||||
num_pairs: 8
|
||||
num_metrics: 3
|
||||
backbone_cfg:
|
||||
type: ResNet9
|
||||
block: BasicBlock
|
||||
in_channel: 2
|
||||
channels:
|
||||
- 64
|
||||
- 128
|
||||
- 256
|
||||
- 512
|
||||
layers:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
strides:
|
||||
- 1
|
||||
- 2
|
||||
- 2
|
||||
- 1
|
||||
maxpool: false
|
||||
SeparateFCs:
|
||||
in_channels: 512
|
||||
out_channels: 256
|
||||
parts_num: 16
|
||||
SeparateBNNecks:
|
||||
class_num: 3
|
||||
in_channels: 256
|
||||
parts_num: 16
|
||||
bin_num:
|
||||
- 16
|
||||
@@ -0,0 +1,65 @@
|
||||
data_cfg:
|
||||
dataset_name: Scoliosis1K
|
||||
data_type: heatmap
|
||||
dataset_root: /mnt/public/data/Scoliosis1K/Scoliosis1K-drf-pkl-118
|
||||
dataset_partition: ./datasets/Scoliosis1K/Scoliosis1K_118.json
|
||||
num_workers: 1
|
||||
data_in_use: [true, true]
|
||||
remove_no_gallery: false
|
||||
test_dataset_name: Scoliosis1K
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: ./artifact/scoliosis_drf_author_118_compat/DRF_118_unordered_iter2w_lr0.001_8830-08000.pt
|
||||
save_name: DRF_author_eval_118_splitroot_1gpu
|
||||
eval_func: evaluate_scoliosis
|
||||
sampler:
|
||||
batch_shuffle: false
|
||||
batch_size: 1
|
||||
sample_type: all_ordered
|
||||
type: InferenceSampler
|
||||
frames_all_limit: 720
|
||||
metric: euc
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
- type: NoOperation
|
||||
|
||||
model_cfg:
|
||||
model: DRF
|
||||
label_order:
|
||||
- negative
|
||||
- positive
|
||||
- neutral
|
||||
num_pairs: 8
|
||||
num_metrics: 3
|
||||
backbone_cfg:
|
||||
type: ResNet9
|
||||
block: BasicBlock
|
||||
in_channel: 2
|
||||
channels:
|
||||
- 64
|
||||
- 128
|
||||
- 256
|
||||
- 512
|
||||
layers:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
strides:
|
||||
- 1
|
||||
- 2
|
||||
- 2
|
||||
- 1
|
||||
maxpool: false
|
||||
SeparateFCs:
|
||||
in_channels: 512
|
||||
out_channels: 256
|
||||
parts_num: 16
|
||||
SeparateBNNecks:
|
||||
class_num: 3
|
||||
in_channels: 256
|
||||
parts_num: 16
|
||||
bin_num:
|
||||
- 16
|
||||
Reference in New Issue
Block a user