feat: archive best scoliosis checkpoints
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
# Scoliosis ScoNet-MT-ske Artifacts
|
||||
|
||||
This directory archives the two retained best checkpoints from the practical
|
||||
`1:1:2` skeleton-map training path:
|
||||
|
||||
- best by macro-F1
|
||||
- best by accuracy
|
||||
|
||||
Model recipe:
|
||||
|
||||
- split: `Scoliosis1K_112.json`
|
||||
- representation: `body-only` skeleton heatmap
|
||||
- losses: plain CE + triplet
|
||||
- finetune optimizer: `AdamW`
|
||||
- scheduler: cosine annealing
|
||||
|
||||
Files:
|
||||
|
||||
- `*_scalar_test_f1.pt`: retained best checkpoint by macro-F1
|
||||
- `*_scalar_test_accuracy.pt`: retained best checkpoint by accuracy
|
||||
- `train_config.yaml`: training config for the finetune run
|
||||
- `eval_best_f1_27000.yaml`: standalone eval config for the retained best-F1 checkpoint
|
||||
- `eval_best_accuracy_64000.yaml`: standalone eval config for the retained best-accuracy checkpoint
|
||||
|
||||
## Reproduce eval
|
||||
|
||||
Run from the repo root.
|
||||
|
||||
Best-F1 checkpoint:
|
||||
|
||||
```bash
|
||||
CUDA_VISIBLE_DEVICES=GPU-9cc7b26e-90d4-0c49-4d4c-060e528ffba6 \
|
||||
uv run python -m torch.distributed.run --nproc_per_node=1 \
|
||||
opengait/main.py \
|
||||
--cfgs artifact/scoliosis_sconet_112_bodyonly_plaince_adamw_cosine/eval_best_f1_27000.yaml \
|
||||
--phase test
|
||||
```
|
||||
|
||||
Best-accuracy checkpoint:
|
||||
|
||||
```bash
|
||||
CUDA_VISIBLE_DEVICES=GPU-9cc7b26e-90d4-0c49-4d4c-060e528ffba6 \
|
||||
uv run python -m torch.distributed.run --nproc_per_node=1 \
|
||||
opengait/main.py \
|
||||
--cfgs artifact/scoliosis_sconet_112_bodyonly_plaince_adamw_cosine/eval_best_accuracy_64000.yaml \
|
||||
--phase test
|
||||
```
|
||||
|
||||
Paths to change on another machine:
|
||||
|
||||
- `data_cfg.dataset_root`
|
||||
- point this to your local body-only Scoliosis1K skeleton dataset root
|
||||
- `data_cfg.dataset_partition`
|
||||
- change this only if your repo or partition file lives elsewhere
|
||||
- `evaluator_cfg.restore_hint`
|
||||
- change this only if you move the `artifact/` folder or rename the checkpoint files
|
||||
- `evaluator_cfg.output_root`
|
||||
- change this if you want eval outputs somewhere else
|
||||
|
||||
## Verified results
|
||||
|
||||
These commands were rerun from the copied `artifact/` configs on `2026-03-11`.
|
||||
|
||||
Best-F1 checkpoint (`27000`):
|
||||
|
||||
- Accuracy: `92.38%`
|
||||
- Macro Precision: `90.30%`
|
||||
- Macro Recall: `87.39%`
|
||||
- Macro F1: `88.70%`
|
||||
|
||||
Best-accuracy checkpoint (`64000`):
|
||||
|
||||
- Accuracy: `94.25%`
|
||||
- Macro Precision: `83.24%`
|
||||
- Macro Recall: `95.76%`
|
||||
- Macro F1: `87.63%`
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
data_cfg:
|
||||
dataset_name: Scoliosis1K
|
||||
dataset_root: /mnt/public/data/Scoliosis1K/Scoliosis1K-drf-pkl-118-sigma15-joint8-bodyonly
|
||||
dataset_partition: ./datasets/Scoliosis1K/Scoliosis1K_112.json
|
||||
data_in_use:
|
||||
- true
|
||||
- false
|
||||
num_workers: 1
|
||||
remove_no_gallery: false
|
||||
test_dataset_name: Scoliosis1K
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: ./artifact/scoliosis_sconet_112_bodyonly_plaince_adamw_cosine/ScoNet_skeleton_112_sigma15_joint8_bodyonly_plaince_adamw_cosine_finetune_1gpu_80k-iter-64000-score-0.9425-scalar_test_accuracy.pt
|
||||
save_name: ScoNet_skeleton_112_sigma15_joint8_bodyonly_plaince_adamw_cosine_eval_64000_1gpu
|
||||
output_root: ./artifact/scoliosis_sconet_112_bodyonly_plaince_adamw_cosine/eval-output
|
||||
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
|
||||
|
||||
model_cfg:
|
||||
model: ScoNet
|
||||
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,60 @@
|
||||
data_cfg:
|
||||
dataset_name: Scoliosis1K
|
||||
dataset_root: /mnt/public/data/Scoliosis1K/Scoliosis1K-drf-pkl-118-sigma15-joint8-bodyonly
|
||||
dataset_partition: ./datasets/Scoliosis1K/Scoliosis1K_112.json
|
||||
data_in_use:
|
||||
- true
|
||||
- false
|
||||
num_workers: 1
|
||||
remove_no_gallery: false
|
||||
test_dataset_name: Scoliosis1K
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: ./artifact/scoliosis_sconet_112_bodyonly_plaince_adamw_cosine/ScoNet_skeleton_112_sigma15_joint8_bodyonly_plaince_adamw_cosine_finetune_1gpu_80k-iter-27000-score-0.8870-scalar_test_f1.pt
|
||||
save_name: ScoNet_skeleton_112_sigma15_joint8_bodyonly_plaince_adamw_cosine_eval_27000_1gpu
|
||||
output_root: ./artifact/scoliosis_sconet_112_bodyonly_plaince_adamw_cosine/eval-output
|
||||
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
|
||||
|
||||
model_cfg:
|
||||
model: ScoNet
|
||||
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,115 @@
|
||||
data_cfg:
|
||||
dataset_name: Scoliosis1K
|
||||
dataset_root: /mnt/public/data/Scoliosis1K/Scoliosis1K-drf-pkl-118-sigma15-joint8-bodyonly
|
||||
dataset_partition: ./datasets/Scoliosis1K/Scoliosis1K_112.json
|
||||
data_in_use:
|
||||
- true
|
||||
- false
|
||||
num_workers: 1
|
||||
remove_no_gallery: false
|
||||
test_dataset_name: Scoliosis1K
|
||||
|
||||
evaluator_cfg:
|
||||
enable_float16: true
|
||||
restore_ckpt_strict: true
|
||||
restore_hint: 80000
|
||||
save_name: ScoNet_skeleton_112_sigma15_joint8_bodyonly_plaince_adamw_cosine_finetune_1gpu_80k
|
||||
output_root: /mnt/hddl/data/OpenGait-output
|
||||
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
|
||||
|
||||
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: ScoNet
|
||||
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
|
||||
|
||||
optimizer_cfg:
|
||||
lr: 0.0005
|
||||
solver: AdamW
|
||||
weight_decay: 0.0005
|
||||
|
||||
scheduler_cfg:
|
||||
scheduler: CosineAnnealingLR
|
||||
T_max: 60000
|
||||
eta_min: 0.00001
|
||||
|
||||
trainer_cfg:
|
||||
enable_float16: true
|
||||
fix_BN: false
|
||||
with_test: true
|
||||
log_iter: 100
|
||||
restore_ckpt_strict: true
|
||||
optimizer_reset: false
|
||||
scheduler_reset: false
|
||||
restore_hint: /mnt/hddl/data/OpenGait-output/Scoliosis1K/ScoNet/ScoNet_skeleton_112_sigma15_joint8_bodyonly_plaince_adamw_cosine_finetune_1gpu_80k/checkpoints/latest.pt
|
||||
output_root: /mnt/hddl/data/OpenGait-output
|
||||
auto_resume_latest: true
|
||||
resume_every_iter: 500
|
||||
resume_keep: 6
|
||||
best_ckpt_cfg:
|
||||
keep_n: 3
|
||||
metric_names:
|
||||
- scalar/test_f1/
|
||||
- scalar/test_accuracy/
|
||||
eval_iter: 1000
|
||||
save_iter: 500
|
||||
save_name: ScoNet_skeleton_112_sigma15_joint8_bodyonly_plaince_adamw_cosine_finetune_1gpu_80k
|
||||
sync_BN: false
|
||||
total_iter: 80000
|
||||
sampler:
|
||||
batch_shuffle: true
|
||||
batch_size:
|
||||
- 8
|
||||
- 8
|
||||
frames_num_fixed: 30
|
||||
sample_type: fixed_unordered
|
||||
type: TripletSampler
|
||||
transform:
|
||||
- type: BaseSilCuttingTransform
|
||||
Reference in New Issue
Block a user