YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
TouchScale: collaboration run guide
中文版:README.zh.md
This repository lets you reproduce TouchScale's unified-objective tactile pretraining and the downstream action-recognition evaluation on your own GPU machine. The code and the full runtime environment are in a Docker image; the data is here as tar shards. You do not need to change any code.
What to run
| Stage | Row | Description |
|---|---|---|
| Pretraining | touchscale_ego_normal_only_unified |
TouchScale, egocentric single view, normal-force channel |
| Pretraining | opentouch_unified |
OpenTouch, egocentric single view |
| Downstream | 6 cells per row | MECCANO / SSv2 / Ego-Exo4D × frozen / unfrozen |
Both pretraining rows run for 20,000 updates, start from the same Kinetics-400-pretrained Hiera-B encoder, and use an identical tactile prediction objective.
Requirements
- Docker with the NVIDIA Container Toolkit (
docker run --gpusmust work) - NVIDIA driver ≥ 570 (the image ships PyTorch 2.7 with CUDA 12.8)
- GPU: H200, or any Ampere-or-newer card with ≥ 80 GB of memory
- CPU: ≥ 32 cores per pretraining row is recommended. Video decoding is the bottleneck, so more cores make it faster
- Disk: about 250 GB to download and another 250 GB once extracted (you can delete the tar files after extracting); about 60 GB for outputs
No Docker, or the image will not run on your machine? See SETUP_WITHOUT_DOCKER.md for Podman, Apptainer and manual-host fallbacks.
1. Pull the image
docker pull dayou11/touchscale:unified-v1
2. Download and extract the data
Downloads require approval. Open https://huggingface.co/datasets/EndeavourDD/yange , click Request access, and once it has been approved run:
pip install -U "huggingface_hub[cli]"
huggingface-cli login # log in with the approved Hugging Face account
huggingface-cli download EndeavourDD/yange --repo-type dataset --local-dir ./yange
export DATA=/data/touchscale_collab # choose your own path
mkdir -p "$DATA"
cd yange
sha256sum -c data/SHA256SUMS # verify every shard
for f in data/*/*.tar; do tar -xf "$f" -C "$DATA"; done
After extraction, $DATA contains a top-level scratch/ directory whose paths match the original cluster exactly. This is intentional: the code reads data from those absolute paths, and the container mounts these directories back to the same locations.
This repository holds all five datasets: TouchScale and OpenTouch for pretraining, and MECCANO, SSv2 and Ego-Exo4D for downstream evaluation.
3. Running
Every command goes through run_container.sh from this repository:
cp yange/run_container.sh . && chmod +x run_container.sh
export DATA=/data/touchscale_collab
export OUT=/data/touchscale_out # outputs; keep this directory to resume interrupted runs
GPUS selects the GPUs for a command, e.g. GPUS=device=0 or GPUS='"device=0,1,2,3"'.
3.1 Check that the data is in place
GPUS=device=0 ./run_container.sh touchscale check touchscale_ego_normal_only_unified
GPUS=device=0 ./run_container.sh touchscale check opentouch_unified
Continue once both print CHECK OK.
3.2 Smoke test (run this first)
GPUS=device=0 ./run_container.sh touchscale pretrain touchscale_ego_normal_only_unified --smoke
250 updates; expect 15–25 minutes including data-loader start-up. Proceed only after you see SMOKE OK.
3.3 Full pretraining
The two rows can run at the same time on two GPUs:
GPUS=device=0 nohup ./run_container.sh touchscale pretrain touchscale_ego_normal_only_unified > pretrain_touchscale.log 2>&1 &
GPUS=device=1 nohup ./run_container.sh touchscale pretrain opentouch_unified > pretrain_opentouch.log 2>&1 &
- Each row is expected to take about 17 hours on one H200. This is extrapolated from 4-GPU runs on the original cluster: CPU decoding is the bottleneck and the GPUs mostly wait for data, so extra GPUs do not help much.
- If a run is interrupted, rerun the same command; it resumes from the latest checkpoint.
- The encoder is exported automatically at the end.
EXPORT OKmeans the row is finished. - The final bookkeeping step can exit with an error when the best checkpoint is not the one at update 20,000. This does not affect the result: once
EXPORT OKappears, the update-20,000 encoder has been exported.
3.4 Downstream action recognition
After a row's export has finished:
GPUS='"device=0,1,2,3"' ./run_container.sh touchscale downstream-all touchscale_ego_normal_only_unified
GPUS='"device=0,1,2,3"' ./run_container.sh touchscale downstream-all opentouch_unified
- 6 cells per row; about 12 hours on 4 H200s. SSv2 is the slowest, about 8.5 hours for its two cells.
- Completed cells are skipped automatically, so rerun the same command after an interruption.
- To run a single cell:
touchscale downstream <row> <meccano|ssv2|egoexo4d> <frozen|unfrozen>.
3.5 View results
GPUS=device=0 ./run_container.sh touchscale results
4. What to send back
Please send back these three directories:
$OUT/pretrain_runs/development_k400/*/seed17_unified_v1/exports/ # exported encoders, ~200 MB per row
$OUT/action_recognition/ # downstream results (history.json etc.)
$OUT/logs/ # logs, for debugging if anything went wrong
Troubleshooting
- Shared-memory or DataLoader errors at start-up:
run_container.shalready passes--ipc=host --shm-size=64g. Keep both if you write your owndocker run. - GPU memory: the configuration matches the original H200 runs, so out-of-memory errors are not expected. The global batch is fixed at 64; the number of GPUs comes from
GPUSand is detected automatically. - Decoding is slow: set e.g.
WORKERS_TOTAL=48to add pretraining decode workers (default 28), orWORKERSfor downstream workers per GPU.run_container.shforwards both into the container. - Open a shell in the container:
./run_container.sh touchscale shell
Licenses
- The Hiera-B Kinetics-400 weights in the image are from Meta, licensed CC BY-NC 4.0.
- Each dataset is used under its own license: MECCANO is CC BY-NC 4.0; OpenTouch, SSv2 and Ego-Exo4D are restricted to people covered by the data agreement. Do not redistribute them.
- Downloads last month
- 98