diff --git a/datasets/Scoliosis1K/README.md b/datasets/Scoliosis1K/README.md index d9a86c5..ce75a9b 100644 --- a/datasets/Scoliosis1K/README.md +++ b/datasets/Scoliosis1K/README.md @@ -1,34 +1,85 @@ # Tutorial for [Scoliosis1K](https://zhouzi180.github.io/Scoliosis1K) +## Download the Scoliosis1K Dataset -## Download the Scoliosis1K dataset -Download the dataset from the [link](https://zhouzi180.github.io/Scoliosis1K). -decompress these two file by following command: -```shell -unzip -P password Scoliosis1K-pkl.zip | xargs -n1 tar xzvf -``` -password should be obtained by signing [agreement](https://zhouzi180.github.io/Scoliosis1K/static/resources/Scoliosis1KAgreement.pdf) and sending to email (12331257@mail.sustech.edu.cn) +You can download the dataset from the [official website](https://zhouzi180.github.io/Scoliosis1K). +The dataset is provided as four compressed files: -Then you will get Scoliosis1K formatted as: -``` - DATASET_ROOT/ - 00000 (subject)/ - positive (category)/ - 000-180 (view)/ - 000.pkl (contains all frames) - ...... -``` -## Train the dataset -Modify the `dataset_root` in `configs/sconet/sconet_scoliosis1k.yaml`, and then run this command: -```shell -CUDA_VISIBLE_DEVICES=0,1,2,3 python -m torch.distributed.launch --nproc_per_node=4 opengait/main.py --cfgs configs/sconet/sconet_scoliosis1k.yaml --phase train +* `Scoliosis1K-sil-raw.zip` +* `Scoliosis1K-sil-pkl.zip` +* `Scoliosis1K-pose-raw.zip` +* `Scoliosis1K-pose-pkl.zip` + +We recommend using the provided pickle (`.pkl`) files for convenience. +Decompress them with the following commands: + +```bash +unzip -P Scoliosis1K-sil-pkl.zip +unzip -P Scoliosis1K-pose-pkl.zip ``` +> **Note**: The \ can be obtained by signing the [release agreement](https://zhouzi180.github.io/Scoliosis1K/static/resources/Scoliosis1k_release_agreement.pdf) and sending it to **[12331257@mail.sustech.edu.cn](mailto:12331257@mail.sustech.edu.cn)**. -## Process from RAW dataset +### Dataset Structure + +After decompression, you will get the following structure: -### Preprocess the dataset (Optional) -Download the raw dataset from the [official link](https://zhouzi180.github.io/Scoliosis1K). You will get two compressed files, i.e. `Scoliosis1K-raw.zip`, and `Scoliosis1K-pkl.zip`. -We recommend using our provided pickle files for convenience, or process raw dataset into pickle by this command: -```shell -python datasets/pretreatment.py --input_path Scoliosis1K_raw --output_path Scoliosis1K-pkl ``` +├── Scoliosis1K-sil-pkl +│ ├── 00000 # Identity +│ │ ├── Positive # Class +│ │ │ ├── 000_180 # View +│ │ │ └── 000_180.pkl # Estimated Silhouette (PP-HumanSeg v2) +│ +├── Scoliosis1K-pose-pkl +│ ├── 00000 # Identity +│ │ ├── Positive # Class +│ │ │ ├── 000_180 # View +│ │ │ └── 000_180.pkl # Estimated 2D Pose (ViTPose) +``` + +### Processing from RAW Dataset (optional) + +If you prefer, you can process the raw dataset into `.pkl` format. + +```bash +# For silhouette raw data +python datasets/pretreatment.py --input_path= -output_path= + +# For pose raw data +python datasets/pretreatment.py --input_path= -output_path= --pose --dataset=OUMVLP +``` +--- + +## Training and Testing + +Before training or testing, modify the `dataset_root` field in +`configs/sconet/sconet_scoliosis1k.yaml`. + +Then run the following commands: + +```bash +# Training +CUDA_VISIBLE_DEVICES=0,1,2,3 \ +python -m torch.distributed.launch --nproc_per_node=4 \ +opengait/main.py --cfgs configs/sconet/sconet_scoliosis1k.yaml --phase train --log_to_file + +# Testing +CUDA_VISIBLE_DEVICES=0,1,2,3 \ +python -m torch.distributed.launch --nproc_per_node=4 \ +opengait/main.py --cfgs configs/sconet/sconet_scoliosis1k.yaml --phase test --log_to_file +``` + +--- + +## Pose-to-Heatmap Conversion + +*From our paper: **Pose as Clinical Prior: Learning Dual Representations for Scoliosis Screening (MICCAI 2025)*** + +```bash +CUDA_VISIBLE_DEVICES=0,1,2,3 \ +python -m torch.distributed.launch --nproc_per_node=4 \ +datasets/pretreatment_heatmap.py \ + --pose_data_path= \ + --save_root= \ + --dataset_name=OUMVLP +``` \ No newline at end of file